You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2015/06/07 19:00:42 UTC

[01/44] airavata git commit: Changing the thrift model variable names to lower camel case

Repository: airavata
Updated Branches:
  refs/heads/mongo-registry [created] 8bd562af4


http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/LaunchApplicationWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/LaunchApplicationWindow.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/LaunchApplicationWindow.java
index 450dde5..9e8e673 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/LaunchApplicationWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/LaunchApplicationWindow.java
@@ -299,7 +299,7 @@ public class LaunchApplicationWindow {
         String owner = this.thriftClientData.getUsername();        
         if(owner.equals(""))owner="NotKnown";              
         project.setOwner(owner);
-        project.setProjectID(airavataClient.createProject(gatewayId, project));
+        project.setProjectId(airavataClient.createProject(gatewayId, project));
 //        final List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
         final List<DataPort> inputPorts = node.getInputPorts();
         final Experiment experiment = new Experiment();
@@ -314,7 +314,7 @@ public class LaunchApplicationWindow {
         }
         
         scheduling.setNodeCount(1);
-        scheduling.setTotalCPUCount(1);
+        scheduling.setTotalCpuCount(1);
         scheduling.setWallTimeLimit(15);
         scheduling.setQueueName("normal");
         UserConfigurationData userConfigurationData = new UserConfigurationData();
@@ -323,7 +323,7 @@ public class LaunchApplicationWindow {
         userConfigurationData.setComputationalResourceScheduling(scheduling);
         experiment.setUserConfigurationData(userConfigurationData);
         experiment.setName(instanceName);
-        experiment.setProjectID(project.getProjectID());
+        experiment.setProjectId(project.getProjectId());
         experiment.setUserName(thriftClientData.getUsername());
 
 //        for (int i = 0; i < inputNodes.size(); i++) {
@@ -368,16 +368,16 @@ public class LaunchApplicationWindow {
 			experiment.addToExperimentOutputs(elem );
         }
 
-        experiment.setExperimentID(airavataClient.createExperiment(gatewayId, experiment));
-        airavataClient.launchExperiment(experiment.getExperimentID(), "testToken");
+        experiment.setExperimentId(airavataClient.createExperiment(gatewayId, experiment));
+        airavataClient.launchExperiment(experiment.getExperimentId(), "testToken");
         hide();
         JOptionPane.showMessageDialog(null, "Experiment Launched. You will be alerted on completion.");
      
-        String status = airavataClient.getExperimentStatus(experiment.getExperimentID()).getExperimentState().toString().trim();      
+        String status = airavataClient.getExperimentStatus(experiment.getExperimentId()).getExperimentState().toString().trim();
         while(!status.equals("COMPLETED") && !status.equals("FAILED")){        	
         	try {
 				Thread.sleep(1000);
-				status = airavataClient.getExperimentStatus(experiment.getExperimentID()).getExperimentState().toString().trim();				
+				status = airavataClient.getExperimentStatus(experiment.getExperimentId()).getExperimentState().toString().trim();
 			} catch (InterruptedException e) {
                 logger.error(e.getMessage(), e);
 			}
@@ -394,7 +394,7 @@ public class LaunchApplicationWindow {
         	while(output.equals("")){
         		output = "";
         		fullOutput = "Experiment Completed Successfully. Output(s) are shown below:\n";
-            	List<OutputDataObjectType> outputs = airavataClient.getExperimentOutputs(experiment.getExperimentID());
+            	List<OutputDataObjectType> outputs = airavataClient.getExperimentOutputs(experiment.getExperimentId());
             	for(int i1=0; i1<outputs.size(); i1++){
             		output = outputs.get(i1).getValue();
             		fullOutput+= outputs.get(i1).getName()+": "+output+"\n";

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
index 5ae0c94..4b12db9 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
@@ -325,11 +325,11 @@ public class WorkflowInterpreterLaunchWindow {
         Project project = new Project();
         project.setName("project1");
         project.setOwner(thriftClientData.getUsername());
-        project.setProjectID(airavataClient.createProject(gatewayId, project));
+        project.setProjectId(airavataClient.createProject(gatewayId, project));
         final Experiment experiment = new Experiment();
         experiment.setApplicationId(workflowModel.getTemplateId());
         experiment.setName(instanceName);
-        experiment.setProjectID(project.getProjectID());
+        experiment.setProjectId(project.getProjectId());
         experiment.setUserName(thriftClientData.getUsername());
         for (InputDataObjectType inputDataType : inputDataTypes) {
             experiment.addToExperimentInputs(inputDataType);
@@ -372,25 +372,25 @@ public class WorkflowInterpreterLaunchWindow {
         for (int i = 0; i < 20; i++) {
             experiment.setName(instanceName + "_" + i);
 
-            experiment.setExperimentID(airavataClient.createExperiment(experiment));
+            experiment.setExperimentId(airavataClient.createExperiment(experiment));
 
             try {
-                this.engine.getMonitor().subscribe(experiment.getExperimentID());
+                this.engine.getMonitor().subscribe(experiment.getExperimentId());
                 this.engine.getMonitor().fireStartMonitoring(workflow.getName());
             } catch (MonitorException e) {
-                logger.error("Error while subscribing with experiment Id : " + experiment.getExperimentID(), e);
+                logger.error("Error while subscribing with experiment Id : " + experiment.getExperimentId(), e);
             }
-            airavataClient.launchExperiment(experiment.getExperimentID(), "testToken");
+            airavataClient.launchExperiment(experiment.getExperimentId(), "testToken");
 
         }*/
-        experiment.setExperimentID(airavataClient.createExperiment(gatewayId, experiment));
+        experiment.setExperimentId(airavataClient.createExperiment(gatewayId, experiment));
         try {
-            this.engine.getMonitor().subscribe(experiment.getExperimentID());
+            this.engine.getMonitor().subscribe(experiment.getExperimentId());
             this.engine.getMonitor().fireStartMonitoring(workflow.getName());
         } catch (MonitorException e) {
-            logger.error("Error while subscribing with experiment Id : " + experiment.getExperimentID(), e);
+            logger.error("Error while subscribing with experiment Id : " + experiment.getExperimentId(), e);
         }
-        airavataClient.launchExperiment(experiment.getExperimentID(), token.getText());
+        airavataClient.launchExperiment(experiment.getExperimentId(), token.getText());
 
         clean();
         hide();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/monitor/MonitorEventHandler.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/monitor/MonitorEventHandler.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/monitor/MonitorEventHandler.java
index 2461da8..505fc89 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/monitor/MonitorEventHandler.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/monitor/MonitorEventHandler.java
@@ -331,14 +331,14 @@ public class MonitorEventHandler implements ChangeListener {
             if (event.getStatus().equals(WorkflowNodeState.INVOKED.toString())) {
                 invokeNode(node);
 //            workflowStarted(graph, forward);
-//            workflowStatusUpdater.workflowStarted(event.getExperimentID());
+//            workflowStatusUpdater.workflowStarted(event.getExperimentId());
             } else if (event.getStatus().equals(WorkflowNodeState.COMPLETED.toString())) {
                 nodeFinished(node, true);
 //            workflowFinished(graph, forward);
-//            workflowStatusUpdater.workflowFinished(event.getExperimentID());
+//            workflowStatusUpdater.workflowFinished(event.getExperimentId());
             } else if (event.getStatus().equals(WorkflowNodeState.EXECUTING.toString())) {
                 nodeStarted(node, forward);
-//                workflowNodeStatusUpdater.workflowStarted(event.getExperimentID(), event.getNodeID());
+//                workflowNodeStatusUpdater.workflowStarted(event.getExperimentId(), event.getNodeID());
             } else {
                 // Ignore the rest.
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/samples/java-client/experiment/src/main/java/org/apache/airavata/api/samples/ExperimentSample.java
----------------------------------------------------------------------
diff --git a/samples/java-client/experiment/src/main/java/org/apache/airavata/api/samples/ExperimentSample.java b/samples/java-client/experiment/src/main/java/org/apache/airavata/api/samples/ExperimentSample.java
index 83dd1a7..7f2379d 100644
--- a/samples/java-client/experiment/src/main/java/org/apache/airavata/api/samples/ExperimentSample.java
+++ b/samples/java-client/experiment/src/main/java/org/apache/airavata/api/samples/ExperimentSample.java
@@ -70,7 +70,7 @@ public class ExperimentSample {
 
         Project project=new Project();
         project.setName("project1");
-        project.setProjectID("project1");
+        project.setProjectId("project1");
 		project.setOwner(user);
         Client client = getClient();
 		String projectId=client.createProject(project);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobDescriptor.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobDescriptor.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobDescriptor.java
index 9a34a47..b2fcea7 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobDescriptor.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/JobDescriptor.java
@@ -161,7 +161,7 @@ public class JobDescriptor {
         inputList.setInputArray(inputValue.toArray(new String[inputValue.size()]));
     }
 
-    public void setJobID(String jobID) {
+    public void setJobId(String jobID) {
         this.getJobDescriptorDocument().getJobDescriptor().setJobID(jobID);
     }
 
@@ -325,7 +325,7 @@ public class JobDescriptor {
         return this.getJobDescriptorDocument().getJobDescriptor().getInputs().getInputArray();
     }
 
-    public String getJobID() {
+    public String getJobId() {
         return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
     }
 
@@ -384,11 +384,6 @@ public class JobDescriptor {
         return this.getJobDescriptorDocument().getJobDescriptor().getJobName();
     }
 
-    public String getJobId() {
-        return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
-    }
-
-
     public String getVariableList() {
         return this.getJobDescriptorDocument().getJobDescriptor().getJobID();
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java
index 3304465..d5c51d0 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java
@@ -60,7 +60,7 @@ public class PBSOutputParser implements OutputParser {
                     value = value.replaceAll("\t", "");
                     jobDescriptor.setVariableList(value);
                 } else if ("Job Id".equals(header)) {
-                    jobDescriptor.setJobID(value);
+                    jobDescriptor.setJobId(value);
                 } else if ("Job_Name".equals(header)) {
                     jobDescriptor.setJobName(value);
                 } else if ("Account_Name".equals(header)) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmOutputParser.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmOutputParser.java
index d37d444..0796937 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmOutputParser.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmOutputParser.java
@@ -52,7 +52,7 @@ public class SlurmOutputParser implements OutputParser {
                 } else {
                     switch (column) {
                         case 0:
-                            descriptor.setJobID(each);
+                            descriptor.setJobId(each);
                             column++;
                             break;
                         case 1:

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/UGEOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/UGEOutputParser.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/UGEOutputParser.java
index 238581a..89bbb38 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/UGEOutputParser.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/UGEOutputParser.java
@@ -59,7 +59,7 @@ public class UGEOutputParser implements OutputParser{
                     value = value.replaceAll("\t", "");
                     jobDescriptor.setVariableList(value);
                 } else if ("Job Id".equals(header)) {
-                    jobDescriptor.setJobID(value);
+                    jobDescriptor.setJobId(value);
                 } else if ("Job_Name".equals(header)) {
                     jobDescriptor.setJobName(value);
                 } else if ("Account_Name".equals(header)) {


[17/44] airavata git commit: Adding mongo-registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftSerializer.java
new file mode 100644
index 0000000..c692beb
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftSerializer.java
@@ -0,0 +1,122 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.google.common.base.CaseFormat;
+import org.apache.thrift.TBase;
+import org.apache.thrift.TFieldIdEnum;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Collection;
+
+/**
+ * This abstract class represents a generic serializer for converting Thrift-based entities
+ * to JSON.
+ *
+ * @param <E> An implementation of the {@link org.apache.thrift.TFieldIdEnum} interface.
+ * @param <T> An implementation of the {@link org.apache.thrift.TBase} interface.
+ */
+public abstract class AbstractThriftSerializer<E extends TFieldIdEnum, T extends TBase<T, E>>
+        extends JsonSerializer<T> {
+
+    private static final Logger log = LoggerFactory.getLogger(AbstractThriftSerializer.class);
+
+    @Override
+    public Class<T> handledType() {
+        return getThriftClass();
+    }
+
+    @Override
+    public void serialize(final T value, final JsonGenerator jgen, final SerializerProvider provider)
+            throws IOException, JsonProcessingException {
+        jgen.writeStartObject();
+        for(final E field : getFieldValues()) {
+            if(value.isSet(field)) {
+                final Object fieldValue = value.getFieldValue(field);
+                if(fieldValue != null) {
+                    log.debug("Adding field {} to the JSON string...",
+                            CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName())
+                    );
+
+                    jgen.writeFieldName(CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName()));
+                    if(fieldValue instanceof Short) {
+                        jgen.writeNumber((Short)fieldValue);
+                    } else if(fieldValue instanceof Integer) {
+                        jgen.writeNumber((Integer)fieldValue);
+                    } else if(fieldValue instanceof Long) {
+                        jgen.writeNumber((Long)fieldValue);
+                    } else if(fieldValue instanceof Double) {
+                        jgen.writeNumber((Double)fieldValue);
+                    } else if(fieldValue instanceof Float) {
+                        jgen.writeNumber((Float)fieldValue);
+                    } else if(fieldValue instanceof Boolean) {
+                        jgen.writeBoolean((Boolean)fieldValue);
+                    } else if(fieldValue instanceof String) {
+                        jgen.writeString(fieldValue.toString());
+                    } else if(fieldValue instanceof Collection) {
+                        log.debug("Array opened for field {}.",
+                                CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName())
+                        );
+                        jgen.writeStartArray();
+                        for(final Object arrayObject : (Collection<?>)fieldValue) {
+                                jgen.writeObject(arrayObject);
+                        }
+                        jgen.writeEndArray();
+                        log.debug("Array closed for field {}.",
+                                CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName())
+                        );
+                    } else {
+                        jgen.writeObject(fieldValue);
+                    }
+                } else {
+                    log.debug("Skipping converting field {} to JSON:  value is null!",
+                            CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName())
+                    );
+                }
+            } else {
+                log.debug("Skipping converting field {} to JSON:  field has not been set!",
+                        CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName())
+                );
+            }
+        }
+        jgen.writeEndObject();
+    }
+
+    /**
+     * Returns an array of {@code <E>} enumerated values that represent the fields present in the
+     * Thrift class associated with this serializer.
+     * @return The array of {@code <E>} enumerated values that represent the fields present in the
+     *   Thrift class.
+     */
+    protected abstract E[] getFieldValues();
+
+    /**
+     * Returns the {@code <T>} implementation class associated with this serializer.
+     * @return The {@code <T>} implementation class
+     */
+    protected abstract Class<T> getThriftClass();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/ModelConversionHelper.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/ModelConversionHelper.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/ModelConversionHelper.java
new file mode 100644
index 0000000..4144b2e
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/ModelConversionHelper.java
@@ -0,0 +1,218 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.Version;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.model.workspace.Group;
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.model.workspace.User;
+import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.appcatalog.idot.InputDataObjectTypeDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.appcatalog.idot.InputDataObjectTypeSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.appcatalog.odot.OutputDataObjectTypeDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.appcatalog.odot.OutputDataObjectTypeSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.ExperimentDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.ExperimentSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.aidh.AdvancedInputDataHandlingDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.aidh.AdvancedInputDataHandlingSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.aodh.AdvancedOutputDataHandlingDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.aodh.AdvancedOutputDataHandlingSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.appstatus.ApplicationStatusDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.appstatus.ApplicationStatusSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.crsh.ComputationalResourceSchedulingDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.crsh.ComputationalResourceSchedulingSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.datatrdetails.DataTransferDetailsDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.datatrdetails.DataTransferDetailsSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.errdetails.ErrorDetailsDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.errdetails.ErrorDetailsSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.expstatus.ExperimentStatusDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.expstatus.ExperimentStatusSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.expsummary.ExperimentSummaryDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.expsummary.ExperimentSummarySerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.jobdetails.JobDetailsDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.jobdetails.JobDetailsSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.jobstatus.JobStatusDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.jobstatus.JobStatusSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.qosp.QualityOfServiceParamsDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.qosp.QualityOfServiceParamsSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.taskdetails.TaskDetailsDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.taskdetails.TaskDetailsSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.taskstatus.TaskStatusDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.taskstatus.TaskStatusSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.trstatus.TransferStatusDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.trstatus.TransferStatusSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.ucdata.UserConfigurationDataDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.ucdata.UserConfigurationDataSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.validationrslt.ValidationResultsDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.validationrslt.ValidationResultsSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.wfnd.WorkflowNodeDetailsDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.wfnd.WorkflowNodeDetailsSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.wfns.WorkflowNodeStatusDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.wfns.WorkflowNodeStatusSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.gateway.GatewayDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.gateway.GatewaySerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.group.GroupDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.group.GroupSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.project.ProjectDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.project.ProjectSerializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.user.UserDeserializer;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.user.UserSerializer;
+import org.apache.thrift.TBase;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+/**
+ * This is utility class for model conversion of thrift to/from json
+ */
+public class ModelConversionHelper {
+    private final static Logger logger = LoggerFactory.getLogger(ModelConversionHelper.class);
+    private ObjectMapper objectMapper;
+
+    public ModelConversionHelper(){
+        init();
+    }
+
+    /**
+     * Private method to register the custom serializers and deserializers
+     */
+    private void init(){
+        this.objectMapper = new ObjectMapper();
+        SimpleModule module = new SimpleModule("SimpleModule",
+                new Version(1,0,0,null,null,null));
+
+        module.addSerializer(Gateway.class, new GatewaySerializer());
+        module.addDeserializer(Gateway.class, new GatewayDeserializer());
+
+        module.addSerializer(Group.class, new GroupSerializer());
+        module.addDeserializer(Group.class, new GroupDeserializer());
+
+        module.addSerializer(Project.class, new ProjectSerializer());
+        module.addDeserializer(Project.class, new ProjectDeserializer());
+
+        module.addSerializer(User.class, new UserSerializer());
+        module.addDeserializer(User.class, new UserDeserializer());
+
+        module.addSerializer(Experiment.class, new ExperimentSerializer());
+        module.addDeserializer(Experiment.class, new ExperimentDeserializer());
+
+        module.addSerializer(AdvancedInputDataHandling.class,
+                new AdvancedInputDataHandlingSerializer());
+        module.addDeserializer(AdvancedInputDataHandling.class,
+                new AdvancedInputDataHandlingDeserializer());
+
+        module.addSerializer(AdvancedOutputDataHandling.class,
+                new AdvancedOutputDataHandlingSerializer());
+        module.addDeserializer(AdvancedOutputDataHandling.class,
+                new AdvancedOutputDataHandlingDeserializer());
+
+        module.addSerializer(ApplicationStatus.class,
+                new ApplicationStatusSerializer());
+        module.addDeserializer(ApplicationStatus.class,
+                new ApplicationStatusDeserializer());
+
+        module.addSerializer(ComputationalResourceScheduling.class,
+                new ComputationalResourceSchedulingSerializer());
+        module.addDeserializer(ComputationalResourceScheduling.class,
+                new ComputationalResourceSchedulingDeserializer());
+
+        module.addSerializer(DataTransferDetails.class, new DataTransferDetailsSerializer());
+        module.addDeserializer(DataTransferDetails.class, new DataTransferDetailsDeserializer());
+
+        module.addSerializer(ErrorDetails.class, new ErrorDetailsSerializer());
+        module.addDeserializer(ErrorDetails.class, new ErrorDetailsDeserializer());
+
+        module.addSerializer(ExperimentStatus.class, new ExperimentStatusSerializer());
+        module.addDeserializer(ExperimentStatus.class, new ExperimentStatusDeserializer());
+
+        module.addSerializer(ExperimentSummary.class, new ExperimentSummarySerializer());
+        module.addDeserializer(ExperimentSummary.class, new ExperimentSummaryDeserializer());
+
+        module.addSerializer(JobDetails.class, new JobDetailsSerializer());
+        module.addDeserializer(JobDetails.class, new JobDetailsDeserializer());
+
+        module.addSerializer(JobStatus.class, new JobStatusSerializer());
+        module.addDeserializer(JobStatus.class, new JobStatusDeserializer());
+
+        module.addSerializer(QualityOfServiceParams.class,
+                new QualityOfServiceParamsSerializer());
+        module.addDeserializer(QualityOfServiceParams.class,
+                new QualityOfServiceParamsDeserializer());
+
+        module.addSerializer(TaskDetails.class, new TaskDetailsSerializer());
+        module.addDeserializer(TaskDetails.class, new TaskDetailsDeserializer());
+
+        module.addSerializer(TaskStatus.class, new TaskStatusSerializer());
+        module.addDeserializer(TaskStatus.class, new TaskStatusDeserializer());
+
+        module.addSerializer(TransferStatus.class, new TransferStatusSerializer());
+        module.addDeserializer(TransferStatus.class, new TransferStatusDeserializer());
+
+        module.addSerializer(UserConfigurationData.class, new UserConfigurationDataSerializer());
+        module.addDeserializer(UserConfigurationData.class, new UserConfigurationDataDeserializer());
+
+        module.addSerializer(ValidationResults.class, new ValidationResultsSerializer());
+        module.addDeserializer(ValidationResults.class, new ValidationResultsDeserializer());
+
+        module.addSerializer(WorkflowNodeDetails.class, new WorkflowNodeDetailsSerializer());
+        module.addDeserializer(WorkflowNodeDetails.class, new WorkflowNodeDetailsDeserializer());
+
+        module.addSerializer(WorkflowNodeStatus.class, new WorkflowNodeStatusSerializer());
+        module.addDeserializer(WorkflowNodeStatus.class, new WorkflowNodeStatusDeserializer());
+
+        module.addSerializer(InputDataObjectType.class, new InputDataObjectTypeSerializer());
+        module.addDeserializer(InputDataObjectType.class, new InputDataObjectTypeDeserializer());
+
+        module.addSerializer(OutputDataObjectType.class, new OutputDataObjectTypeSerializer());
+        module.addDeserializer(OutputDataObjectType.class, new OutputDataObjectTypeDeserializer());
+
+        objectMapper.registerModule(module);
+    }
+
+    /**
+     * Method to serialize a thrift object to json
+     * @param object
+     * @return
+     * @throws JsonProcessingException
+     */
+    public String serializeObject(TBase object) throws JsonProcessingException {
+        String json = this.objectMapper.writeValueAsString(object);
+        return json;
+    }
+
+    /**
+     * Method to deserialize a json to the thrift object
+     * @param clz
+     * @param json
+     * @return
+     * @throws IOException
+     */
+    public TBase deserializeObject(Class<?> clz, String json) throws IOException {
+        return (TBase)this.objectMapper.readValue(json, clz);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeDeserializer.java
new file mode 100644
index 0000000..c0b4252
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.appcatalog.idot;
+
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class InputDataObjectTypeDeserializer extends
+        AbstractThriftDeserializer<InputDataObjectType._Fields, InputDataObjectType> {
+
+    @Override
+    protected InputDataObjectType._Fields getField(final String fieldName) {
+        return InputDataObjectType._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected InputDataObjectType newInstance() {
+        return new InputDataObjectType();
+    }
+
+    @Override
+    protected void validate(final InputDataObjectType instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeSerializer.java
new file mode 100644
index 0000000..23ba9a4
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.appcatalog.idot;
+
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class InputDataObjectTypeSerializer extends
+        AbstractThriftSerializer<InputDataObjectType._Fields, InputDataObjectType> {
+    private final static Logger logger = LoggerFactory.getLogger(InputDataObjectTypeSerializer.class);
+
+    @Override
+    protected InputDataObjectType._Fields[] getFieldValues() {
+        return InputDataObjectType._Fields.values();
+    }
+
+    @Override
+    protected Class<InputDataObjectType> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeDeserializer.java
new file mode 100644
index 0000000..8eb9dda
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.appcatalog.odot;
+
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class OutputDataObjectTypeDeserializer extends
+        AbstractThriftDeserializer<OutputDataObjectType._Fields, OutputDataObjectType> {
+
+    @Override
+    protected OutputDataObjectType._Fields getField(final String fieldName) {
+        return OutputDataObjectType._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected OutputDataObjectType newInstance() {
+        return new OutputDataObjectType();
+    }
+
+    @Override
+    protected void validate(final OutputDataObjectType instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeSerializer.java
new file mode 100644
index 0000000..26bc349
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.appcatalog.odot;
+
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class OutputDataObjectTypeSerializer extends
+        AbstractThriftSerializer<OutputDataObjectType._Fields, OutputDataObjectType> {
+    private final static Logger logger = LoggerFactory.getLogger(OutputDataObjectTypeSerializer.class);
+
+    @Override
+    protected OutputDataObjectType._Fields[] getFieldValues() {
+        return OutputDataObjectType._Fields.values();
+    }
+
+    @Override
+    protected Class<OutputDataObjectType> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentDeserializer.java
new file mode 100644
index 0000000..21fed5b
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment;
+
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ExperimentDeserializer extends
+        AbstractThriftDeserializer<Experiment._Fields, Experiment> {
+
+    @Override
+    protected Experiment._Fields getField(final String fieldName) {
+        return Experiment._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected Experiment newInstance() {
+        return new Experiment();
+    }
+
+    @Override
+    protected void validate(final Experiment instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentSerializer.java
new file mode 100644
index 0000000..96d07a3
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment;
+
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ExperimentSerializer extends
+        AbstractThriftSerializer<Experiment._Fields, Experiment> {
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentSerializer.class);
+
+    @Override
+    protected Experiment._Fields[] getFieldValues() {
+        return Experiment._Fields.values();
+    }
+
+    @Override
+    protected Class<Experiment> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingDeserializer.java
new file mode 100644
index 0000000..6de28f3
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.aidh;
+
+import org.apache.airavata.model.workspace.experiment.AdvancedInputDataHandling;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class AdvancedInputDataHandlingDeserializer extends
+        AbstractThriftDeserializer<AdvancedInputDataHandling._Fields, AdvancedInputDataHandling> {
+
+    @Override
+    protected AdvancedInputDataHandling._Fields getField(final String fieldName) {
+        return AdvancedInputDataHandling._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected AdvancedInputDataHandling newInstance() {
+        return new AdvancedInputDataHandling();
+    }
+
+    @Override
+    protected void validate(final AdvancedInputDataHandling instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingSerializer.java
new file mode 100644
index 0000000..2f01375
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.aidh;
+
+import org.apache.airavata.model.workspace.experiment.AdvancedInputDataHandling;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AdvancedInputDataHandlingSerializer extends
+        AbstractThriftSerializer<AdvancedInputDataHandling._Fields, AdvancedInputDataHandling> {
+    private final static Logger logger = LoggerFactory.getLogger(AdvancedInputDataHandlingSerializer.class);
+
+    @Override
+    protected AdvancedInputDataHandling._Fields[] getFieldValues() {
+        return AdvancedInputDataHandling._Fields.values();
+    }
+
+    @Override
+    protected Class<AdvancedInputDataHandling> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingDeserializer.java
new file mode 100644
index 0000000..071d31b
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.aodh;
+
+import org.apache.airavata.model.workspace.experiment.AdvancedOutputDataHandling;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class AdvancedOutputDataHandlingDeserializer extends
+        AbstractThriftDeserializer<AdvancedOutputDataHandling._Fields, AdvancedOutputDataHandling> {
+
+    @Override
+    protected AdvancedOutputDataHandling._Fields getField(final String fieldName) {
+        return AdvancedOutputDataHandling._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected AdvancedOutputDataHandling newInstance() {
+        return new AdvancedOutputDataHandling();
+    }
+
+    @Override
+    protected void validate(final AdvancedOutputDataHandling instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingSerializer.java
new file mode 100644
index 0000000..c675ce0
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.aodh;
+
+import org.apache.airavata.model.workspace.experiment.AdvancedOutputDataHandling;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AdvancedOutputDataHandlingSerializer extends
+        AbstractThriftSerializer<AdvancedOutputDataHandling._Fields, AdvancedOutputDataHandling> {
+    private final static Logger logger = LoggerFactory.getLogger(AdvancedOutputDataHandlingSerializer.class);
+
+    @Override
+    protected AdvancedOutputDataHandling._Fields[] getFieldValues() {
+        return AdvancedOutputDataHandling._Fields.values();
+    }
+
+    @Override
+    protected Class<AdvancedOutputDataHandling> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusDeserializer.java
new file mode 100644
index 0000000..e08c71d
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.appstatus;
+
+import org.apache.airavata.model.workspace.experiment.ApplicationStatus;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ApplicationStatusDeserializer extends
+        AbstractThriftDeserializer<ApplicationStatus._Fields, ApplicationStatus> {
+
+    @Override
+    protected ApplicationStatus._Fields getField(final String fieldName) {
+        return ApplicationStatus._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected ApplicationStatus newInstance() {
+        return new ApplicationStatus();
+    }
+
+    @Override
+    protected void validate(final ApplicationStatus instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusSerializer.java
new file mode 100644
index 0000000..f428a58
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusSerializer.java
@@ -0,0 +1,42 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.appstatus;
+
+import org.apache.airavata.model.workspace.experiment.ApplicationStatus;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ApplicationStatusSerializer extends
+        AbstractThriftSerializer<ApplicationStatus._Fields, ApplicationStatus> {
+    private final static Logger logger = LoggerFactory.getLogger(
+            ApplicationStatusSerializer.class);
+
+    @Override
+    protected ApplicationStatus._Fields[] getFieldValues() {
+        return ApplicationStatus._Fields.values();
+    }
+
+    @Override
+    protected Class<ApplicationStatus> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingDeserializer.java
new file mode 100644
index 0000000..5ab463e
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.crsh;
+
+import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ComputationalResourceSchedulingDeserializer extends
+        AbstractThriftDeserializer<ComputationalResourceScheduling._Fields, ComputationalResourceScheduling> {
+
+    @Override
+    protected ComputationalResourceScheduling._Fields getField(final String fieldName) {
+        return ComputationalResourceScheduling._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected ComputationalResourceScheduling newInstance() {
+        return new ComputationalResourceScheduling();
+    }
+
+    @Override
+    protected void validate(final ComputationalResourceScheduling instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingSerializer.java
new file mode 100644
index 0000000..29d2fff
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.crsh;
+
+import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ComputationalResourceSchedulingSerializer extends
+        AbstractThriftSerializer<ComputationalResourceScheduling._Fields, ComputationalResourceScheduling> {
+    private final static Logger logger = LoggerFactory.getLogger(ComputationalResourceSchedulingSerializer.class);
+
+    @Override
+    protected ComputationalResourceScheduling._Fields[] getFieldValues() {
+        return ComputationalResourceScheduling._Fields.values();
+    }
+
+    @Override
+    protected Class<ComputationalResourceScheduling> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsDeserializer.java
new file mode 100644
index 0000000..b0b7a46
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.datatrdetails;
+
+import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class DataTransferDetailsDeserializer extends
+        AbstractThriftDeserializer<DataTransferDetails._Fields, DataTransferDetails> {
+
+    @Override
+    protected DataTransferDetails._Fields getField(final String fieldName) {
+        return DataTransferDetails._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected DataTransferDetails newInstance() {
+        return new DataTransferDetails();
+    }
+
+    @Override
+    protected void validate(final DataTransferDetails instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsSerializer.java
new file mode 100644
index 0000000..c7b9106
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.datatrdetails;
+
+import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DataTransferDetailsSerializer extends
+        AbstractThriftSerializer<DataTransferDetails._Fields, DataTransferDetails> {
+    private final static Logger logger = LoggerFactory.getLogger(DataTransferDetailsSerializer.class);
+
+    @Override
+    protected DataTransferDetails._Fields[] getFieldValues() {
+        return DataTransferDetails._Fields.values();
+    }
+
+    @Override
+    protected Class<DataTransferDetails> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsDeserializer.java
new file mode 100644
index 0000000..fb64042
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.errdetails;
+
+import org.apache.airavata.model.workspace.experiment.ErrorDetails;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ErrorDetailsDeserializer extends
+        AbstractThriftDeserializer<ErrorDetails._Fields, ErrorDetails> {
+
+    @Override
+    protected ErrorDetails._Fields getField(final String fieldName) {
+        return ErrorDetails._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected ErrorDetails newInstance() {
+        return new ErrorDetails();
+    }
+
+    @Override
+    protected void validate(final ErrorDetails instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsSerializer.java
new file mode 100644
index 0000000..de374d2
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.errdetails;
+
+import org.apache.airavata.model.workspace.experiment.ErrorDetails;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ErrorDetailsSerializer extends
+        AbstractThriftSerializer<ErrorDetails._Fields, ErrorDetails> {
+    private final static Logger logger = LoggerFactory.getLogger(ErrorDetailsSerializer.class);
+
+    @Override
+    protected ErrorDetails._Fields[] getFieldValues() {
+        return ErrorDetails._Fields.values();
+    }
+
+    @Override
+    protected Class<ErrorDetails> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusDeserializer.java
new file mode 100644
index 0000000..bd8066d
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.expstatus;
+
+import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ExperimentStatusDeserializer extends
+        AbstractThriftDeserializer<ExperimentStatus._Fields, ExperimentStatus> {
+
+    @Override
+    protected ExperimentStatus._Fields getField(final String fieldName) {
+        return ExperimentStatus._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected ExperimentStatus newInstance() {
+        return new ExperimentStatus();
+    }
+
+    @Override
+    protected void validate(final ExperimentStatus instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusSerializer.java
new file mode 100644
index 0000000..2121e16
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.expstatus;
+
+import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ExperimentStatusSerializer extends
+        AbstractThriftSerializer<ExperimentStatus._Fields, ExperimentStatus> {
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentStatusSerializer.class);
+
+    @Override
+    protected ExperimentStatus._Fields[] getFieldValues() {
+        return ExperimentStatus._Fields.values();
+    }
+
+    @Override
+    protected Class<ExperimentStatus> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummaryDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummaryDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummaryDeserializer.java
new file mode 100644
index 0000000..7d9ce35
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummaryDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.expsummary;
+
+import org.apache.airavata.model.workspace.experiment.ExperimentSummary;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ExperimentSummaryDeserializer extends
+        AbstractThriftDeserializer<ExperimentSummary._Fields, ExperimentSummary> {
+
+    @Override
+    protected ExperimentSummary._Fields getField(final String fieldName) {
+        return ExperimentSummary._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected ExperimentSummary newInstance() {
+        return new ExperimentSummary();
+    }
+
+    @Override
+    protected void validate(final ExperimentSummary instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummarySerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummarySerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummarySerializer.java
new file mode 100644
index 0000000..0fbd64d
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummarySerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.expsummary;
+
+import org.apache.airavata.model.workspace.experiment.ExperimentSummary;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ExperimentSummarySerializer extends
+        AbstractThriftSerializer<ExperimentSummary._Fields, ExperimentSummary> {
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentSummarySerializer.class);
+
+    @Override
+    protected ExperimentSummary._Fields[] getFieldValues() {
+        return ExperimentSummary._Fields.values();
+    }
+
+    @Override
+    protected Class<ExperimentSummary> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsDeserializer.java
new file mode 100644
index 0000000..9805751
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.jobdetails;
+
+import org.apache.airavata.model.workspace.experiment.JobDetails;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class JobDetailsDeserializer extends
+        AbstractThriftDeserializer<JobDetails._Fields, JobDetails> {
+
+    @Override
+    protected JobDetails._Fields getField(final String fieldName) {
+        return JobDetails._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected JobDetails newInstance() {
+        return new JobDetails();
+    }
+
+    @Override
+    protected void validate(final JobDetails instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsSerializer.java
new file mode 100644
index 0000000..064f642
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.jobdetails;
+
+import org.apache.airavata.model.workspace.experiment.JobDetails;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class JobDetailsSerializer extends
+        AbstractThriftSerializer<JobDetails._Fields, JobDetails> {
+    private final static Logger logger = LoggerFactory.getLogger(JobDetailsSerializer.class);
+
+    @Override
+    protected JobDetails._Fields[] getFieldValues() {
+        return JobDetails._Fields.values();
+    }
+
+    @Override
+    protected Class<JobDetails> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusDeserializer.java
new file mode 100644
index 0000000..9b149a1
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.jobstatus;
+
+import org.apache.airavata.model.workspace.experiment.JobStatus;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class JobStatusDeserializer extends
+        AbstractThriftDeserializer<JobStatus._Fields, JobStatus> {
+
+    @Override
+    protected JobStatus._Fields getField(final String fieldName) {
+        return JobStatus._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected JobStatus newInstance() {
+        return new JobStatus();
+    }
+
+    @Override
+    protected void validate(final JobStatus instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusSerializer.java
new file mode 100644
index 0000000..e8c4dc5
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.jobstatus;
+
+import org.apache.airavata.model.workspace.experiment.JobStatus;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class JobStatusSerializer extends
+        AbstractThriftSerializer<JobStatus._Fields, JobStatus> {
+    private final static Logger logger = LoggerFactory.getLogger(JobStatusSerializer.class);
+
+    @Override
+    protected JobStatus._Fields[] getFieldValues() {
+        return JobStatus._Fields.values();
+    }
+
+    @Override
+    protected Class<JobStatus> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file


[37/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingSerializer.java
deleted file mode 100644
index 29d2fff..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.crsh;
-
-import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ComputationalResourceSchedulingSerializer extends
-        AbstractThriftSerializer<ComputationalResourceScheduling._Fields, ComputationalResourceScheduling> {
-    private final static Logger logger = LoggerFactory.getLogger(ComputationalResourceSchedulingSerializer.class);
-
-    @Override
-    protected ComputationalResourceScheduling._Fields[] getFieldValues() {
-        return ComputationalResourceScheduling._Fields.values();
-    }
-
-    @Override
-    protected Class<ComputationalResourceScheduling> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsDeserializer.java
deleted file mode 100644
index b0b7a46..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.datatrdetails;
-
-import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class DataTransferDetailsDeserializer extends
-        AbstractThriftDeserializer<DataTransferDetails._Fields, DataTransferDetails> {
-
-    @Override
-    protected DataTransferDetails._Fields getField(final String fieldName) {
-        return DataTransferDetails._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected DataTransferDetails newInstance() {
-        return new DataTransferDetails();
-    }
-
-    @Override
-    protected void validate(final DataTransferDetails instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsSerializer.java
deleted file mode 100644
index c7b9106..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/datatrdetails/DataTransferDetailsSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.datatrdetails;
-
-import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DataTransferDetailsSerializer extends
-        AbstractThriftSerializer<DataTransferDetails._Fields, DataTransferDetails> {
-    private final static Logger logger = LoggerFactory.getLogger(DataTransferDetailsSerializer.class);
-
-    @Override
-    protected DataTransferDetails._Fields[] getFieldValues() {
-        return DataTransferDetails._Fields.values();
-    }
-
-    @Override
-    protected Class<DataTransferDetails> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsDeserializer.java
deleted file mode 100644
index fb64042..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.errdetails;
-
-import org.apache.airavata.model.workspace.experiment.ErrorDetails;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class ErrorDetailsDeserializer extends
-        AbstractThriftDeserializer<ErrorDetails._Fields, ErrorDetails> {
-
-    @Override
-    protected ErrorDetails._Fields getField(final String fieldName) {
-        return ErrorDetails._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected ErrorDetails newInstance() {
-        return new ErrorDetails();
-    }
-
-    @Override
-    protected void validate(final ErrorDetails instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsSerializer.java
deleted file mode 100644
index de374d2..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/errdetails/ErrorDetailsSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.errdetails;
-
-import org.apache.airavata.model.workspace.experiment.ErrorDetails;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ErrorDetailsSerializer extends
-        AbstractThriftSerializer<ErrorDetails._Fields, ErrorDetails> {
-    private final static Logger logger = LoggerFactory.getLogger(ErrorDetailsSerializer.class);
-
-    @Override
-    protected ErrorDetails._Fields[] getFieldValues() {
-        return ErrorDetails._Fields.values();
-    }
-
-    @Override
-    protected Class<ErrorDetails> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusDeserializer.java
deleted file mode 100644
index bd8066d..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.expstatus;
-
-import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class ExperimentStatusDeserializer extends
-        AbstractThriftDeserializer<ExperimentStatus._Fields, ExperimentStatus> {
-
-    @Override
-    protected ExperimentStatus._Fields getField(final String fieldName) {
-        return ExperimentStatus._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected ExperimentStatus newInstance() {
-        return new ExperimentStatus();
-    }
-
-    @Override
-    protected void validate(final ExperimentStatus instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusSerializer.java
deleted file mode 100644
index 2121e16..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expstatus/ExperimentStatusSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.expstatus;
-
-import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ExperimentStatusSerializer extends
-        AbstractThriftSerializer<ExperimentStatus._Fields, ExperimentStatus> {
-    private final static Logger logger = LoggerFactory.getLogger(ExperimentStatusSerializer.class);
-
-    @Override
-    protected ExperimentStatus._Fields[] getFieldValues() {
-        return ExperimentStatus._Fields.values();
-    }
-
-    @Override
-    protected Class<ExperimentStatus> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummaryDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummaryDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummaryDeserializer.java
deleted file mode 100644
index 7d9ce35..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummaryDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.expsummary;
-
-import org.apache.airavata.model.workspace.experiment.ExperimentSummary;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class ExperimentSummaryDeserializer extends
-        AbstractThriftDeserializer<ExperimentSummary._Fields, ExperimentSummary> {
-
-    @Override
-    protected ExperimentSummary._Fields getField(final String fieldName) {
-        return ExperimentSummary._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected ExperimentSummary newInstance() {
-        return new ExperimentSummary();
-    }
-
-    @Override
-    protected void validate(final ExperimentSummary instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummarySerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummarySerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummarySerializer.java
deleted file mode 100644
index 0fbd64d..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/expsummary/ExperimentSummarySerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.expsummary;
-
-import org.apache.airavata.model.workspace.experiment.ExperimentSummary;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ExperimentSummarySerializer extends
-        AbstractThriftSerializer<ExperimentSummary._Fields, ExperimentSummary> {
-    private final static Logger logger = LoggerFactory.getLogger(ExperimentSummarySerializer.class);
-
-    @Override
-    protected ExperimentSummary._Fields[] getFieldValues() {
-        return ExperimentSummary._Fields.values();
-    }
-
-    @Override
-    protected Class<ExperimentSummary> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsDeserializer.java
deleted file mode 100644
index 9805751..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.jobdetails;
-
-import org.apache.airavata.model.workspace.experiment.JobDetails;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class JobDetailsDeserializer extends
-        AbstractThriftDeserializer<JobDetails._Fields, JobDetails> {
-
-    @Override
-    protected JobDetails._Fields getField(final String fieldName) {
-        return JobDetails._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected JobDetails newInstance() {
-        return new JobDetails();
-    }
-
-    @Override
-    protected void validate(final JobDetails instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsSerializer.java
deleted file mode 100644
index 064f642..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobdetails/JobDetailsSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.jobdetails;
-
-import org.apache.airavata.model.workspace.experiment.JobDetails;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class JobDetailsSerializer extends
-        AbstractThriftSerializer<JobDetails._Fields, JobDetails> {
-    private final static Logger logger = LoggerFactory.getLogger(JobDetailsSerializer.class);
-
-    @Override
-    protected JobDetails._Fields[] getFieldValues() {
-        return JobDetails._Fields.values();
-    }
-
-    @Override
-    protected Class<JobDetails> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusDeserializer.java
deleted file mode 100644
index 9b149a1..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.jobstatus;
-
-import org.apache.airavata.model.workspace.experiment.JobStatus;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class JobStatusDeserializer extends
-        AbstractThriftDeserializer<JobStatus._Fields, JobStatus> {
-
-    @Override
-    protected JobStatus._Fields getField(final String fieldName) {
-        return JobStatus._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected JobStatus newInstance() {
-        return new JobStatus();
-    }
-
-    @Override
-    protected void validate(final JobStatus instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusSerializer.java
deleted file mode 100644
index e8c4dc5..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/jobstatus/JobStatusSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.jobstatus;
-
-import org.apache.airavata.model.workspace.experiment.JobStatus;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class JobStatusSerializer extends
-        AbstractThriftSerializer<JobStatus._Fields, JobStatus> {
-    private final static Logger logger = LoggerFactory.getLogger(JobStatusSerializer.class);
-
-    @Override
-    protected JobStatus._Fields[] getFieldValues() {
-        return JobStatus._Fields.values();
-    }
-
-    @Override
-    protected Class<JobStatus> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsDeserializer.java
deleted file mode 100644
index 03399f8..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.qosp;
-
-import org.apache.airavata.model.workspace.experiment.QualityOfServiceParams;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class QualityOfServiceParamsDeserializer extends
-        AbstractThriftDeserializer<QualityOfServiceParams._Fields, QualityOfServiceParams> {
-
-    @Override
-    protected QualityOfServiceParams._Fields getField(final String fieldName) {
-        return QualityOfServiceParams._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected QualityOfServiceParams newInstance() {
-        return new QualityOfServiceParams();
-    }
-
-    @Override
-    protected void validate(final QualityOfServiceParams instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsSerializer.java
deleted file mode 100644
index c6c6d05..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.qosp;
-
-import org.apache.airavata.model.workspace.experiment.QualityOfServiceParams;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class QualityOfServiceParamsSerializer extends
-        AbstractThriftSerializer<QualityOfServiceParams._Fields, QualityOfServiceParams> {
-    private final static Logger logger = LoggerFactory.getLogger(QualityOfServiceParamsSerializer.class);
-
-    @Override
-    protected QualityOfServiceParams._Fields[] getFieldValues() {
-        return QualityOfServiceParams._Fields.values();
-    }
-
-    @Override
-    protected Class<QualityOfServiceParams> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsDeserializer.java
deleted file mode 100644
index cb710c9..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.taskdetails;
-
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class TaskDetailsDeserializer extends
-        AbstractThriftDeserializer<TaskDetails._Fields, TaskDetails> {
-
-    @Override
-    protected TaskDetails._Fields getField(final String fieldName) {
-        return TaskDetails._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected TaskDetails newInstance() {
-        return new TaskDetails();
-    }
-
-    @Override
-    protected void validate(final TaskDetails instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsSerializer.java
deleted file mode 100644
index ccfe1b4..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.taskdetails;
-
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TaskDetailsSerializer extends
-        AbstractThriftSerializer<TaskDetails._Fields, TaskDetails> {
-    private final static Logger logger = LoggerFactory.getLogger(TaskDetailsSerializer.class);
-
-    @Override
-    protected TaskDetails._Fields[] getFieldValues() {
-        return TaskDetails._Fields.values();
-    }
-
-    @Override
-    protected Class<TaskDetails> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusDeserializer.java
deleted file mode 100644
index d198242..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.taskstatus;
-
-import org.apache.airavata.model.workspace.experiment.TaskStatus;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class TaskStatusDeserializer extends
-        AbstractThriftDeserializer<TaskStatus._Fields, TaskStatus> {
-
-    @Override
-    protected TaskStatus._Fields getField(final String fieldName) {
-        return TaskStatus._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected TaskStatus newInstance() {
-        return new TaskStatus();
-    }
-
-    @Override
-    protected void validate(final TaskStatus instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusSerializer.java
deleted file mode 100644
index b09095e..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.taskstatus;
-
-import org.apache.airavata.model.workspace.experiment.TaskStatus;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TaskStatusSerializer extends
-        AbstractThriftSerializer<TaskStatus._Fields, TaskStatus> {
-    private final static Logger logger = LoggerFactory.getLogger(TaskStatusSerializer.class);
-
-    @Override
-    protected TaskStatus._Fields[] getFieldValues() {
-        return TaskStatus._Fields.values();
-    }
-
-    @Override
-    protected Class<TaskStatus> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusDeserializer.java
deleted file mode 100644
index 5662715..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.trstatus;
-
-import org.apache.airavata.model.workspace.experiment.TransferStatus;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class TransferStatusDeserializer extends
-        AbstractThriftDeserializer<TransferStatus._Fields, TransferStatus> {
-
-    @Override
-    protected TransferStatus._Fields getField(final String fieldName) {
-        return TransferStatus._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected TransferStatus newInstance() {
-        return new TransferStatus();
-    }
-
-    @Override
-    protected void validate(final TransferStatus instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusSerializer.java
deleted file mode 100644
index bf94779..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.trstatus;
-
-import org.apache.airavata.model.workspace.experiment.TransferStatus;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TransferStatusSerializer extends
-        AbstractThriftSerializer<TransferStatus._Fields, TransferStatus> {
-    private final static Logger logger = LoggerFactory.getLogger(TransferStatusSerializer.class);
-
-    @Override
-    protected TransferStatus._Fields[] getFieldValues() {
-        return TransferStatus._Fields.values();
-    }
-
-    @Override
-    protected Class<TransferStatus> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataDeserializer.java
deleted file mode 100644
index aa8c7a2..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.ucdata;
-
-import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class UserConfigurationDataDeserializer extends
-        AbstractThriftDeserializer<UserConfigurationData._Fields, UserConfigurationData> {
-
-    @Override
-    protected UserConfigurationData._Fields getField(final String fieldName) {
-        return UserConfigurationData._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected UserConfigurationData newInstance() {
-        return new UserConfigurationData();
-    }
-
-    @Override
-    protected void validate(final UserConfigurationData instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataSerializer.java
deleted file mode 100644
index dca810d..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.ucdata;
-
-import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class UserConfigurationDataSerializer extends
-        AbstractThriftSerializer<UserConfigurationData._Fields, UserConfigurationData> {
-    private final static Logger logger = LoggerFactory.getLogger(UserConfigurationDataSerializer.class);
-
-    @Override
-    protected UserConfigurationData._Fields[] getFieldValues() {
-        return UserConfigurationData._Fields.values();
-    }
-
-    @Override
-    protected Class<UserConfigurationData> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsDeserializer.java
deleted file mode 100644
index f13c9dc..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.validationrslt;
-
-import org.apache.airavata.model.workspace.experiment.ValidationResults;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class ValidationResultsDeserializer extends
-        AbstractThriftDeserializer<ValidationResults._Fields, ValidationResults> {
-
-    @Override
-    protected ValidationResults._Fields getField(final String fieldName) {
-        return ValidationResults._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected ValidationResults newInstance() {
-        return new ValidationResults();
-    }
-
-    @Override
-    protected void validate(final ValidationResults instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsSerializer.java
deleted file mode 100644
index 6d6dd64..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.validationrslt;
-
-import org.apache.airavata.model.workspace.experiment.ValidationResults;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ValidationResultsSerializer extends
-        AbstractThriftSerializer<ValidationResults._Fields, ValidationResults> {
-    private final static Logger logger = LoggerFactory.getLogger(ValidationResultsSerializer.class);
-
-    @Override
-    protected ValidationResults._Fields[] getFieldValues() {
-        return ValidationResults._Fields.values();
-    }
-
-    @Override
-    protected Class<ValidationResults> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultDeserializer.java
deleted file mode 100644
index 333f9eb..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.validatorrslt;
-
-import org.apache.airavata.model.error.ValidatorResult;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class ValidatorResultDeserializer extends
-        AbstractThriftDeserializer<ValidatorResult._Fields, ValidatorResult> {
-
-    @Override
-    protected ValidatorResult._Fields getField(final String fieldName) {
-        return ValidatorResult._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected ValidatorResult newInstance() {
-        return new ValidatorResult();
-    }
-
-    @Override
-    protected void validate(final ValidatorResult instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultSerializer.java
deleted file mode 100644
index c7e5c6c..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.validatorrslt;
-
-import org.apache.airavata.model.error.ValidatorResult;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ValidatorResultSerializer extends
-        AbstractThriftSerializer<ValidatorResult._Fields, ValidatorResult> {
-    private final static Logger logger = LoggerFactory.getLogger(ValidatorResultSerializer.class);
-
-    @Override
-    protected ValidatorResult._Fields[] getFieldValues() {
-        return ValidatorResult._Fields.values();
-    }
-
-    @Override
-    protected Class<ValidatorResult> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsDeserializer.java
deleted file mode 100644
index a51bcee..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.wfnd;
-
-import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class WorkflowNodeDetailsDeserializer extends
-        AbstractThriftDeserializer<WorkflowNodeDetails._Fields, WorkflowNodeDetails> {
-
-    @Override
-    protected WorkflowNodeDetails._Fields getField(final String fieldName) {
-        return WorkflowNodeDetails._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected WorkflowNodeDetails newInstance() {
-        return new WorkflowNodeDetails();
-    }
-
-    @Override
-    protected void validate(final WorkflowNodeDetails instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsSerializer.java
deleted file mode 100644
index cfdef1a..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.wfnd;
-
-import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class WorkflowNodeDetailsSerializer extends
-        AbstractThriftSerializer<WorkflowNodeDetails._Fields, WorkflowNodeDetails> {
-    private final static Logger logger = LoggerFactory.getLogger(WorkflowNodeDetailsSerializer.class);
-
-    @Override
-    protected WorkflowNodeDetails._Fields[] getFieldValues() {
-        return WorkflowNodeDetails._Fields.values();
-    }
-
-    @Override
-    protected Class<WorkflowNodeDetails> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusDeserializer.java
deleted file mode 100644
index 92b0047..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.wfns;
-
-import org.apache.airavata.model.workspace.experiment.WorkflowNodeStatus;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class WorkflowNodeStatusDeserializer extends
-        AbstractThriftDeserializer<WorkflowNodeStatus._Fields, WorkflowNodeStatus> {
-
-    @Override
-    protected WorkflowNodeStatus._Fields getField(final String fieldName) {
-        return WorkflowNodeStatus._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected WorkflowNodeStatus newInstance() {
-        return new WorkflowNodeStatus();
-    }
-
-    @Override
-    protected void validate(final WorkflowNodeStatus instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusSerializer.java
deleted file mode 100644
index 16dc293..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.wfns;
-
-import org.apache.airavata.model.workspace.experiment.WorkflowNodeStatus;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class WorkflowNodeStatusSerializer extends
-        AbstractThriftSerializer<WorkflowNodeStatus._Fields, WorkflowNodeStatus> {
-    private final static Logger logger = LoggerFactory.getLogger(WorkflowNodeStatusSerializer.class);
-
-    @Override
-    protected WorkflowNodeStatus._Fields[] getFieldValues() {
-        return WorkflowNodeStatus._Fields.values();
-    }
-
-    @Override
-    protected Class<WorkflowNodeStatus> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewayDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewayDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewayDeserializer.java
deleted file mode 100644
index 32c929b..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewayDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.gateway;
-
-import org.apache.airavata.model.workspace.Gateway;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class GatewayDeserializer extends
-        AbstractThriftDeserializer<Gateway._Fields, Gateway> {
-
-    @Override
-    protected Gateway._Fields getField(final String fieldName) {
-        return Gateway._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected Gateway newInstance() {
-        return new Gateway();
-    }
-
-    @Override
-    protected void validate(final Gateway instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewaySerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewaySerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewaySerializer.java
deleted file mode 100644
index f863e7e..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewaySerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.gateway;
-
-import org.apache.airavata.model.workspace.Gateway;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class GatewaySerializer extends
-        AbstractThriftSerializer<Gateway._Fields, Gateway> {
-    private final static Logger logger = LoggerFactory.getLogger(GatewaySerializer.class);
-
-    @Override
-    protected Gateway._Fields[] getFieldValues() {
-        return Gateway._Fields.values();
-    }
-
-    @Override
-    protected Class<Gateway> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupDeserializer.java
deleted file mode 100644
index 6ed949c..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.group;
-
-import org.apache.airavata.model.workspace.Group;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class GroupDeserializer extends
-        AbstractThriftDeserializer<Group._Fields, Group> {
-
-    @Override
-    protected Group._Fields getField(final String fieldName) {
-        return Group._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected Group newInstance() {
-        return new Group();
-    }
-
-    @Override
-    protected void validate(final Group instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file


[26/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/ProjectRepository.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/ProjectRepository.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/ProjectRepository.java
new file mode 100644
index 0000000..f7a7d73
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/ProjectRepository.java
@@ -0,0 +1,191 @@
+/*
+ *
+ * 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.persistance.registry.mongo.repository;
+
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.model.workspace.User;
+import org.apache.airavata.persistance.registry.mongo.dao.ProjectDao;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.ResultOrderType;
+import org.apache.airavata.registry.cpi.utils.Constants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.*;
+
+public class ProjectRepository {
+    private final static Logger logger = LoggerFactory.getLogger(ProjectRepository.class);
+
+    private Gateway gateway;
+    private User user;
+
+    private ProjectDao projectDao;
+    private GatewayRepository gatewayRepository;
+    private UserRepository userRepository;
+
+    public ProjectRepository(Gateway gateway, User user) throws RegistryException {
+        this.projectDao = new ProjectDao();
+        this.userRepository = new UserRepository();
+
+        if(gatewayRepository.getGateway(gateway.getGatewayId()) == null){
+            gatewayRepository.addGateway(gateway);
+        }
+        //Todo check for gateway workers
+
+        this.gateway = gateway;
+        this.user = user;
+    }
+
+    public String addProject (Project project, String gatewayId) throws RegistryException{
+        try {
+            if (!userRepository.isUserExists(project.getOwner())){
+                userRepository.addUser(new User(project.getOwner()));
+            }
+            project.setProjectId(getProjectId(project.getName()));
+            projectDao.createProject(project);
+            return project.getProjectId();
+        }catch (Exception e){
+            logger.error("Error while saving project to registry", e);
+           throw new RegistryException(e);
+        }
+    }
+
+    private String getProjectId (String projectName){
+        String pro = projectName.replaceAll("\\s", "");
+        return pro + "_" + UUID.randomUUID();
+    }
+
+    public void updateProject (Project project, String projectId) throws RegistryException{
+        try {
+            //check project owner is a gateway user else add gateway user
+            projectDao.updateProject(project);
+        }catch (Exception e){
+            logger.error("Error while saving project to registry", e);
+           throw new RegistryException(e);
+        }
+    }
+
+    public Project getProject (String projectId) throws RegistryException{
+        try {
+            return projectDao.getProject(projectId);
+        }catch (Exception e){
+            logger.error("Error while retrieving project from registry", e);
+           throw new RegistryException(e);
+        }
+    }
+
+    /**
+     * Get list of projects of the user
+     * @param fieldName
+     * @param value
+     * @return
+     * @throws RegistryException
+     */
+    public List<Project> getProjectList (String fieldName, Object value) throws RegistryException{
+        return getProjectList(fieldName, value, -1, -1, null, null);
+    }
+
+    /**
+     * Get projects list with pagination and result ordering
+     * @param fieldName
+     * @param value
+     * @param limit
+     * @param offset
+     * @param orderByIdentifier
+     * @param resultOrderType
+     * @return
+     * @throws RegistryException
+     */
+    public List<Project> getProjectList (String fieldName, Object value, int limit, int offset,
+                                         Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException{
+        try {
+                Map<String, String> filters = new HashMap();
+                filters.put(fieldName, (String)value);
+                return  projectDao.searchProjects(filters, limit, offset, orderByIdentifier, resultOrderType);
+        }catch (Exception e){
+            logger.error("Error while retrieving project from registry", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    /**
+     * To search the projects of user with the given filter criteria and retrieve the results with
+     * pagination support. Results can be ordered based on an identifier (i.e column) either ASC or
+     * DESC.
+     *
+     * @param filters
+     * @param limit
+     * @param offset
+     * @param orderByIdentifier
+     * @param resultOrderType
+     * @return
+     * @throws RegistryException
+     */
+    public List<Project> searchProjects(Map<String, String> filters, int limit,
+            int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+          try {
+                return  projectDao.searchProjects(filters, limit, offset, orderByIdentifier, resultOrderType);
+            }catch (Exception e){
+                logger.error("Error while retrieving project from registry", e);
+                throw new RegistryException(e);
+            }
+
+    }
+
+    public List<String> getProjectIds (String fieldName, Object value) throws RegistryException{
+        List<String> projectIds = new ArrayList<String>();
+        try {
+            if (fieldName.equals(Constants.FieldConstants.ProjectConstants.OWNER)){
+                Map<String, String> filters = new HashMap();
+                filters.put(fieldName, (String)value);
+                projectDao.searchProjects(filters, -1, -1, null, null).stream()
+                .forEach(pr->projectIds.add(pr.getProjectId()));
+                return projectIds;
+            }
+        }catch (Exception e){
+            logger.error("Error while retrieving projects from registry", e);
+           throw new RegistryException(e);
+        }
+        return projectIds;
+    }
+
+    public void removeProject (String projectId) throws RegistryException {
+        try {
+            Project project = new Project();
+            project.setProjectId(projectId);
+            projectDao.deleteProject(project);
+        } catch (Exception e) {
+            logger.error("Error while removing the project..", e);
+           throw new RegistryException(e);
+        }
+    }
+
+    public boolean isProjectExist(String projectId) throws RegistryException {
+        try {
+            return projectDao.getProject(projectId) != null;
+        } catch (Exception e) {
+            logger.error("Error while retrieving project...", e);
+           throw new RegistryException(e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/UserRepository.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/UserRepository.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/UserRepository.java
new file mode 100644
index 0000000..0beeba3
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/UserRepository.java
@@ -0,0 +1,65 @@
+/*
+ *
+ * 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.persistance.registry.mongo.repository;
+
+import org.apache.airavata.model.workspace.User;
+import org.apache.airavata.persistance.registry.mongo.dao.UserDao;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class UserRepository {
+    private final static Logger logger = LoggerFactory.getLogger(UserRepository.class);
+    private UserDao userDao;
+
+    public UserRepository(){
+        this.userDao = new UserDao();
+    }
+
+    public String addUser (User user) throws RegistryException {
+        try {
+            userDao.createUser(user);
+            return user.getUserName();
+        }catch (Exception e){
+            logger.error("Error while saving user to registry", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public User getUser(String userName) throws RegistryException {
+        try {
+            return userDao.getUser(userName);
+        }catch (Exception e){
+            logger.error("Error while retrieving user from registry", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isUserExists(String userName) throws RegistryException {
+        try {
+            return userDao.getUser(userName) != null;
+        }catch (Exception e){
+            logger.error("Error while retrieving user from registry", e);
+            throw new RegistryException(e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/utils/MongoUtil.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/utils/MongoUtil.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/utils/MongoUtil.java
new file mode 100644
index 0000000..996ee23
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/utils/MongoUtil.java
@@ -0,0 +1,70 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.persistance.registry.mongo.utils;
+
+import com.mongodb.DB;
+import com.mongodb.MongoClient;
+import com.mongodb.MongoException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class MongoUtil {
+    private final static Logger logger = LoggerFactory.getLogger(MongoUtil.class);
+
+    private static final int port = 27017;
+    private static final String host = "localhost";
+    private static MongoClient mongoClient = null;
+    private static DB airavataRegistry;
+    public static String AIRAVATA_REGISTRY_NAME = "airavata-registry";
+
+    public static MongoClient getMongoClient() {
+        if (mongoClient == null) {
+            try {
+                mongoClient = new MongoClient(host, port);
+                logger.debug("New Mongo Client created with [" + host + "] and ["
+                        + port + "]");
+            } catch (MongoException e) {
+                logger.error(e.getMessage());
+            }
+        }
+        return mongoClient;
+    }
+
+    public static DB getAiravataRegistry(){
+        if (airavataRegistry == null) {
+            try {
+                airavataRegistry = getMongoClient().getDB(AIRAVATA_REGISTRY_NAME);
+            } catch (MongoException e) {
+                logger.error(e.getMessage());
+            }
+        }
+        return airavataRegistry;
+    }
+
+    public static void dropAiravataRegistry(){
+        try {
+            getMongoClient().dropDatabase(AIRAVATA_REGISTRY_NAME);
+            logger.debug("Dropped Airavata Registry");
+        } catch (MongoException e) {
+            logger.error(e.getMessage());
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/resources/META-INF/persistence.xml b/modules/registry/airavata-mongo-registry/src/main/resources/META-INF/persistence.xml
index 2ba8ce4..6b3d9d3 100644
--- a/modules/registry/airavata-mongo-registry/src/main/resources/META-INF/persistence.xml
+++ b/modules/registry/airavata-mongo-registry/src/main/resources/META-INF/persistence.xml
@@ -23,31 +23,31 @@
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
     <persistence-unit name="airavata_data">
         <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Gateway</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Configuration</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Users</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Gateway_Worker</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Project</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.ProjectUser</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Notification_Email</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Input</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Output</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.WorkflowNodeDetail</class>
-        <class>org.apache.airavata.persistance.registry.jpa.model.TaskDetail</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.ErrorDetail</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.ApplicationInput</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.ApplicationOutput</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.NodeInput</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.NodeOutput</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.JobDetail</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.DataTransferDetail</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.Status</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.ExperimentConfigData</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.Computational_Resource_Scheduling</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.AdvancedInputDataHandling</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.AdvancedOutputDataHandling</class>
-		<class>org.apache.airavata.persistance.registry.jpa.model.QosParam</class>
+        <class>org.apache.airavata.persistance.registry.mongo.model.Gateway</class>
+        <class>org.apache.airavata.persistance.registry.mongo.model.Configuration</class>
+        <class>org.apache.airavata.persistance.registry.mongo.model.Users</class>
+        <class>org.apache.airavata.persistance.registry.mongo.model.Gateway_Worker</class>
+        <class>org.apache.airavata.persistance.registry.mongo.model.Project</class>
+        <class>org.apache.airavata.persistance.registry.mongo.model.ProjectUser</class>
+        <class>org.apache.airavata.persistance.registry.mongo.model.Experiment</class>
+        <class>org.apache.airavata.persistance.registry.mongo.model.Notification_Email</class>
+        <class>org.apache.airavata.persistance.registry.mongo.model.Experiment_Input</class>
+        <class>org.apache.airavata.persistance.registry.mongo.model.Experiment_Output</class>
+        <class>org.apache.airavata.persistance.registry.mongo.model.WorkflowNodeDetail</class>
+        <class>org.apache.airavata.persistance.registry.mongo.model.TaskDetail</class>
+		<class>org.apache.airavata.persistance.registry.mongo.model.ErrorDetail</class>
+		<class>org.apache.airavata.persistance.registry.mongo.model.ApplicationInput</class>
+		<class>org.apache.airavata.persistance.registry.mongo.model.ApplicationOutput</class>
+		<class>org.apache.airavata.persistance.registry.mongo.model.NodeInput</class>
+		<class>org.apache.airavata.persistance.registry.mongo.model.NodeOutput</class>
+		<class>org.apache.airavata.persistance.registry.mongo.model.JobDetail</class>
+		<class>org.apache.airavata.persistance.registry.mongo.model.DataTransferDetail</class>
+		<class>org.apache.airavata.persistance.registry.mongo.model.Status</class>
+		<class>org.apache.airavata.persistance.registry.mongo.model.ExperimentConfigData</class>
+		<class>org.apache.airavata.persistance.registry.mongo.model.Computational_Resource_Scheduling</class>
+		<class>org.apache.airavata.persistance.registry.mongo.model.AdvancedInputDataHandling</class>
+		<class>org.apache.airavata.persistance.registry.mongo.model.AdvancedOutputDataHandling</class>
+		<class>org.apache.airavata.persistance.registry.mongo.model.QosParam</class>
         <exclude-unlisted-classes>true</exclude-unlisted-classes>
         <properties>
             <property name="openjpa.ConnectionURL"

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/AbstractDaoTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/AbstractDaoTest.java b/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/AbstractDaoTest.java
new file mode 100644
index 0000000..9fe57f7
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/AbstractDaoTest.java
@@ -0,0 +1,37 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.persistence.registry.mongo;
+
+import com.mongodb.MongoClient;
+import org.apache.airavata.persistance.registry.mongo.utils.MongoUtil;
+import org.junit.AfterClass;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AbstractDaoTest {
+    private final static Logger logger = LoggerFactory.getLogger(AbstractDaoTest.class);
+
+    @AfterClass
+    public static void tearDown(){
+        MongoClient mongoClient = MongoUtil.getMongoClient();
+        mongoClient.dropDatabase("airavata-registry");
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/ExperimentDaoTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/ExperimentDaoTest.java b/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/ExperimentDaoTest.java
index 1def159..6f587be 100644
--- a/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/ExperimentDaoTest.java
+++ b/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/ExperimentDaoTest.java
@@ -20,87 +20,41 @@
 */
 package org.apache.airavata.persistence.registry.mongo;
 
-import com.mongodb.MongoClient;
 import junit.framework.Assert;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
 import org.apache.airavata.model.workspace.experiment.*;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.persistance.registry.jpa.mongo.dao.ExperimentDao;
-import org.apache.airavata.persistance.registry.jpa.mongo.utils.MongoUtil;
-import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.persistance.registry.mongo.dao.ExperimentDao;
 import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.RegistryModelType;
-import org.apache.airavata.registry.cpi.ResultOrderType;
 import org.apache.airavata.registry.cpi.utils.Constants;
-import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.BufferedReader;
-import java.io.FileReader;
 import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
+import java.util.*;
 
-public class ExperimentDaoTest {
+public class ExperimentDaoTest extends AbstractDaoTest{
     private final static Logger logger = LoggerFactory.getLogger(ExperimentDaoTest.class);
 
-    private static String gatewayId = "php_reference_gateway";
-
     private static ExperimentDao experimentDao;
+
     @BeforeClass
     public static void setupBeforeClass() throws Exception{
         experimentDao = new ExperimentDao();
     }
 
-    @AfterClass
-    public static void tearDown(){
-        MongoClient mongoClient = MongoUtil.getMongoClient();
-        mongoClient.dropDatabase("airavata-data");
-    }
 
     @Test
-    public void testExperimentDao() throws RegistryException {
-        String TAG = System.currentTimeMillis() + "";
-        //creating sample echo experiment
-        InputDataObjectType inputDataObjectType = new InputDataObjectType();
-        inputDataObjectType.setName("Input_to_Echo");
-        inputDataObjectType.setValue("Hello World");
-
-        ComputationalResourceScheduling scheduling = new ComputationalResourceScheduling();
-        scheduling.setResourceHostId(UUID.randomUUID().toString());
-        scheduling.setComputationalProjectAccount("TG-STA110014S");
-        scheduling.setTotalCpuCount(1);
-        scheduling.setNodeCount(1);
-        scheduling.setWallTimeLimit(15);
-        scheduling.setQueueName("normal");
-
-        UserConfigurationData userConfigurationData = new UserConfigurationData();
-        userConfigurationData.setAiravataAutoSchedule(false);
-        userConfigurationData.setOverrideManualScheduledParams(false);
-        userConfigurationData.setComputationalResourceScheduling(scheduling);
-
-        Experiment experiment = new Experiment();
-        experiment.setExperimentId("28395669237854235"+TAG);
-        experiment.setProjectId("2392519y92312341" + TAG);
-        experiment.setUserName("TestUser" + TAG);
-        experiment.setName("TestExperiment"+TAG);
-        experiment.setDescription("experiment");
-        experiment.setApplicationId("2358382458362846287"+TAG);
-        experiment.setUserConfigurationData(userConfigurationData);
-        experiment.addToExperimentInputs(inputDataObjectType);
-        experiment.setGatewayExecutionId("329619820461624214"+TAG);
-
+    public void testExperimentOperations() throws RegistryException {
+        Experiment experiment = createExperiment();
         experimentDao.createExperiment(experiment);
-        Experiment persistedExperiement = experimentDao.getExperiment(experiment.getExperimentId());
+        Experiment persistedExperiement
+                = experimentDao.getExperiment(experiment.getExperimentId());
         Assert.assertNotNull(persistedExperiement);
         Assert.assertEquals(experiment, persistedExperiement);
 
-        experiment.setName("New Name"+TAG);
+        experiment.setName("New Name");
         experimentDao.updateExperiment(experiment);
         persistedExperiement = experimentDao.getExperiment(experiment.getExperimentId());
         Assert.assertEquals(experiment, persistedExperiement);
@@ -108,171 +62,97 @@ public class ExperimentDaoTest {
         List<Experiment> experimentList = experimentDao.getAllExperiments();
         Assert.assertTrue(experimentList.size()==1);
 
+        Map<String, String> filters = new HashMap();
+        filters.put(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_NAME,
+                experiment.getName().substring(1, 4));
+        experimentList = experimentDao.searchExperiments(filters, 1, 0, null, null);
+        Assert.assertTrue(experimentList.size()==1);
+
         experimentDao.deleteExperiment(experiment);
         experimentList = experimentDao.getAllExperiments();
         Assert.assertTrue(experimentList.size()==0);
     }
 
-    @Test
-    public void test() throws RegistryException, IOException {
-        Registry registry = RegistryFactory.getDefaultRegistry();
-        MongoUtil.dropAiravataRegistry();
-
-        ExperimentDao experimentDao = new ExperimentDao();
-        BufferedReader reader = new BufferedReader(new FileReader("/home/supun/Downloads/EXPERIMENT.csv"));
-        String temp = reader.readLine();
-        int i = 1;
-        long time1 = System.currentTimeMillis();
-        while(temp != null && !temp.isEmpty()){
-            try{
-                Experiment experiement = (Experiment) registry.get(RegistryModelType.EXPERIMENT, temp.trim());
-                experimentDao.createExperiment(experiement);
-                Experiment persistedExperiment = experimentDao.getExperiment(temp.trim());
-//                List<Experiment> experimentList = experimentDao.getAllExperiments();
-                Assert.assertEquals(experiement, persistedExperiment);
-                System.out.println(i+" :"+experiement.getExperimentId());
-                i++;
-            }catch (Exception e){
-                System.out.println(temp);
-                e.printStackTrace();
-            }
-            temp = reader.readLine();
-        }
-        long time2  = System.currentTimeMillis();
-        System.out.println(time2-time1);
-    }
 
     @Test
-    public void testGetExperimentOfWFNode() throws RegistryException, IOException {
-//        String nodeId = "IDontNeedaNode_48c545a1-bedd-46cf-90d4-e4390b129693";
-//        ExperimentDao experimentDao = new ExperimentDao();
-//        long time1 = System.currentTimeMillis();
-//        Experiment experiment = experimentDao.getExperimentOfWFNode(nodeId);
-//        long time2 = System.currentTimeMillis();
-//        System.out.println(time2-time1);
-//        Assert.assertNotNull(experiment);
-
-        ExperimentDao experimentDao = new ExperimentDao();
-        BufferedReader reader = new BufferedReader(new FileReader("/home/supun/Downloads/WORKFLOW_NODE_DETAIL.csv"));
-        String temp = reader.readLine();
-        int i = 1;
-        int count  = 0;
-        long time1 = System.currentTimeMillis();
-        while(temp != null && !temp.isEmpty()){
-            try{
-                Experiment experiment = experimentDao.getParentExperimentOfWFNode(temp.trim());
-                if(experiment != null) {
-                    System.out.println(i + " :" + experiment.getExperimentId());
-                    count++;
-                }else{
-                    System.out.println("FAILED: " + temp);
-                }
-                i++;
-            }catch (Exception e){
-                System.out.println(temp);
-                e.printStackTrace();
-            }
-            temp = reader.readLine();
-        }
-        long time2  = System.currentTimeMillis();
-        System.out.println(count);
-        System.out.println(time2-time1);
-    }
+    public void testWFOperations() throws RegistryException, IOException {
+        Experiment experiment = createExperiment();
+        experimentDao.createExperiment(experiment);
+        WorkflowNodeDetails wfnd = createWorkFlowNodeDetails();
+        experimentDao.createWFNode(experiment.getExperimentId(), wfnd);
+        Assert.assertEquals(wfnd, experimentDao.getWFNode(wfnd.getNodeInstanceId()));
 
-    @Test
-    public void testGetExperimentOfTask() throws RegistryException, IOException {
-//        String taskId = "tempNode_fceda7f7-267c-4197-bf20-a54f4fff395b";
-//        ExperimentDao experimentDao = new ExperimentDao();
-//        long time1 = System.currentTimeMillis();
-//        Experiment experiment = experimentDao.getExperimentOfTask(taskId);
-//        long time2 = System.currentTimeMillis();
-//        System.out.println(time2-time1);
-//        Assert.assertNotNull(experiment);
-//        AiravataUtils.setExecutionAsServer();
-//        Registry registry = RegistryFactory.getDefaultRegistry();
-//        MongoUtil.dropAiravataRegistry();
+        wfnd.setNodeName("NewName");
+        experimentDao.updateWFNode(wfnd);
+        Assert.assertEquals(wfnd.getNodeName(),
+                experimentDao.getWFNode(wfnd.getNodeInstanceId()).getNodeName());
 
-        ExperimentDao experimentDao = new ExperimentDao();
-        BufferedReader reader = new BufferedReader(new FileReader("/home/supun/Downloads/TASK_DETAIL.csv"));
-        String temp = reader.readLine();
-        int i = 1;
-        int count  = 0;
-        long time1 = System.currentTimeMillis();
-        while(temp != null && !temp.isEmpty()){
-            try{
-                Experiment experiment = experimentDao.getParentExperimentOfTask(temp.trim());
-                if(experiment != null) {
-                    //System.out.println(i + " :" + experiment.getExperimentId());
-                    count++;
-                }else{
-                    System.out.println("FAILED: " + temp);
-                }
-                i++;
-            }catch (Exception e){
-                System.out.println(temp);
-                e.printStackTrace();
-            }
-            temp = reader.readLine();
-        }
-        long time2  = System.currentTimeMillis();
-        System.out.println(count);
-        System.out.println(time2-time1);
+        experimentDao.deleteWFNode(wfnd);
+        Assert.assertNull(experimentDao.getWFNode(wfnd.getNodeInstanceId()));
     }
 
     @Test
-    public void testWorkFlow() throws RegistryException {
-        String nodeId = "tempNode_758b52ba-091b-43a5-a7b7-4c3a239c5d1e";
-        String newNodeId = "newNode_758b52ba-091b-43a5-a7b7-4c3a2325d1e";
-        String expId = "AlamoTest3_3965f4e2-0213-4434-9c3f-fe898b018666";
-        ExperimentDao experimentDao = new ExperimentDao();
-        WorkflowNodeDetails wfNode = experimentDao.getWFNode("newNode_758b52ba-091b-43a5-a7b7-4c3a239c5d1e");
-        Assert.assertTrue(wfNode.getNodeInstanceId().equals("newNode_758b52ba-091b-43a5-a7b7-4c3a239c5d1e"));
-
-        wfNode.setNodeName("New2 Name"+System.currentTimeMillis());
-        experimentDao.updateWFNode(wfNode);
-        WorkflowNodeDetails updatedWfNode = experimentDao.getWFNode("newNode_758b52ba-091b-43a5-a7b7-4c3a239c5d1e");
-        Assert.assertTrue(updatedWfNode.getNodeName().equals(wfNode.getNodeName()));
-
-        WorkflowNodeDetails newWfNode = wfNode;
-        newWfNode.setTaskDetailsList(null);
-        newWfNode.setNodeInstanceId(newNodeId);
-        experimentDao.createWFNode(expId, newWfNode);
-
-        Experiment experiment = experimentDao.getExperiment(expId);
-
-        experimentDao.deleteWFNode(newWfNode);
-
-        experiment = experimentDao.getExperiment(expId);
-
-        System.out.println();
+    public void testTaskOperations() throws RegistryException, IOException {
     }
 
-    @Test
-    public void testTask() throws RegistryException {
-        String taskId = "tempNode_58e1b2e4-f7d6-4543-9281-43dcb58e2c1a";
-        ExperimentDao experimentDao = new ExperimentDao();
-        TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
-        Assert.assertTrue(taskDetails.getTaskId().equals(taskId));
+    //Todo set all the fields in the experiment object
+    private Experiment createExperiment(){
+        String TAG = System.currentTimeMillis() + "";
+        //creating sample echo experiment
+        InputDataObjectType inputDataObjectType = new InputDataObjectType();
+        inputDataObjectType.setName("Input_to_Echo");
+        inputDataObjectType.setValue("Hello World");
 
-        taskDetails.setTaskStatus(null);
-        experimentDao.updateTaskDetail(taskDetails);
-        taskDetails = experimentDao.getTaskDetail(taskId);
-        Assert.assertTrue(taskDetails.getTaskId().equals(taskId));
+        ComputationalResourceScheduling scheduling = new ComputationalResourceScheduling();
+        scheduling.setResourceHostId(UUID.randomUUID().toString());
+        scheduling.setComputationalProjectAccount("TG-STA110014S");
+        scheduling.setTotalCpuCount(1);
+        scheduling.setNodeCount(1);
+        scheduling.setWallTimeLimit(15);
+        scheduling.setQueueName("normal");
 
-        String expid = "alamotest2_5420547e-877a-4a9c-8752-377c2806906c";
-        Experiment experiment = experimentDao.getExperiment(expid);
-        System.out.println();
+        UserConfigurationData userConfigurationData = new UserConfigurationData();
+        userConfigurationData.setAiravataAutoSchedule(false);
+        userConfigurationData.setOverrideManualScheduledParams(false);
+        userConfigurationData.setComputationalResourceScheduling(scheduling);
+
+        Experiment experiment = new Experiment();
+        experiment.setExperimentId("28395669237854235"+TAG);
+        experiment.setProjectId("2392519y92312341" + TAG);
+        experiment.setUserName("TestUser" + TAG);
+        experiment.setName("TestExperiment" + TAG);
+        experiment.setDescription("experiment");
+        experiment.setApplicationId("2358382458362846287" + TAG);
+        experiment.setUserConfigurationData(userConfigurationData);
+        experiment.addToExperimentInputs(inputDataObjectType);
+        experiment.setGatewayExecutionId("default");
+        experiment.setEnableEmailNotification(true);
+        ArrayList<String> emailList = new ArrayList();
+        emailList.add("qwerty123@gmail.com");
+        experiment.setEmailAddresses(emailList);
+        ExperimentStatus experimentStatus = new ExperimentStatus();
+        experimentStatus.setExperimentState(ExperimentState.CREATED);
+        experiment.setExperimentStatus(experimentStatus);
+
+        experiment.addToWorkflowNodeDetailsList(createWorkFlowNodeDetails());
+        return experiment;
     }
 
-    @Test
-    public void testSearch() throws RegistryException{
-        Map<String, String> filters = new HashMap();
-        filters.put(Constants.FieldConstants.ExperimentConstants.USER_NAME, "Eroma123");
-        filters.put(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_DESC, "Test");
-        List<Experiment> result = experimentDao.searchExperiments(
-                filters, 10, 2, Constants.FieldConstants.ExperimentConstants.CREATION_TIME, ResultOrderType.DESC);
-        Assert.assertNotNull(result);
-        Assert.assertTrue(result.size()==10);
-        Assert.assertTrue(result.get(0).getCreationTime() > result.get(9).getCreationTime());
+    private WorkflowNodeDetails createWorkFlowNodeDetails(){
+        String TAG = System.currentTimeMillis() + "";
+        WorkflowNodeDetails wfnd = new WorkflowNodeDetails();
+        wfnd.setNodeInstanceId("tempNode_4e1582bd-f9dd-4563-8808-472470c93dbc"+TAG);
+        wfnd.setNodeName("Temp Node" + TAG);
+        wfnd.setExecutionUnit(ExecutionUnit.APPLICATION);
+        WorkflowNodeStatus workflowNodeStatus = new WorkflowNodeStatus();
+        workflowNodeStatus.setWorkflowNodeState(WorkflowNodeState.UNKNOWN);
+        wfnd.setWorkflowNodeStatus(workflowNodeStatus);
+
+        TaskDetails taskDetails = new TaskDetails();
+        taskDetails.setTaskId("Temp_Task"+TAG);
+        taskDetails.setApplicationId("Ultrascan_856df1d5-944a-49d3-a476-d969e57a8f37");
+
+        wfnd.addToTaskDetailsList(taskDetails);
+        return wfnd;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/org/apache/airavata/persistence/registry/RegistryUseCaseTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/org/apache/airavata/persistence/registry/RegistryUseCaseTest.java b/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/org/apache/airavata/persistence/registry/RegistryUseCaseTest.java
deleted file mode 100644
index 0f0bd85..0000000
--- a/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/org/apache/airavata/persistence/registry/RegistryUseCaseTest.java
+++ /dev/null
@@ -1,291 +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.persistence.registry.mongo.org.apache.airavata.persistence.registry;
-
-import junit.framework.Assert;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.workspace.Project;
-import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.model.workspace.experiment.ExperimentSummary;
-import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.registry.cpi.*;
-import org.apache.airavata.registry.cpi.utils.Constants;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import java.sql.SQLException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-/**
- * This class contains test cases for the RegistryImpl class which is the default registry
- * implementation. These test cases are written from the perspective of the Airavata API
- * such as creating/updating/deleting/searching projects and experiments etc.
- */
-public class RegistryUseCaseTest {
-
-    private static Registry registry;
-
-    @BeforeClass
-    public static void setupBeforeClass() throws RegistryException, SQLException {
-        registry = RegistryFactory.getDefaultRegistry();
-    }
-
-    @Test
-    public void testProject(){
-        try {
-            String TAG = System.currentTimeMillis() + "";
-
-            String gatewayId = ServerSettings.getDefaultUserGateway();
-
-            //testing the creation of a project
-            Project project = new Project();
-            project.setOwner("TestUser"+TAG);
-            project.setName("TestProject"+TAG);
-            project.setDescription("This is a test project"+TAG);
-            String projectId1 = (String)registry.add(ParentDataType.PROJECT, project, gatewayId);
-            Assert.assertNotNull(projectId1);
-
-            //testing the updateExperiment of a project
-            Project updatedProject = new Project();
-            updatedProject.setProjectId(projectId1);
-            updatedProject.setOwner("TestUser"+TAG);
-            updatedProject.setName("UpdatedTestProject"+TAG);
-            updatedProject.setDescription("This is an updated test project"+TAG);
-            registry.update(RegistryModelType.PROJECT, updatedProject, projectId1);
-
-            //testing project retrieval
-            Project retrievedProject = (Project)registry.get(RegistryModelType.PROJECT, projectId1);
-            Assert.assertEquals(updatedProject.getProjectId(), retrievedProject.getProjectId());
-            Assert.assertEquals(updatedProject.getOwner(), retrievedProject.getOwner());
-            Assert.assertEquals(updatedProject.getName(), retrievedProject.getName());
-            Assert.assertEquals(updatedProject.getDescription(), retrievedProject.getDescription());
-            Assert.assertNotNull(retrievedProject.getCreationTime());
-            //created user should be in the shared users list
-            Assert.assertTrue(retrievedProject.getSharedUsers().size()==1);
-
-            //creating more projects for the same user
-            project = new Project();
-            project.setOwner("TestUser"+TAG);
-            project.setName("Project Terrible"+TAG);
-            project.setDescription("This is a test project_2"+TAG);
-            String projectId2 = (String)registry.add(ParentDataType.PROJECT, project, gatewayId);
-            Assert.assertNotNull(projectId2);
-
-            project = new Project();
-            project.setOwner("TestUser"+TAG);
-            project.setName("Project Funny"+TAG);
-            project.setDescription("This is a test project_3"+TAG);
-            String projectId3 = (String)registry.add(ParentDataType.PROJECT, project, gatewayId);
-            Assert.assertNotNull(projectId3);
-
-            project = new Project();
-            project.setOwner("TestUser"+TAG);
-            project.setName("Project Stupid"+TAG);
-            project.setDescription("This is a test project_4"+TAG);
-            String projectId4 = (String)registry.add(ParentDataType.PROJECT, project, gatewayId);
-            Assert.assertNotNull(projectId4);
-
-            project = new Project();
-            project.setOwner("TestUser"+TAG);
-            project.setName("Project Boring"+TAG);
-            project.setDescription("This is a test project_5"+TAG);
-            String projectId5 = (String)registry.add(ParentDataType.PROJECT, project, gatewayId);
-            Assert.assertNotNull(projectId5);
-
-            //test getExperiment all projects created by the user
-            List<Object> list = registry.get(RegistryModelType.PROJECT,
-                    Constants.FieldConstants.ProjectConstants.OWNER, "TestUser"+TAG);
-            Assert.assertTrue(list.size()==5);
-
-            //search project by project name
-            Map<String, String> filters = new HashMap<String, String>();
-            filters.put(Constants.FieldConstants.ProjectConstants.OWNER, "TestUser"+TAG);
-            filters.put(Constants.FieldConstants.ProjectConstants.PROJECT_NAME, "Terrible"+TAG);
-            list = registry.search(RegistryModelType.PROJECT, filters);
-            Assert.assertTrue(list.size()==1);
-
-            //search project by project description
-            filters = new HashMap<String, String>();
-            filters.put(Constants.FieldConstants.ProjectConstants.OWNER, "TestUser"+TAG);
-            filters.put(Constants.FieldConstants.ProjectConstants.DESCRIPTION, "test project_2"+TAG);
-            list = registry.search(RegistryModelType.PROJECT, filters);
-            Assert.assertTrue(list.size()==1);
-
-            //search project with only ownername
-            filters = new HashMap<String, String>();
-            filters.put(Constants.FieldConstants.ProjectConstants.OWNER, "TestUser"+TAG);
-            list = registry.search(RegistryModelType.PROJECT, filters);
-            Assert.assertTrue(list.size()==5);
-
-            //search projects with pagination
-            filters = new HashMap<String, String>();
-            filters.put(Constants.FieldConstants.ProjectConstants.OWNER, "TestUser"+TAG);
-            list = registry.search(RegistryModelType.PROJECT, filters, 2, 2,
-                    Constants.FieldConstants.ProjectConstants.CREATION_TIME, ResultOrderType.DESC);
-            Assert.assertTrue(list.size()==2);
-            Project project1 = (Project)list.get(0);
-            Project project2 = (Project)list.get(1);
-            Assert.assertTrue(project1.getCreationTime()-project2.getCreationTime() > 0);
-        } catch (RegistryException e) {
-            e.printStackTrace();
-            Assert.fail();
-        } catch (ApplicationSettingsException e) {
-            e.printStackTrace();
-        }
-    }
-
-    @Test
-    public void testExperiment(){
-        try {
-            String TAG = System.currentTimeMillis() + "";
-
-            String gatewayId = ServerSettings.getDefaultUserGateway();
-
-            //creating project
-            Project project = new Project();
-            project.setOwner("TestUser"+TAG);
-            project.setName("TestProject"+TAG);
-            project.setDescription("This is a test project"+TAG);
-            String projectId1 = (String)registry.add(ParentDataType.PROJECT, project, gatewayId);
-            Assert.assertNotNull(projectId1);
-
-            //creating sample echo experiment. assumes echo application is already defined
-            InputDataObjectType inputDataObjectType = new InputDataObjectType();
-            inputDataObjectType.setName("Input_to_Echo");
-            inputDataObjectType.setValue("Hello World");
-
-            ComputationalResourceScheduling scheduling = new ComputationalResourceScheduling();
-            scheduling.setResourceHostId(UUID.randomUUID().toString());
-            scheduling.setComputationalProjectAccount("TG-STA110014S");
-            scheduling.setTotalCpuCount(1);
-            scheduling.setNodeCount(1);
-            scheduling.setWallTimeLimit(15);
-            scheduling.setQueueName("normal");
-
-            UserConfigurationData userConfigurationData = new UserConfigurationData();
-            userConfigurationData.setAiravataAutoSchedule(false);
-            userConfigurationData.setOverrideManualScheduledParams(false);
-            userConfigurationData.setComputationalResourceScheduling(scheduling);
-
-            Experiment experiment = new Experiment();
-            experiment.setProjectId(projectId1);
-            experiment.setUserName("TestUser" + TAG);
-            experiment.setName("TestExperiment"+TAG);
-            experiment.setDescription("Test 1 experiment");
-            experiment.setApplicationId(UUID.randomUUID().toString());
-            experiment.setUserConfigurationData(userConfigurationData);
-            experiment.addToExperimentInputs(inputDataObjectType);
-
-            String experimentId1 = (String)registry.add(ParentDataType.EXPERIMENT, experiment, gatewayId);
-            Assert.assertNotNull(experimentId1);
-
-            //retrieving the stored experiment
-            Experiment retrievedExperiment = (Experiment)registry.get(RegistryModelType.EXPERIMENT,
-                    experimentId1);
-            Assert.assertNotNull(retrievedExperiment);
-            Assert.assertEquals(retrievedExperiment.getProjectId(), experiment.getProjectId());
-            Assert.assertEquals(retrievedExperiment.getDescription(), experiment.getDescription());
-            Assert.assertEquals(retrievedExperiment.getName(), experiment.getName());
-            Assert.assertEquals(retrievedExperiment.getApplicationId(), experiment.getApplicationId());
-            Assert.assertNotNull(retrievedExperiment.getUserConfigurationData());
-            Assert.assertNotNull(retrievedExperiment.getExperimentInputs());
-
-            //updating an existing experiment
-            experiment.setName("NewExperimentName"+TAG);
-            OutputDataObjectType outputDataObjectType = new OutputDataObjectType();
-            outputDataObjectType.setName("Output_to_Echo");
-            outputDataObjectType.setValue("Hello World");
-            experiment.addToExperimentOutputs(outputDataObjectType);
-            registry.update(RegistryModelType.EXPERIMENT, experiment, experimentId1);
-
-            //creating more experiments
-            experiment = new Experiment();
-            experiment.setProjectId(projectId1);
-            experiment.setUserName("TestUser" + TAG);
-            experiment.setName("TestExperiment2" + TAG);
-            experiment.setDescription("Test 2 experiment");
-            experiment.setApplicationId(UUID.randomUUID().toString());
-            experiment.setUserConfigurationData(userConfigurationData);
-            experiment.addToExperimentInputs(inputDataObjectType);
-
-            String experimentId2 = (String)registry.add(ParentDataType.EXPERIMENT, experiment, gatewayId);
-            Assert.assertNotNull(experimentId2);
-
-            experiment = new Experiment();
-            experiment.setProjectId(projectId1);
-            experiment.setUserName("TestUser" + TAG);
-            experiment.setName("TestExperiment3"+TAG);
-            experiment.setDescription("Test 3 experiment");
-            experiment.setApplicationId(UUID.randomUUID().toString());
-            experiment.setUserConfigurationData(userConfigurationData);
-            experiment.addToExperimentInputs(inputDataObjectType);
-
-            String experimentId3 = (String)registry.add(ParentDataType.EXPERIMENT, experiment, gatewayId);
-            Assert.assertNotNull(experimentId3);
-
-            //searching experiments by name
-            Map<String, String> filters = new HashMap<String, String>();
-            filters.put(Constants.FieldConstants.ExperimentConstants.USER_NAME, "TestUser" + TAG);
-            filters.put(Constants.FieldConstants.ExperimentConstants.GATEWAY, gatewayId);
-            filters.put(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_NAME, "Experiment2");
-            List<Object> results = registry.search(RegistryModelType.EXPERIMENT, filters);
-            Assert.assertTrue(results.size()==1);
-
-            //retrieving all experiments in project
-            List<Object> list = registry.get(RegistryModelType.EXPERIMENT,
-                    Constants.FieldConstants.ExperimentConstants.PROJECT_ID, projectId1);
-            Assert.assertTrue(list.size()==3);
-
-            //searching all user experiments
-            filters = new HashMap<String, String>();
-            filters.put(Constants.FieldConstants.ExperimentConstants.USER_NAME, "TestUser" + TAG);
-            filters.put(Constants.FieldConstants.ExperimentConstants.GATEWAY, gatewayId);
-            list = registry.search(RegistryModelType.EXPERIMENT, filters);
-            Assert.assertTrue(list.size()==3);
-
-            //searching user experiemets with pagination
-            filters = new HashMap<String, String>();
-            filters.put(Constants.FieldConstants.ExperimentConstants.USER_NAME, "TestUser" + TAG);
-            filters.put(Constants.FieldConstants.ExperimentConstants.GATEWAY, gatewayId);
-            list = registry.search(RegistryModelType.EXPERIMENT, filters, 2, 1,
-                    Constants.FieldConstants.ExperimentConstants.CREATION_TIME, ResultOrderType.DESC);
-            Assert.assertTrue(list.size()==2);
-            ExperimentSummary exp1 = (ExperimentSummary)list.get(0);
-            ExperimentSummary exp2 = (ExperimentSummary)list.get(1);
-            Assert.assertTrue(exp1.getCreationTime()-exp2.getCreationTime() > 0);
-
-        } catch (RegistryException e) {
-            e.printStackTrace();
-            Assert.fail();
-        } catch (ApplicationSettingsException e) {
-            e.printStackTrace();
-        }
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java
index a09d236..805477d 100644
--- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java
+++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java
@@ -74,7 +74,6 @@ import org.apache.airavata.workflow.model.wf.WorkflowExecutionState;
 import org.apache.thrift.TException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.xmlpull.infoset.XmlElement;
 
 import javax.xml.xpath.XPath;
 import javax.xml.xpath.XPathConstants;


[28/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/ProjectDao.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/ProjectDao.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/ProjectDao.java
new file mode 100644
index 0000000..ecffac4
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/ProjectDao.java
@@ -0,0 +1,189 @@
+/*
+ *
+ * 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.persistance.registry.mongo.dao;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.mongodb.*;
+import com.mongodb.util.JSON;
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.persistance.registry.mongo.conversion.ModelConversionHelper;
+import org.apache.airavata.persistance.registry.mongo.utils.MongoUtil;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.ResultOrderType;
+import org.apache.airavata.registry.cpi.utils.Constants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class ProjectDao {
+    private final static Logger logger = LoggerFactory.getLogger(ProjectDao.class);
+
+    private static final String PROJECTS_COLLECTION_NAME = "projects";
+    private DBCollection collection;
+    private ModelConversionHelper modelConversionHelper;
+
+    private static final String PROJECT_ID = "project_id";
+    private static final String PROJECT_NAME = "name";
+    private static final String PROJECT_DESCRIPTION = "description";
+    private static final String PROJECT_OWNER = "owner";
+    private static final String PROJECT_CREATION_TIME = "creation_time";
+
+    public ProjectDao(){
+        collection = MongoUtil.getAiravataRegistry().getCollection(PROJECTS_COLLECTION_NAME);
+        modelConversionHelper = new ModelConversionHelper();
+        collection.dropIndexes();
+        initIndexes();
+    }
+
+    /**
+     * If indexes are already defined this will simply ignore them
+     */
+    private void initIndexes(){
+        collection.createIndex(new BasicDBObject(PROJECT_ID, 1), new BasicDBObject("unique", true));
+        collection.createIndex(new BasicDBObject(PROJECT_NAME, 1));
+        collection.createIndex(new BasicDBObject(PROJECT_OWNER, 1));
+        collection.createIndex(new BasicDBObject(PROJECT_DESCRIPTION, 1));
+        collection.createIndex(new BasicDBObject(PROJECT_CREATION_TIME, 1));
+    }
+
+    public List<Project> getAllProjects() throws RegistryException{
+        List<Project> projectList = new ArrayList();
+        DBCursor cursor = collection.find();
+        for(DBObject document: cursor){
+            try {
+                projectList.add((Project) modelConversionHelper.deserializeObject(
+                        Project.class, document.toString()));
+            } catch (IOException e) {
+                throw new RegistryException(e);
+            }
+        }
+        return projectList;
+    }
+
+    public void createProject(Project project) throws RegistryException{
+        try {
+            WriteResult result = collection.insert((DBObject) JSON.parse(
+                    modelConversionHelper.serializeObject(project)));
+            logger.debug("No of inserted results "+ result.getN());
+        } catch (JsonProcessingException e) {
+            throw new RegistryException(e);
+        }
+    }
+
+    /**
+     * The following operation replaces the document with item equal to
+     * the given project id. The newly replaced document will only
+     * contain the the _id field and the fields in the replacement document.
+     * @param project
+     * @throws org.apache.airavata.registry.cpi.RegistryException
+     */
+    public void updateProject(Project project) throws RegistryException{
+        try {
+            DBObject query = BasicDBObjectBuilder.start().add(
+                    PROJECT_ID, project.getProjectId()).get();
+            WriteResult result = collection.update(query, (DBObject) JSON.parse(
+                    modelConversionHelper.serializeObject(project)));
+            logger.debug("No of updated results "+ result.getN());
+        } catch (JsonProcessingException e) {
+            throw new RegistryException(e);
+        }
+    }
+
+    public void deleteProject(Project project) throws RegistryException{
+        DBObject query = BasicDBObjectBuilder.start().add(
+                PROJECT_ID, project.getProjectId()).get();
+        WriteResult result = collection.remove(query);
+        logger.debug("No of removed experiments " + result.getN());
+    }
+
+    public Project getProject(String projectId) throws RegistryException{
+        try {
+            DBObject criteria = new BasicDBObject(PROJECT_ID, projectId);
+            DBObject doc = collection.findOne(criteria);
+            if(doc != null){
+                String json = doc.toString();
+                return (Project)modelConversionHelper.deserializeObject(
+                        Project.class, json);
+            }
+        } catch (IOException e) {
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<Project> searchProjects(Map<String, String> filters, int limit,
+        int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException{
+        List<Project> projectList = new ArrayList();
+        BasicDBObjectBuilder queryBuilder = BasicDBObjectBuilder.start();
+        for (String field : filters.keySet()) {
+//            if (field.equals(Constants.FieldConstants.ProjectConstants.PROJECT_NAME)){
+//                fil.put(AbstractResource.ProjectConstants.PROJECT_NAME, filters.get(field));
+//            }else if (field.equals(Constants.FieldConstants.ProjectConstants.OWNER)){
+//                fil.put(AbstractResource.ProjectConstants.USERNAME, filters.get(field));
+//            }else if (field.equals(Constants.FieldConstants.ProjectConstants.DESCRIPTION)){
+//                fil.put(AbstractResource.ProjectConstants.DESCRIPTION, filters.get(field));
+//            }else if (field.equals(Constants.FieldConstants.ProjectConstants.GATEWAY_ID)){
+//                fil.put(AbstractResource.ProjectConstants.GATEWAY_ID, filters.get(field));
+//            }
+        }
+
+        //handling pagination and ordering. ordering is allowed only on PROJECT_CREATION_TIME
+        DBCursor cursor;
+        if(limit > 0 && offset >= 0) {
+            if(orderByIdentifier != null && orderByIdentifier.equals(
+                    Constants.FieldConstants.ProjectConstants.CREATION_TIME)){
+                if(resultOrderType.equals(ResultOrderType.ASC)) {
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(PROJECT_CREATION_TIME, 1))
+                            .skip(offset).limit(limit);
+                }else{
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(PROJECT_CREATION_TIME, -1))
+                            .skip(offset).limit(limit);
+                }
+            }else {
+                cursor = collection.find(queryBuilder.get()).skip(offset).limit(limit);
+            }
+        }else{
+            if(resultOrderType != null && resultOrderType.equals(
+                    Constants.FieldConstants.ProjectConstants.CREATION_TIME)){
+                if(resultOrderType.equals(ResultOrderType.ASC)) {
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(PROJECT_CREATION_TIME, 1));
+                }else{
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(PROJECT_CREATION_TIME, -1));
+                }
+            }else {
+                cursor = collection.find(queryBuilder.get());
+            }
+        }
+        for(DBObject document: cursor){
+            try {
+                projectList.add((Project) modelConversionHelper.deserializeObject(
+                        Project.class, document.toString()));
+            } catch (IOException e) {
+                throw new RegistryException(e);
+            }
+        }
+        return projectList;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/UserDao.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/UserDao.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/UserDao.java
new file mode 100644
index 0000000..059c3f5
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/UserDao.java
@@ -0,0 +1,124 @@
+/*
+ *
+ * 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.persistance.registry.mongo.dao;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.mongodb.*;
+import com.mongodb.util.JSON;
+import org.apache.airavata.model.workspace.User;
+import org.apache.airavata.persistance.registry.mongo.conversion.ModelConversionHelper;
+import org.apache.airavata.persistance.registry.mongo.utils.MongoUtil;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+public class UserDao {
+    private final static Logger logger = LoggerFactory.getLogger(UserDao.class);
+
+    private static final String USERS_COLLECTION_NAME = "users";
+    private DBCollection collection;
+    private ModelConversionHelper modelConversionHelper;
+
+    private static final String USER_NAME = "user_name";
+
+    public UserDao(){
+        collection = MongoUtil.getAiravataRegistry().getCollection(USERS_COLLECTION_NAME);
+        modelConversionHelper = new ModelConversionHelper();
+        collection.dropIndexes();
+        initIndexes();
+    }
+
+    /**
+     * If indexes are already defined this will simply ignore them
+     */
+    private void initIndexes(){
+        collection.createIndex(new BasicDBObject(USER_NAME, 1), new BasicDBObject("unique", true));
+    }
+
+    public List<User> getAllUsers() throws RegistryException{
+        List<User> userList = new ArrayList();
+        DBCursor cursor = collection.find();
+        for(DBObject document: cursor){
+            try {
+                userList.add((User) modelConversionHelper.deserializeObject(
+                        User.class, document.toString()));
+            } catch (IOException e) {
+                throw new RegistryException(e);
+            }
+        }
+        return userList;
+    }
+
+    public void createUser(User user) throws RegistryException{
+        try {
+            WriteResult result = collection.insert((DBObject) JSON.parse(
+                    modelConversionHelper.serializeObject(user)));
+            logger.debug("No of inserted results "+ result.getN());
+        } catch (JsonProcessingException e) {
+            throw new RegistryException(e);
+        }
+    }
+
+    /**
+     * The following operation replaces the document with item equal to
+     * the given project id. The newly replaced document will only
+     * contain the the _id field and the fields in the replacement document.
+     * @param user
+     * @throws org.apache.airavata.registry.cpi.RegistryException
+     */
+    public void updateUser(User user) throws RegistryException{
+        try {
+            DBObject query = BasicDBObjectBuilder.start().add(
+                    USER_NAME, user.getUserName()).get();
+            WriteResult result = collection.update(query, (DBObject) JSON.parse(
+                    modelConversionHelper.serializeObject(user)));
+            logger.debug("No of updated results "+ result.getN());
+        } catch (JsonProcessingException e) {
+            throw new RegistryException(e);
+        }
+    }
+
+    public void deleteUser(User user) throws RegistryException{
+        DBObject query = BasicDBObjectBuilder.start().add(
+                USER_NAME, user.getUserName()).get();
+        WriteResult result = collection.remove(query);
+        logger.debug("No of removed users " + result.getN());
+    }
+
+    public User getUser(String username) throws RegistryException{
+        try {
+            DBObject criteria = new BasicDBObject(USER_NAME, username);
+            DBObject doc = collection.findOne(criteria);
+            if(doc != null){
+                String json = doc.toString();
+                return (User)modelConversionHelper.deserializeObject(
+                        User.class, json);
+            }
+        } catch (IOException e) {
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/impl/RegistryFactory.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/impl/RegistryFactory.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/impl/RegistryFactory.java
new file mode 100644
index 0000000..c71f1e6
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/impl/RegistryFactory.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.impl;
+
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RegistryFactory {
+    private static Registry registry;
+    private static Logger logger = LoggerFactory.getLogger(RegistryFactory.class);
+
+    public static Registry getDefaultRegistry () throws RegistryException {
+        try {
+            if (registry == null) {
+                registry = new RegistryImpl();
+            }
+        } catch (RegistryException e) {
+            logger.error("Unable to create registry instance", e);
+            throw new RegistryException(e);
+        }
+        return registry;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/impl/RegistryImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/impl/RegistryImpl.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/impl/RegistryImpl.java
new file mode 100644
index 0000000..a4d3256
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/impl/RegistryImpl.java
@@ -0,0 +1,732 @@
+/*
+ *
+ * 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.persistance.registry.mongo.impl;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.model.workspace.User;
+import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.persistance.registry.mongo.repository.ExperimentRepository;
+import org.apache.airavata.persistance.registry.mongo.repository.GatewayRepository;
+import org.apache.airavata.persistance.registry.mongo.repository.ProjectRepository;
+import org.apache.airavata.persistance.registry.mongo.repository.UserRepository;
+import org.apache.airavata.registry.cpi.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+public class RegistryImpl implements Registry {
+    private Gateway gateway;
+    private User user;
+    private final static Logger logger = LoggerFactory.getLogger(RegistryImpl.class);
+    private ExperimentRepository experimentRegistry;
+    private ProjectRepository projectRepository;
+    private GatewayRepository gatewayRepository;
+    private UserRepository userRepository;
+
+    public RegistryImpl() throws RegistryException{
+        try {
+            initRegistry(ServerSettings.getDefaultUserGateway(), ServerSettings.getDefaultUser());
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to read airavata server properties..", e);
+            throw new RegistryException("Unable to read airavata server properties..", e);
+        }
+    }
+
+    public RegistryImpl(String gatewayName, String userName) throws RegistryException{
+        initRegistry(gatewayName, userName);
+    }
+
+    private void initRegistry(String gatewayName, String userName) throws RegistryException {
+        gatewayRepository = new GatewayRepository();
+        userRepository = new UserRepository();
+
+        if (!gatewayRepository.isGatewayExist(userName)){
+            this.gateway = new Gateway();
+            gateway.setGatewayId(UUID.randomUUID().toString());
+            gateway.setGatewayName(gatewayName);
+            gatewayRepository.addGateway(gateway);
+        }else {
+            this.gateway = gatewayRepository.getGateway(gatewayName);
+        }
+
+        if (!userRepository.isUserExists(userName)){
+            user = new User(userName);
+            userRepository.addUser(user);
+        }else {
+            user = userRepository.getUser(userName);
+        }
+        experimentRegistry = new ExperimentRepository(gateway, user);
+        projectRepository = new ProjectRepository(gateway, user);
+    }
+
+    /**
+     * This method is to add an object in to the registry
+     *
+     * @param dataType       Data type is a predefined type which the programmer should choose according to the object he
+     *                       is going to save in to registry
+     * @param newObjectToAdd Object which contains the fields that need to be saved in to registry. This object is a
+     *                       thrift model object. In experiment case this object can be BasicMetadata, ConfigurationData
+     *                       etc
+     * @return return the identifier to identify the object
+     */
+    @Override
+    public Object add(ParentDataType dataType, Object newObjectToAdd, String gatewayId) throws RegistryException {
+        try {
+            switch (dataType) {
+                case PROJECT:
+                    return projectRepository.addProject((Project)newObjectToAdd, gatewayId);
+                case EXPERIMENT:
+                    return experimentRegistry.addExperiment((Experiment) newObjectToAdd, gatewayId);
+                case GATEWAY:
+                    return gatewayRepository.addGateway((Gateway)newObjectToAdd);
+                default:
+                    logger.error("Unsupported top level type..", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while adding the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while adding the resource " + dataType.toString(), e);
+        }
+    }
+
+    /**
+     * This method is to add an object in to the registry
+     *
+     * @param dataType            Data type is a predefined type which the programmer should choose according to the object he
+     *                            is going to save in to registry
+     * @param newObjectToAdd      Object which contains the fields that need to be saved in to registry. This object is a
+     *                            thrift model object. In experiment case this object can be BasicMetadata, ConfigurationData
+     *                            etc
+     * @param dependentIdentifier Object which contains the identifier if the object that is going to add is not a top
+     *                            level object in the data model. If it is a top level object, programmer can pass it as
+     *                            null
+     */
+    @Override
+    public Object add(ChildDataType dataType, Object newObjectToAdd, Object dependentIdentifier) throws RegistryException {
+        try {
+            switch (dataType) {
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    return experimentRegistry.addUserConfigData((UserConfigurationData) newObjectToAdd, (String) dependentIdentifier);
+                case EXPERIMENT_OUTPUT:
+                    return experimentRegistry.addExpOutputs((List<OutputDataObjectType>) newObjectToAdd, (String) dependentIdentifier);
+                case EXPERIMENT_STATUS:
+                    return experimentRegistry.updateExperimentStatus((ExperimentStatus) newObjectToAdd, (String) dependentIdentifier);
+                case WORKFLOW_NODE_DETAIL:
+                    return experimentRegistry.addWorkflowNodeDetails((WorkflowNodeDetails) newObjectToAdd, (String) dependentIdentifier);
+                case WORKFLOW_NODE_STATUS:
+                    return experimentRegistry.addWorkflowNodeStatus((WorkflowNodeStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case NODE_OUTPUT:
+                    return experimentRegistry.addNodeOutputs((List<OutputDataObjectType>) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case TASK_DETAIL:
+                    return experimentRegistry.addTaskDetails((TaskDetails) newObjectToAdd, (String) dependentIdentifier);
+                case APPLICATION_OUTPUT:
+                    return experimentRegistry.addApplicationOutputs((List<OutputDataObjectType>) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case TASK_STATUS:
+                    return experimentRegistry.addTaskStatus((TaskStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case JOB_DETAIL:
+                    return experimentRegistry.addJobDetails((JobDetails) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case JOB_STATUS:
+                    return experimentRegistry.addJobStatus((JobStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case APPLICATION_STATUS:
+                    return experimentRegistry.addApplicationStatus((ApplicationStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case DATA_TRANSFER_DETAIL:
+                    return experimentRegistry.addDataTransferDetails((DataTransferDetails) newObjectToAdd, (String) dependentIdentifier);
+                case TRANSFER_STATUS:
+                    return experimentRegistry.addTransferStatus((TransferStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                    return experimentRegistry.addComputationalResourceScheduling((ComputationalResourceScheduling) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case ADVANCE_OUTPUT_DATA_HANDLING:
+                    return experimentRegistry.addOutputDataHandling((AdvancedOutputDataHandling) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case ADVANCE_INPUT_DATA_HANDLING:
+                    return experimentRegistry.addInputDataHandling((AdvancedInputDataHandling) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case QOS_PARAM:
+                    return experimentRegistry.addQosParams((QualityOfServiceParams) newObjectToAdd, (String) dependentIdentifier);
+                case ERROR_DETAIL:
+                    return experimentRegistry.addErrorDetails((ErrorDetails) newObjectToAdd, dependentIdentifier);
+                default:
+                    logger.error("Unsupported dependent data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while adding " + dataType.toString() , new RegistryException(e));
+            throw new RegistryException("Error while adding " + dataType.toString(), e);
+        }
+
+    }
+
+    /**
+     * This method is to update the whole object in registry
+     *
+     * @param dataType          Data type is a predefined type which the programmer should choose according to the object he
+     *                          is going to save in to registry
+     * @param newObjectToUpdate Object which contains the fields that need to be updated in to registry. This object is a
+     *                          thrift model object. In experiment case this object can be BasicMetadata, ConfigurationData
+     *                          etc. CPI programmer can only fill necessary fields that need to be updated. He does not
+     *                          have to fill the whole object. He needs to only fill the mandatory fields and whatever the
+     *                          other fields that need to be updated.
+     */
+    @Override
+    public void update(RegistryModelType dataType, Object newObjectToUpdate, Object identifier) throws RegistryException {
+        try {
+            switch (dataType) {
+                case PROJECT:
+                    projectRepository.updateProject((Project) newObjectToUpdate, (String) identifier);
+                    break;
+                case GATEWAY:
+                    gatewayRepository.updateGateway((String) identifier, (Gateway) newObjectToUpdate);
+                    break;
+                case EXPERIMENT:
+                    experimentRegistry.updateExperiment((Experiment) newObjectToUpdate, (String) identifier);
+                    break;
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    experimentRegistry.updateUserConfigData((UserConfigurationData) newObjectToUpdate, (String) identifier);
+                    break;
+                case EXPERIMENT_OUTPUT:
+                    experimentRegistry.updateExpOutputs((List<OutputDataObjectType>) newObjectToUpdate, (String) identifier);
+                    break;
+                case EXPERIMENT_STATUS:
+                    experimentRegistry.updateExperimentStatus((ExperimentStatus) newObjectToUpdate, (String) identifier);
+                    break;
+                case WORKFLOW_NODE_DETAIL:
+                    experimentRegistry.updateWorkflowNodeDetails((WorkflowNodeDetails) newObjectToUpdate, (String) identifier);
+                    break;
+                case WORKFLOW_NODE_STATUS:
+                    experimentRegistry.updateWorkflowNodeStatus((WorkflowNodeStatus) newObjectToUpdate, (String) identifier);
+                    break;
+                case NODE_OUTPUT:
+                    experimentRegistry.updateNodeOutputs((List<OutputDataObjectType>) newObjectToUpdate, (String) identifier);
+                    break;
+                case TASK_DETAIL:
+                    experimentRegistry.updateTaskDetails((TaskDetails) newObjectToUpdate, (String) identifier);
+                    break;
+                case APPLICATION_OUTPUT:
+                    experimentRegistry.updateAppOutputs((List<OutputDataObjectType>) newObjectToUpdate, (String) identifier);
+                    break;
+                case TASK_STATUS:
+                    experimentRegistry.updateTaskStatus((TaskStatus) newObjectToUpdate, (String) identifier);
+                    break;
+                case JOB_DETAIL:
+                    experimentRegistry.updateJobDetails((JobDetails) newObjectToUpdate, (CompositeIdentifier) identifier);
+                    break;
+                case JOB_STATUS:
+                    experimentRegistry.updateJobStatus((JobStatus) newObjectToUpdate, (CompositeIdentifier) identifier);
+                    break;
+                case APPLICATION_STATUS:
+                    experimentRegistry.updateApplicationStatus((ApplicationStatus) newObjectToUpdate, (CompositeIdentifier) identifier);
+                    break;
+                case DATA_TRANSFER_DETAIL:
+                    experimentRegistry.updateDataTransferDetails((DataTransferDetails) newObjectToUpdate, (CompositeIdentifier) identifier);
+                    break;
+                case TRANSFER_STATUS:
+                    experimentRegistry.updateTransferStatus((TransferStatus) newObjectToUpdate, (CompositeIdentifier) identifier);
+                    break;
+                case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                    experimentRegistry.updateScheduling((ComputationalResourceScheduling) newObjectToUpdate, (String) identifier, dataType.toString());
+                    break;
+                case ADVANCE_INPUT_DATA_HANDLING:
+                    experimentRegistry.updateInputDataHandling((AdvancedInputDataHandling) newObjectToUpdate, (String) identifier, dataType.toString());
+                    break;
+                case ADVANCE_OUTPUT_DATA_HANDLING:
+                    experimentRegistry.updateOutputDataHandling((AdvancedOutputDataHandling) newObjectToUpdate, (String) identifier, dataType.toString());
+                    break;
+                case QOS_PARAM:
+                    experimentRegistry.updateQOSParams((QualityOfServiceParams) newObjectToUpdate, (String) identifier, dataType.toString());
+                    break;
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while updating the resource.." + dataType.toString(), e);
+        }
+
+    }
+
+    /**
+     * This method is to update a specific field of the data model
+     *
+     * @param dataType   Data type is a predefined type which the programmer should choose according to the object he
+     *                   is going to save in to registry
+     * @param identifier Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
+     *                   identifier will be generated experimentID
+     * @param fieldName  Field which need to be updated in the registry. In Experiment_Basic_Type, if you want to update the
+     *                   description, field will be "description". Field names are defined in
+     *                   org.apache.airavata.registry.cpi.utils.Constants
+     * @param value      Value by which the given field need to be updated. If the field is "description", that field will be
+     *                   updated by given value
+     */
+    @Override
+    public void update(RegistryModelType dataType, Object identifier, String fieldName, Object value) throws RegistryException {
+        try {
+            switch (dataType) {
+                case EXPERIMENT:
+                    experimentRegistry.updateExperimentField((String) identifier, fieldName, value);
+                    break;
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    experimentRegistry.updateExpConfigDataField((String) identifier, fieldName, value);
+                    break;
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while updating the resource " + dataType.toString(), e);
+        }
+
+    }
+
+    /**
+     * This method is to retrieve object according to the identifier. In the experiment basic data type, if you give the
+     * experiment id, this method will return the BasicMetadata object
+     *
+     * @param dataType   Data type is a predefined type which the programmer should choose according to the object he
+     *                   is going to save in to registry
+     * @param identifier Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
+     *                   identifier will be generated experimentID
+     * @return object according to the given identifier.
+     */
+    @Override
+    public Object get(RegistryModelType dataType, Object identifier) throws RegistryException {
+        try {
+            switch (dataType) {
+                case PROJECT:
+                    return projectRepository.getProject((String)identifier);
+                case GATEWAY:
+                    return gatewayRepository.getGateway((String)identifier);
+                case EXPERIMENT:
+                    return experimentRegistry.getExperiment((String) identifier, null);
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    return experimentRegistry.getConfigData((String) identifier, null);
+                case EXPERIMENT_OUTPUT:
+                    return experimentRegistry.getExperimentOutputs((String) identifier);
+                case EXPERIMENT_STATUS:
+                    return experimentRegistry.getExperimentStatus((String) identifier);
+                case WORKFLOW_NODE_DETAIL:
+                    return experimentRegistry.getWorkflowNodeDetails((String) identifier);
+                case WORKFLOW_NODE_STATUS:
+                    return experimentRegistry.getWorkflowNodeStatus((String) identifier);
+                case NODE_OUTPUT:
+                    return experimentRegistry.getNodeOutputs((String) identifier);
+                case TASK_DETAIL:
+                    return experimentRegistry.getTaskDetails((String) identifier);
+                case APPLICATION_OUTPUT:
+                    return experimentRegistry.getApplicationOutputs((String) identifier);
+                case TASK_STATUS:
+                    return experimentRegistry.getTaskStatus((String) identifier);
+                case JOB_DETAIL:
+                    return experimentRegistry.getJobDetails((CompositeIdentifier) identifier);
+                case JOB_STATUS:
+                    return experimentRegistry.getJobStatus((CompositeIdentifier) identifier);
+                case APPLICATION_STATUS:
+                    return experimentRegistry.getApplicationStatus((CompositeIdentifier) identifier);
+                case DATA_TRANSFER_DETAIL:
+                    return experimentRegistry.getDataTransferDetails((CompositeIdentifier) identifier);
+                case TRANSFER_STATUS:
+                    return experimentRegistry.getDataTransferStatus((CompositeIdentifier) identifier);
+                case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                    return experimentRegistry.getComputationalScheduling(dataType, (String) identifier);
+                case ADVANCE_INPUT_DATA_HANDLING:
+                    return experimentRegistry.getInputDataHandling(dataType, (String) identifier);
+                case ADVANCE_OUTPUT_DATA_HANDLING:
+                    return experimentRegistry.getOutputDataHandling(dataType, (String) identifier);
+                case QOS_PARAM:
+                    return experimentRegistry.getQosParams(dataType, (String) identifier);
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while retrieving the resource " + dataType.toString() , e);
+        }
+    }
+
+    /**
+     * This method is to retrieve list of objects according to a given criteria
+     *
+     * @param dataType  Data type is a predefined type which the programmer should choose according to the object he
+     *                  is going to save in to registry
+     * @param fieldName FieldName is the field that filtering should be done. For example, if we want to retrieve all
+     *                  the experiments for a given user, filterBy will be "userName"
+     * @param value     value for the filtering field. In the experiment case, value for "userName" can be "admin"
+     * @return List of objects according to the given criteria
+     */
+    @Override
+    public List<Object> get(RegistryModelType dataType, String fieldName, Object value) throws RegistryException {
+        try {
+            List<Object> result = new ArrayList<Object>();
+            switch (dataType) {
+                case PROJECT:
+                    List<Project> projectList = projectRepository.getProjectList(fieldName, value);
+                    for (Project project : projectList ){
+                        result.add(project);
+                    }
+                    return result;
+                case GATEWAY:
+                    List<Gateway> allGateways = gatewayRepository.getAllGateways();
+                    for (Gateway gateway : allGateways){
+                        result.add(gateway);
+                    }
+                    return result;
+                case EXPERIMENT:
+                    List<Experiment> experimentList = experimentRegistry.getExperimentList(fieldName, value);
+                    for (Experiment experiment : experimentList) {
+                        result.add(experiment);
+                    }
+                    return result;
+                case WORKFLOW_NODE_DETAIL:
+                    List<WorkflowNodeDetails> wfNodeDetails = experimentRegistry.getWFNodeDetails(fieldName, value);
+                    for (WorkflowNodeDetails wf : wfNodeDetails) {
+                        result.add(wf);
+                    }
+                    return result;
+                case WORKFLOW_NODE_STATUS:
+                    List<WorkflowNodeStatus> wfNodeStatusList = experimentRegistry.getWFNodeStatusList(fieldName, value);
+                    for (WorkflowNodeStatus wfs : wfNodeStatusList) {
+                        result.add(wfs);
+                    }
+                    return result;
+                case TASK_DETAIL:
+                    List<TaskDetails> taskDetails = experimentRegistry.getTaskDetails(fieldName, value);
+                    for (TaskDetails task : taskDetails) {
+                        result.add(task);
+                    }
+                    return result;
+                case JOB_DETAIL:
+                    List<JobDetails> jobDetails = experimentRegistry.getJobDetails(fieldName, value);
+                    for (JobDetails job : jobDetails) {
+                        result.add(job);
+                    }
+                    return result;
+                case DATA_TRANSFER_DETAIL:
+                    List<DataTransferDetails> dataTransferDetails = experimentRegistry.getDataTransferDetails(fieldName, value);
+                    for (DataTransferDetails transferDetails : dataTransferDetails) {
+                        result.add(transferDetails);
+                    }
+                    return result;
+                case ERROR_DETAIL:
+                    List<ErrorDetails> errorDetails = experimentRegistry.getErrorDetails(fieldName, value);
+                    for (ErrorDetails error : errorDetails) {
+                        result.add(error);
+                    }
+                    return result;
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while retrieving the resource " + dataType.toString(), e);
+        }
+
+    }
+
+    /**
+     * This method is to retrieve list of objects according to a given criteria with pagination and ordering
+     *
+     * @param dataType  Data type is a predefined type which the programmer should choose according to the object he
+     *                  is going to save in to registry
+     * @param fieldName FieldName is the field that filtering should be done. For example, if we want to retrieve all
+     *                  the experiments for a given user, filterBy will be "userName"
+     * @param value     value for the filtering field. In the experiment case, value for "userName" can be "admin"
+     * @param limit     Size of the results to be returned
+     * @param offset    Start position of the results to be retrieved
+     * @param orderByIdentifier     Named of the column in which the ordering is based
+     * @param resultOrderType       Type of ordering i.e ASC or DESC
+     * @return
+     * @throws RegistryException
+     */
+    @Override
+    public List<Object> get(RegistryModelType dataType, String fieldName, Object value, int limit,
+                            int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+        try {
+            List<Object> result = new ArrayList<Object>();
+            switch (dataType) {
+                case PROJECT:
+                    List<Project> projectList = projectRepository
+                            .getProjectList(fieldName, value, limit, offset, orderByIdentifier, resultOrderType);
+                    for (Project project : projectList ){
+                        result.add(project);
+                    }
+                    return result;
+                case EXPERIMENT:
+                    List<Experiment> experimentList = experimentRegistry.getExperimentList(fieldName, value,
+                            limit, offset, orderByIdentifier, resultOrderType);
+                    for (Experiment experiment : experimentList) {
+                        result.add(experiment);
+                    }
+                    return result;
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while retrieving the resource " + dataType.toString(), e);
+        }
+    }
+
+    /**
+     * This method is to retrieve list of objects according to a given criteria
+     * @param dataType Data type is a predefined type which the programmer should choose according to the object he
+     *                 is going to save in to registry
+     * @param filters filters is a map of field name and value that you need to use for search filtration
+     * @return List of objects according to the given criteria
+     */
+    @Override
+    public List<Object> search(RegistryModelType dataType, Map<String, String> filters) throws RegistryException {
+        return search(dataType, filters, -1, -1, null, null);
+    }
+
+    /**
+     * This method is to retrieve list of objects with pagination according to a given criteria sorted
+     * according by the specified  identified and specified ordering (i.e either ASC or DESC)
+     * @param dataType Data type is a predefined type which the programmer should choose according to the object he
+     *                 is going to save in to registry
+     * @param filters            filters is a map of field name and value that you need to use for search filtration
+     * @param limit              amount of the results to be returned
+     * @param offset             offset of the results from the sorted list to be fetched from
+     * @param orderByIdentifier  identifier (i.e the column) which will be used as the basis to sort the results
+     * @param resultOrderType    The type of ordering (i.e ASC or DESC) that has to be used when retrieving the results
+     * @return List of objects according to the given criteria
+     */
+    @Override
+    public List<Object> search(RegistryModelType dataType, Map<String, String> filters, int limit,
+                               int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+        try {
+            List<Object> result = new ArrayList<Object>();
+            switch (dataType) {
+                case PROJECT:
+                    List<Project> projectList
+                            = projectRepository.searchProjects(filters, limit, offset,
+                            orderByIdentifier, resultOrderType);
+                    for (Project project : projectList ){
+                        result.add(project);
+                    }
+                    return result;
+                case EXPERIMENT:
+                    List<ExperimentSummary> experimentSummaries = experimentRegistry
+                            .searchExperiments(filters, limit, offset, orderByIdentifier,
+                                    resultOrderType);
+                    for (ExperimentSummary ex : experimentSummaries){
+                        result.add(ex);
+                    }
+                    return result;
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while retrieving the resource " + dataType.toString(), e);
+        }
+    }
+
+    /**
+     * This method is to retrieve a specific value for a given field.
+     *
+     * @param dataType   Data type is a predefined type which the programmer should choose according to the object he
+     *                   is going to save in to registry
+     * @param identifier Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
+     *                   identifier will be generated experimentID
+     * @param field      field that filtering should be done. For example, if we want to execution user for a given
+     *                   experiment, field will be "userName"
+     * @return return the value for the specific field where data model is identified by the unique identifier that has
+     * given
+     */
+    @Override
+    public Object getValue(RegistryModelType dataType, Object identifier, String field) throws RegistryException {
+        try {
+            switch (dataType) {
+                case EXPERIMENT:
+                    return experimentRegistry.getExperiment((String) identifier, field);
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    return experimentRegistry.getConfigData((String) identifier, field);
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while retrieving the resource " + dataType.toString(), e);
+        }
+
+    }
+
+    /**
+     * This method is to retrieve all the identifiers according to given filtering criteria. For an example, if you want
+     * to get all the experiment ids for a given gateway, your field name will be "gateway" and the value will be the
+     * name of the gateway ("default"). Similar manner you can retrieve all the experiment ids for a given user.
+     *
+     * @param dataType  Data type is a predefined type which the programmer should choose according to the object he
+     *                  is going to save in to registry
+     * @param fieldName FieldName is the field that filtering should be done. For example, if we want to retrieve all
+     *                  the experiments for a given user, filterBy will be "userName"
+     * @param value     value for the filtering field. In the experiment case, value for "userName" can be "admin"
+     * @return id list according to the filtering criteria
+     */
+    @Override
+    public List<String> getIds(RegistryModelType dataType, String fieldName, Object value) throws RegistryException {
+        try {
+            switch (dataType) {
+                case PROJECT:
+                    return projectRepository.getProjectIds(fieldName, value);
+                case EXPERIMENT:
+                    return experimentRegistry.getExperimentIds(fieldName, value);
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    return experimentRegistry.getExperimentIds(fieldName, value);
+                case WORKFLOW_NODE_DETAIL:
+                    return experimentRegistry.getWorkflowNodeIds(fieldName, value);
+                case TASK_DETAIL:
+                    return experimentRegistry.getTaskDetailIds(fieldName, value);
+                case JOB_DETAIL:
+                    return experimentRegistry.getJobDetailIds(fieldName, value);
+                case DATA_TRANSFER_DETAIL:
+                    return experimentRegistry.getTransferDetailIds(fieldName, value);
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving the ids for" + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while retrieving the ids for " + dataType.toString(), e);
+        }
+
+    }
+
+    /**
+     * This method is to remove a item from the registry
+     *
+     * @param dataType   Data type is a predefined type which the programmer should choose according to the object he
+     *                   is going to save in to registry
+     * @param identifier Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
+     *                   identifier will be generated experimentID
+     */
+    @Override
+    public void remove(RegistryModelType dataType, Object identifier) throws RegistryException {
+        try {
+            switch (dataType) {
+                case PROJECT:
+                    projectRepository.removeProject((String) identifier);
+                    break;
+                case GATEWAY:
+                    gatewayRepository.removeGateway((String) identifier);
+                    break;
+                case EXPERIMENT:
+                    experimentRegistry.removeExperiment((String) identifier);
+                    break;
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    experimentRegistry.removeExperimentConfigData((String) identifier);
+                    break;
+                case WORKFLOW_NODE_DETAIL:
+                    experimentRegistry.removeWorkflowNode((String) identifier);
+                    break;
+                case TASK_DETAIL:
+                    experimentRegistry.removeTaskDetails((String) identifier);
+                    break;
+                case JOB_DETAIL:
+                    experimentRegistry.removeJobDetails((CompositeIdentifier) identifier);
+                    break;
+                case DATA_TRANSFER_DETAIL:
+                    experimentRegistry.removeDataTransferDetails((CompositeIdentifier) identifier);
+                    break;
+                case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                    experimentRegistry.removeComputationalScheduling(dataType, (String) identifier);
+                    break;
+                case ADVANCE_OUTPUT_DATA_HANDLING:
+                    experimentRegistry.removeOutputDataHandling(dataType, (String) identifier);
+                    break;
+                case ADVANCE_INPUT_DATA_HANDLING:
+                    experimentRegistry.removeInputDataHandling(dataType, (String) identifier);
+                    break;
+                case QOS_PARAM:
+                    experimentRegistry.removeQOSParams(dataType, (String) identifier);
+                    break;
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while removing the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while removing the resource " + dataType.toString(), e);
+        }
+
+    }
+
+    /**
+     * This method will check whether a given data type which can be identified with the identifier exists or not
+     *
+     * @param dataType   Data type is a predefined type which the programmer should choose according to the object he
+     *                   is going to save in to registry
+     * @param identifier Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
+     *                   identifier will be generated experimentID
+     * @return whether the given data type exists or not
+     */
+    @Override
+    public boolean isExist(RegistryModelType dataType, Object identifier) throws RegistryException {
+        try {
+            switch (dataType) {
+                case PROJECT:
+                    return projectRepository.isProjectExist((String)identifier);
+                case GATEWAY:
+                    return gatewayRepository.isGatewayExist((String)identifier);
+                case EXPERIMENT:
+                    return experimentRegistry.isExperimentExist((String) identifier);
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    return experimentRegistry.isExperimentConfigDataExist((String) identifier);
+                case WORKFLOW_NODE_DETAIL:
+                    return experimentRegistry.isWFNodeExist((String) identifier);
+                case TASK_DETAIL:
+                    return experimentRegistry.isTaskDetailExist((String) identifier);
+                case JOB_DETAIL:
+                    return experimentRegistry.isJobDetailExist((CompositeIdentifier) identifier);
+                case DATA_TRANSFER_DETAIL:
+                    return experimentRegistry.isTransferDetailExist((CompositeIdentifier) identifier);
+                case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                    return experimentRegistry.isComputationalSchedulingExist(dataType, (String) identifier);
+                case ADVANCE_INPUT_DATA_HANDLING:
+                    return experimentRegistry.isInputDataHandlingExist(dataType, (String) identifier);
+                case ADVANCE_OUTPUT_DATA_HANDLING:
+                    return experimentRegistry.isOutputDataHandlingExist(dataType, (String) identifier);
+                case QOS_PARAM:
+                    return experimentRegistry.isQOSParamsExist(dataType, (String) identifier);
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while checking existence of the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while checking existence of the resource " + dataType.toString(), e);
+        }
+    }
+
+}


[14/44] airavata git commit: Adding mongo-registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
new file mode 100644
index 0000000..56a4e57
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
@@ -0,0 +1,229 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.ErrorDetail;
+import org.apache.airavata.persistance.registry.jpa.model.Experiment;
+import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
+import org.apache.airavata.persistance.registry.jpa.model.WorkflowNodeDetail;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import java.sql.Timestamp;
+import java.util.List;
+
+public class ErrorDetailResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(ErrorDetailResource.class);
+    private int errorId;
+    private ExperimentResource experimentResource;
+    private TaskDetailResource taskDetailResource;
+    private WorkflowNodeDetailResource nodeDetail;
+    private Timestamp creationTime;
+    private String actualErrorMsg;
+    private String userFriendlyErrorMsg;
+    private boolean transientPersistent;
+    private String errorCategory;
+    private String correctiveAction;
+    private String actionableGroup;
+    private String jobId;
+
+    public int getErrorId() {
+        return errorId;
+    }
+
+    public void setErrorId(int errorId) {
+        this.errorId = errorId;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public String getActualErrorMsg() {
+        return actualErrorMsg;
+    }
+
+    public void setActualErrorMsg(String actualErrorMsg) {
+        this.actualErrorMsg = actualErrorMsg;
+    }
+
+    public String getUserFriendlyErrorMsg() {
+        return userFriendlyErrorMsg;
+    }
+
+    public void setUserFriendlyErrorMsg(String userFriendlyErrorMsg) {
+        this.userFriendlyErrorMsg = userFriendlyErrorMsg;
+    }
+
+    public boolean isTransientPersistent() {
+        return transientPersistent;
+    }
+
+    public void setTransientPersistent(boolean transientPersistent) {
+        this.transientPersistent = transientPersistent;
+    }
+
+    public String getErrorCategory() {
+        return errorCategory;
+    }
+
+    public void setErrorCategory(String errorCategory) {
+        this.errorCategory = errorCategory;
+    }
+
+    public String getCorrectiveAction() {
+        return correctiveAction;
+    }
+
+    public void setCorrectiveAction(String correctiveAction) {
+        this.correctiveAction = correctiveAction;
+    }
+
+    public String getActionableGroup() {
+        return actionableGroup;
+    }
+
+    public void setActionableGroup(String actionableGroup) {
+        this.actionableGroup = actionableGroup;
+    }
+
+    public ExperimentResource getExperimentResource() {
+        return experimentResource;
+    }
+
+    public void setExperimentResource(ExperimentResource experimentResource) {
+        this.experimentResource = experimentResource;
+    }
+
+    public TaskDetailResource getTaskDetailResource() {
+        return taskDetailResource;
+    }
+
+    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
+        this.taskDetailResource = taskDetailResource;
+    }
+
+    public WorkflowNodeDetailResource getNodeDetail() {
+        return nodeDetail;
+    }
+
+    public void setNodeDetail(WorkflowNodeDetailResource nodeDetail) {
+        this.nodeDetail = nodeDetail;
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+
+    
+    public Resource create(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for error details data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void remove(ResourceType type, Object name) throws RegistryException {
+        logger.error("Unsupported resource type for error details data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Resource get(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for error details data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        logger.error("Unsupported resource type for error details data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            ErrorDetail errorDetail;
+            if (errorId != 0) {
+                errorDetail = em.find(ErrorDetail.class, errorId);
+                errorDetail.setErrorId(errorId);
+            } else {
+                errorDetail = new ErrorDetail();
+            }
+            errorDetail.setErrorId(errorId);
+            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
+            errorDetail.setExperiment(experiment);
+            errorDetail.setExpId(experimentResource.getExpID());
+            if (taskDetailResource != null) {
+                TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
+                errorDetail.setTask(taskDetail);
+                errorDetail.setTaskId(taskDetail.getTaskId());
+            }
+
+            if (nodeDetail != null) {
+                WorkflowNodeDetail workflowNodeDetail = em.find(WorkflowNodeDetail.class, nodeDetail.getNodeInstanceId());
+                errorDetail.setNodeDetails(workflowNodeDetail);
+                errorDetail.setNodeId(workflowNodeDetail.getNodeId());
+            }
+            errorDetail.setCreationTime(creationTime);
+            if (actualErrorMsg != null){
+                errorDetail.setActualErrorMsg(actualErrorMsg.toCharArray());
+            }
+
+            errorDetail.setUserFriendlyErrorMsg(userFriendlyErrorMsg);
+            errorDetail.setTransientPersistent(transientPersistent);
+            errorDetail.setErrorCategory(errorCategory);
+            errorDetail.setCorrectiveAction(correctiveAction);
+            errorDetail.setActionableGroup(actionableGroup);
+            errorDetail.setJobId(jobId);
+            em.persist(errorDetail);
+            errorId = errorDetail.getErrorId();
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java
new file mode 100644
index 0000000..1466522
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java
@@ -0,0 +1,229 @@
+/*
+*
+* 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.Experiment;
+import org.apache.airavata.persistance.registry.jpa.model.Experiment_Input;
+import org.apache.airavata.persistance.registry.jpa.model.Experiment_Input_PK;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import java.util.List;
+
+public class ExperimentInputResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(ExperimentInputResource.class);
+
+    private ExperimentResource experimentResource;
+    private String experimentKey;
+    private String value;
+    private String metadata;
+    private String dataType;
+    private String appArgument;
+    private boolean standardInput;
+    private String userFriendlyDesc;
+    private int inputOrder;
+    private boolean isRequired;
+    private boolean requiredToCMD;
+    private boolean dataStaged;
+
+    public boolean getRequired() {
+        return isRequired;
+    }
+
+    public void setRequired(boolean required) {
+        this.isRequired = required;
+    }
+
+    public boolean getRequiredToCMD() {
+        return requiredToCMD;
+    }
+
+    public void setRequiredToCMD(boolean requiredToCMD) {
+        this.requiredToCMD = requiredToCMD;
+    }
+
+    public boolean isDataStaged() {
+        return dataStaged;
+    }
+
+    public void setDataStaged(boolean dataStaged) {
+        this.dataStaged = dataStaged;
+    }
+
+    public int getInputOrder() {
+        return inputOrder;
+    }
+
+    public void setInputOrder(int inputOrder) {
+        this.inputOrder = inputOrder;
+    }
+
+    public String getAppArgument() {
+        return appArgument;
+    }
+
+    public void setAppArgument(String appArgument) {
+        this.appArgument = appArgument;
+    }
+
+    public boolean isStandardInput() {
+        return standardInput;
+    }
+
+    public void setStandardInput(boolean standardInput) {
+        this.standardInput = standardInput;
+    }
+
+    public String getUserFriendlyDesc() {
+        return userFriendlyDesc;
+    }
+
+    public void setUserFriendlyDesc(String userFriendlyDesc) {
+        this.userFriendlyDesc = userFriendlyDesc;
+    }
+
+    public String getExperimentKey() {
+        return experimentKey;
+    }
+
+    public void setExperimentKey(String experimentKey) {
+        this.experimentKey = experimentKey;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public ExperimentResource getExperimentResource() {
+        return experimentResource;
+    }
+
+    public void setExperimentResource(ExperimentResource experimentResource) {
+        this.experimentResource = experimentResource;
+    }
+
+    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 Resource create(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    public Resource get(ResourceType type, Object name) throws RegistryException {
+        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    public List<Resource> get(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            Experiment_Input existingInput = em.find(Experiment_Input.class, new Experiment_Input_PK(experimentResource.getExpID(), experimentKey));
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Experiment_Input exInput = new Experiment_Input();
+            exInput.setEx_key(experimentKey);
+            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
+            exInput.setExperiment(experiment);
+            exInput.setExperiment_id(experiment.getExpId());
+            if (value != null){
+                exInput.setValue(value.toCharArray());
+            }
+            exInput.setDataType(dataType);
+            exInput.setMetadata(metadata);
+            exInput.setAppArgument(appArgument);
+            exInput.setStandardInput(standardInput);
+            exInput.setUserFriendlyDesc(userFriendlyDesc);
+            exInput.setInputOrder(inputOrder);
+            exInput.setRequiredToCMD(requiredToCMD);
+            exInput.setRequired(isRequired);
+            exInput.setDataStaged(dataStaged);
+            if (existingInput != null) {
+                existingInput.setEx_key(experimentKey);
+                existingInput.setExperiment(experiment);
+                existingInput.setExperiment_id(experiment.getExpId());
+                if (value != null){
+                    existingInput.setValue(value.toCharArray());
+                }
+                existingInput.setDataType(dataType);
+                existingInput.setMetadata(metadata);
+                existingInput.setAppArgument(appArgument);
+                existingInput.setStandardInput(standardInput);
+                existingInput.setUserFriendlyDesc(userFriendlyDesc);
+                existingInput.setInputOrder(inputOrder);
+                existingInput.setRequiredToCMD(requiredToCMD);
+                existingInput.setRequired(isRequired);
+                existingInput.setDataStaged(dataStaged);
+                exInput = em.merge(existingInput);
+            } else {
+                em.persist(exInput);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java
new file mode 100644
index 0000000..17bd23a
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java
@@ -0,0 +1,209 @@
+/*
+*
+* 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.Experiment;
+import org.apache.airavata.persistance.registry.jpa.model.Experiment_Output;
+import org.apache.airavata.persistance.registry.jpa.model.Experiment_Output_PK;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import java.util.List;
+
+public class ExperimentOutputResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(ExperimentOutputResource.class);
+
+    private ExperimentResource experimentResource;
+    private String experimentKey;
+    private String value;
+    private String dataType;
+    private boolean isRequired;
+    private boolean dataMovement;
+    private String dataNameLocation;
+    private boolean requiredToCMD;
+    private String searchQuery;
+    private String appArgument;
+
+    public String getSearchQuery() {
+        return searchQuery;
+    }
+
+    public void setSearchQuery(String searchQuery) {
+        this.searchQuery = searchQuery;
+    }
+
+    public String getAppArgument() {
+        return appArgument;
+    }
+
+    public void setAppArgument(String appArgument) {
+        this.appArgument = appArgument;
+    }
+
+
+    public boolean getRequiredToCMD() {
+        return requiredToCMD;
+    }
+
+    public void setRequiredToCMD(boolean requiredToCMD) {
+        this.requiredToCMD = requiredToCMD;
+    }
+
+    public boolean getRequired() {
+        return isRequired;
+    }
+
+    public void setRequired(boolean required) {
+        this.isRequired = required;
+    }
+
+    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 getExperimentKey() {
+        return experimentKey;
+    }
+
+    public void setExperimentKey(String experimentKey) {
+        this.experimentKey = experimentKey;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public ExperimentResource getExperimentResource() {
+        return experimentResource;
+    }
+
+    public void setExperimentResource(ExperimentResource experimentResource) {
+        this.experimentResource = experimentResource;
+    }
+
+    public String getDataType() {
+        return dataType;
+    }
+
+    public void setDataType(String dataType) {
+        this.dataType = dataType;
+    }
+
+    public Resource create(ResourceType type)  throws RegistryException {
+        logger.error("Unsupported resource type for experiment output data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    public void remove(ResourceType type, Object name)  throws RegistryException{
+        logger.error("Unsupported resource type for experiment output data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    public Resource get(ResourceType type, Object name)  throws RegistryException{
+        logger.error("Unsupported resource type for experiment output data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    public List<Resource> get(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for experiment output data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    public void save() throws RegistryException {
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            Experiment_Output existingOutput = em.find(Experiment_Output.class, new Experiment_Output_PK(experimentResource.getExpID(), experimentKey));
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Experiment_Output exOutput = new Experiment_Output();
+            exOutput.setEx_key(experimentKey);
+            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
+            exOutput.setExperiment(experiment);
+            exOutput.setExperiment_id(experiment.getExpId());
+            if (value != null){
+                exOutput.setValue(value.toCharArray());
+            }
+            exOutput.setDataType(dataType);
+            exOutput.setRequired(isRequired);
+            exOutput.setRequiredToCMD(requiredToCMD);
+            exOutput.setDataMovement(dataMovement);
+            exOutput.setDataNameLocation(dataNameLocation);
+            exOutput.setApplicationArgument(appArgument);
+            exOutput.setSearchQuery(searchQuery);
+
+            if (existingOutput != null) {
+                existingOutput.setEx_key(experimentKey);
+                existingOutput.setExperiment(experiment);
+                if (value != null){
+                    existingOutput.setValue(value.toCharArray());
+                }
+                existingOutput.setExperiment_id(experiment.getExpId());
+                existingOutput.setDataType(dataType);
+                existingOutput.setRequired(isRequired);
+                existingOutput.setRequiredToCMD(requiredToCMD);
+                existingOutput.setDataMovement(dataMovement);
+                existingOutput.setDataNameLocation(dataNameLocation);
+                existingOutput.setApplicationArgument(appArgument);
+                existingOutput.setSearchQuery(searchQuery);
+                exOutput = em.merge(existingOutput);
+            } else {
+                em.persist(exOutput);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
new file mode 100644
index 0000000..ab9d924
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
@@ -0,0 +1,777 @@
+/*
+*
+* 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.utils.StatusType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ExperimentResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(ExperimentResource.class);
+//    private WorkerResource worker;
+    private String executionUser;
+    private String expID;
+    private Timestamp creationTime;
+    private GatewayResource gateway;
+    private ProjectResource project;
+    private String expName;
+    private String description;
+    private String applicationId;
+    private String applicationVersion;
+    private String workflowTemplateId;
+    private String workflowTemplateVersion;
+    private String workflowExecutionId;
+    private boolean enableEmailNotifications;
+    private String gatewayExecutionId;
+
+    /**
+     *
+     * @return  experiment ID
+     */
+    public String getExpID() {
+        return expID;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public String getExpName() {
+        return expName;
+    }
+
+    public void setExpName(String expName) {
+        this.expName = expName;
+    }
+
+    public String getApplicationId() {
+        return applicationId;
+    }
+
+    public void setApplicationId(String applicationId) {
+        this.applicationId = applicationId;
+    }
+
+    public String getApplicationVersion() {
+        return applicationVersion;
+    }
+
+    public void setApplicationVersion(String applicationVersion) {
+        this.applicationVersion = applicationVersion;
+    }
+
+    public String getWorkflowTemplateId() {
+        return workflowTemplateId;
+    }
+
+    public void setWorkflowTemplateId(String workflowTemplateId) {
+        this.workflowTemplateId = workflowTemplateId;
+    }
+
+    public String getWorkflowTemplateVersion() {
+        return workflowTemplateVersion;
+    }
+
+    public void setWorkflowTemplateVersion(String workflowTemplateVersion) {
+        this.workflowTemplateVersion = workflowTemplateVersion;
+    }
+
+    public String getWorkflowExecutionId() {
+        return workflowExecutionId;
+    }
+
+    public void setWorkflowExecutionId(String workflowExecutionId) {
+        this.workflowExecutionId = workflowExecutionId;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public boolean isEnableEmailNotifications() {
+        return enableEmailNotifications;
+    }
+
+    public void setEnableEmailNotifications(boolean enableEmailNotifications) {
+        this.enableEmailNotifications = enableEmailNotifications;
+    }
+
+    public String getGatewayExecutionId() {
+        return gatewayExecutionId;
+    }
+
+    public void setGatewayExecutionId(String gatewayExecutionId) {
+        this.gatewayExecutionId = gatewayExecutionId;
+    }
+
+    /**
+     * Since experiments are at the leaf level, this method is not
+     * valid for an experiment
+     * @param type  child resource types
+     * @return UnsupportedOperationException
+     */
+    public Resource create(ResourceType type) throws RegistryException {
+    	switch (type){
+	        case EXPERIMENT_INPUT:
+	        	ExperimentInputResource inputResource = new ExperimentInputResource();
+	            inputResource.setExperimentResource(this);
+	            return inputResource;
+            case EXPERIMENT_OUTPUT:
+                ExperimentOutputResource experimentOutputResource = new ExperimentOutputResource();
+                experimentOutputResource.setExperimentResource(this);
+                return experimentOutputResource;
+            case NOTIFICATION_EMAIL:
+                NotificationEmailResource emailResource = new NotificationEmailResource();
+                emailResource.setExperimentResource(this);
+                return emailResource;
+            case WORKFLOW_NODE_DETAIL:
+                WorkflowNodeDetailResource nodeDetailResource = new WorkflowNodeDetailResource();
+                nodeDetailResource.setExperimentResource(this);
+                return nodeDetailResource;
+            case ERROR_DETAIL:
+                ErrorDetailResource errorDetailResource = new ErrorDetailResource();
+                errorDetailResource.setExperimentResource(this);
+                return errorDetailResource;
+            case STATUS:
+                StatusResource statusResource = new StatusResource();
+                statusResource.setExperimentResource(this);
+                return statusResource;
+            case CONFIG_DATA:
+                ConfigDataResource configDataResource = new ConfigDataResource();
+                configDataResource.setExperimentResource(this);
+                return configDataResource;
+            case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                ComputationSchedulingResource schedulingResource = new ComputationSchedulingResource();
+                schedulingResource.setExperimentResource(this);
+                return schedulingResource;
+            case ADVANCE_INPUT_DATA_HANDLING:
+                AdvanceInputDataHandlingResource dataHandlingResource = new AdvanceInputDataHandlingResource();
+                dataHandlingResource.setExperimentResource(this);
+                return dataHandlingResource;
+            case ADVANCE_OUTPUT_DATA_HANDLING:
+                AdvancedOutputDataHandlingResource outputDataHandlingResource = new AdvancedOutputDataHandlingResource();
+                outputDataHandlingResource.setExperimentResource(this);
+                return outputDataHandlingResource;
+            case QOS_PARAM:
+                QosParamResource qosParamResource = new QosParamResource();
+                qosParamResource.setExperimentResource(this);
+                return qosParamResource;
+	        default:
+                logger.error("Unsupported resource type for experiment resource.", new IllegalArgumentException());
+	            throw new IllegalArgumentException("Unsupported resource type for experiment resource.");
+	    }
+    }
+
+    /**
+     *
+     * @param type  child resource types
+     * @param name name of the child resource
+     * @return UnsupportedOperationException
+     */
+    public void remove(ResourceType type, Object name) throws RegistryException {
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+            QueryGenerator generator;
+            switch (type) {
+                case EXPERIMENT_INPUT:
+                    generator = new QueryGenerator(EXPERIMENT_INPUT);
+                    generator.setParameter(ExperimentInputConstants.EXPERIMENT_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case EXPERIMENT_OUTPUT:
+                    generator = new QueryGenerator(EXPERIMENT_OUTPUT);
+                    generator.setParameter(ExperimentOutputConstants.EXPERIMENT_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case NOTIFICATION_EMAIL:
+                    generator = new QueryGenerator(NOTIFICATION_EMAIL);
+                    generator.setParameter(NotificationEmailConstants.EXPERIMENT_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case WORKFLOW_NODE_DETAIL:
+                    generator = new QueryGenerator(WORKFLOW_NODE_DETAIL);
+                    generator.setParameter(WorkflowNodeDetailsConstants.NODE_INSTANCE_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case ERROR_DETAIL:
+                    generator = new QueryGenerator(ERROR_DETAIL);
+                    generator.setParameter(ErrorDetailConstants.EXPERIMENT_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case STATUS:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(StatusConstants.EXPERIMENT_ID, name);
+                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.EXPERIMENT.toString());
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case CONFIG_DATA:
+                    generator = new QueryGenerator(CONFIG_DATA);
+                    generator.setParameter(ExperimentConfigurationDataConstants.EXPERIMENT_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                    generator = new QueryGenerator(COMPUTATIONAL_RESOURCE_SCHEDULING);
+                    generator.setParameter(ComputationalResourceSchedulingConstants.EXPERIMENT_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case ADVANCE_INPUT_DATA_HANDLING:
+                    generator = new QueryGenerator(ADVANCE_INPUT_DATA_HANDLING);
+                    generator.setParameter(AdvancedInputDataHandlingConstants.EXPERIMENT_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case ADVANCE_OUTPUT_DATA_HANDLING:
+                    generator = new QueryGenerator(ADVANCE_OUTPUT_DATA_HANDLING);
+                    generator.setParameter(AdvancedOutputDataHandlingConstants.EXPERIMENT_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case QOS_PARAM:
+                    generator = new QueryGenerator(QOS_PARAMS);
+                    generator.setParameter(QosParamsConstants.EXPERIMENT_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                default:
+                    logger.error("Unsupported resource type for experiment resource.", new IllegalArgumentException());
+                    break;
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    /**
+     *
+     * @param type  child resource types
+     * @param name name of the child resource
+     * @return UnsupportedOperationException
+     */
+    public Resource get(ResourceType type, Object name) throws RegistryException {
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            QueryGenerator generator;
+            Query q;
+            switch (type) {
+                case EXPERIMENT_INPUT:
+                    generator = new QueryGenerator(EXPERIMENT_INPUT);
+                    generator.setParameter(ExperimentInputConstants.EXPERIMENT_ID, name);
+                    q = generator.selectQuery(em);
+                    Experiment_Input experimentInput = (Experiment_Input) q.getSingleResult();
+                    ExperimentInputResource inputResource = (ExperimentInputResource) Utils.getResource(ResourceType.EXPERIMENT_INPUT, experimentInput);
+                    em.getTransaction().commit();
+                    em.close();
+                    return inputResource;
+                case EXPERIMENT_OUTPUT:
+                    generator = new QueryGenerator(EXPERIMENT_OUTPUT);
+                    generator.setParameter(ExperimentOutputConstants.EXPERIMENT_ID, name);
+                    q = generator.selectQuery(em);
+                    Experiment_Output experimentOutput = (Experiment_Output) q.getSingleResult();
+                    ExperimentOutputResource outputResource = (ExperimentOutputResource) Utils.getResource(ResourceType.EXPERIMENT_OUTPUT, experimentOutput);
+                    em.getTransaction().commit();
+                    em.close();
+                    return outputResource;
+                case NOTIFICATION_EMAIL:
+                    generator = new QueryGenerator(NOTIFICATION_EMAIL);
+                    generator.setParameter(NotificationEmailConstants.EXPERIMENT_ID, name);
+                    q = generator.selectQuery(em);
+                    Notification_Email notificationEmail = (Notification_Email) q.getSingleResult();
+                    NotificationEmailResource notificationEmailResource = (NotificationEmailResource) Utils.getResource(ResourceType.NOTIFICATION_EMAIL, notificationEmail);
+                    em.getTransaction().commit();
+                    em.close();
+                    return notificationEmailResource;
+                case WORKFLOW_NODE_DETAIL:
+                    generator = new QueryGenerator(WORKFLOW_NODE_DETAIL);
+                    generator.setParameter(WorkflowNodeDetailsConstants.NODE_INSTANCE_ID, name);
+                    q = generator.selectQuery(em);
+                    WorkflowNodeDetail workflowNodeDetail = (WorkflowNodeDetail) q.getSingleResult();
+                    WorkflowNodeDetailResource nodeDetailResource = (WorkflowNodeDetailResource) Utils.getResource(ResourceType.WORKFLOW_NODE_DETAIL, workflowNodeDetail);
+                    em.getTransaction().commit();
+                    em.close();
+                    return nodeDetailResource;
+                case ERROR_DETAIL:
+                    generator = new QueryGenerator(ERROR_DETAIL);
+                    generator.setParameter(ErrorDetailConstants.EXPERIMENT_ID, name);
+                    q = generator.selectQuery(em);
+                    ErrorDetail errorDetail = (ErrorDetail) q.getSingleResult();
+                    ErrorDetailResource errorDetailResource = (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
+                    em.getTransaction().commit();
+                    em.close();
+                    return errorDetailResource;
+                case STATUS:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(StatusConstants.EXPERIMENT_ID, name);
+                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.EXPERIMENT.toString());
+                    q = generator.selectQuery(em);
+                    Status status = (Status) q.getSingleResult();
+                    StatusResource statusResource = (StatusResource) Utils.getResource(ResourceType.STATUS, status);
+                    em.getTransaction().commit();
+                    em.close();
+                    return statusResource;
+                case CONFIG_DATA:
+                    generator = new QueryGenerator(CONFIG_DATA);
+                    generator.setParameter(ExperimentConfigurationDataConstants.EXPERIMENT_ID, name);
+                    q = generator.selectQuery(em);
+                    ExperimentConfigData configData = (ExperimentConfigData) q.getSingleResult();
+                    ConfigDataResource configDataResource = (ConfigDataResource) Utils.getResource(ResourceType.CONFIG_DATA, configData);
+                    em.getTransaction().commit();
+                    em.close();
+                    return configDataResource;
+                case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                    generator = new QueryGenerator(COMPUTATIONAL_RESOURCE_SCHEDULING);
+                    generator.setParameter(ComputationalResourceSchedulingConstants.EXPERIMENT_ID, name);
+                    generator.setParameter(ComputationalResourceSchedulingConstants.TASK_ID, null);
+                    q = generator.selectQuery(em);
+                    Computational_Resource_Scheduling scheduling = (Computational_Resource_Scheduling) q.getSingleResult();
+                    ComputationSchedulingResource schedulingResource = (ComputationSchedulingResource) Utils.getResource(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING, scheduling);
+                    em.getTransaction().commit();
+                    em.close();
+                    return schedulingResource;
+                case ADVANCE_INPUT_DATA_HANDLING:
+                    generator = new QueryGenerator(ADVANCE_INPUT_DATA_HANDLING);
+                    generator.setParameter(AdvancedInputDataHandlingConstants.EXPERIMENT_ID, name);
+                    generator.setParameter(AdvancedInputDataHandlingConstants.TASK_ID, null);
+                    q = generator.selectQuery(em);
+                    AdvancedInputDataHandling inputDataHandling = (AdvancedInputDataHandling) q.getSingleResult();
+                    AdvanceInputDataHandlingResource dataHandlingResource = (AdvanceInputDataHandlingResource) Utils.getResource(ResourceType.ADVANCE_INPUT_DATA_HANDLING, inputDataHandling);
+                    em.getTransaction().commit();
+                    em.close();
+                    return dataHandlingResource;
+                case ADVANCE_OUTPUT_DATA_HANDLING:
+                    generator = new QueryGenerator(ADVANCE_OUTPUT_DATA_HANDLING);
+                    generator.setParameter(AdvancedOutputDataHandlingConstants.EXPERIMENT_ID, name);
+                    generator.setParameter(AdvancedOutputDataHandlingConstants.TASK_ID, null);
+                    q = generator.selectQuery(em);
+                    AdvancedOutputDataHandling outputDataHandling = (AdvancedOutputDataHandling) q.getSingleResult();
+                    AdvancedOutputDataHandlingResource outputDataHandlingResource = (AdvancedOutputDataHandlingResource) Utils.getResource(ResourceType.ADVANCE_OUTPUT_DATA_HANDLING, outputDataHandling);
+                    em.getTransaction().commit();
+                    em.close();
+                    return outputDataHandlingResource;
+                case QOS_PARAM:
+                    generator = new QueryGenerator(QOS_PARAMS);
+                    generator.setParameter(QosParamsConstants.EXPERIMENT_ID, name);
+                    generator.setParameter(QosParamsConstants.TASK_ID, null);
+                    q = generator.selectQuery(em);
+                    QosParam qosParam = (QosParam) q.getSingleResult();
+                    QosParamResource qosParamResource = (QosParamResource) Utils.getResource(ResourceType.QOS_PARAM, qosParam);
+                    em.getTransaction().commit();
+                    em.close();
+                    return qosParamResource;
+                default:
+                    em.getTransaction().commit();
+                    em.close();
+                    logger.error("Unsupported resource type for experiment resource.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Unsupported resource type for experiment data resource.");
+            }
+        } catch (Exception e) {
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+
+    }
+
+    /**
+     *
+     * @param type  child resource types
+     * @return UnsupportedOperationException
+     */
+    public List<Resource> get(ResourceType type)  throws RegistryException{
+        List<Resource> resourceList = new ArrayList<Resource>();
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+            QueryGenerator generator;
+            List results;
+            switch (type) {
+                case EXPERIMENT_INPUT:
+                    generator = new QueryGenerator(EXPERIMENT_INPUT);
+                    generator.setParameter(ExperimentInputConstants.EXPERIMENT_ID, expID);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            Experiment_Input exInput = (Experiment_Input) result;
+                            ExperimentInputResource inputResource =
+                                    (ExperimentInputResource) Utils.getResource(ResourceType.EXPERIMENT_INPUT, exInput);
+                            resourceList.add(inputResource);
+                        }
+                    }
+                    break;
+                case EXPERIMENT_OUTPUT:
+                    generator = new QueryGenerator(EXPERIMENT_OUTPUT);
+                    generator.setParameter(ExperimentOutputConstants.EXPERIMENT_ID, expID);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            Experiment_Output output = (Experiment_Output) result;
+                            ExperimentOutputResource outputResource =
+                                    (ExperimentOutputResource) Utils.getResource(ResourceType.EXPERIMENT_OUTPUT, output);
+                            resourceList.add(outputResource);
+                        }
+                    }
+                    break;
+                case NOTIFICATION_EMAIL:
+                    generator = new QueryGenerator(NOTIFICATION_EMAIL);
+                    generator.setParameter(NotificationEmailConstants.EXPERIMENT_ID, expID);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            Notification_Email notificationEmail = (Notification_Email) result;
+                            NotificationEmailResource emailResource =
+                                    (NotificationEmailResource) Utils.getResource(ResourceType.NOTIFICATION_EMAIL, notificationEmail);
+                            resourceList.add(emailResource);
+                        }
+                    }
+                    break;
+                case WORKFLOW_NODE_DETAIL:
+                    generator = new QueryGenerator(WORKFLOW_NODE_DETAIL);
+                    generator.setParameter(WorkflowNodeDetailsConstants.EXPERIMENT_ID, expID);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            WorkflowNodeDetail nodeDetail = (WorkflowNodeDetail) result;
+                            WorkflowNodeDetailResource nodeDetailResource =
+                                    (WorkflowNodeDetailResource) Utils.getResource(ResourceType.WORKFLOW_NODE_DETAIL, nodeDetail);
+                            resourceList.add(nodeDetailResource);
+                        }
+                    }
+                    break;
+                case ERROR_DETAIL:
+                    generator = new QueryGenerator(ERROR_DETAIL);
+                    generator.setParameter(ErrorDetailConstants.EXPERIMENT_ID, expID);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            ErrorDetail errorDetail = (ErrorDetail) result;
+                            ErrorDetailResource errorDetailResource =
+                                    (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
+                            resourceList.add(errorDetailResource);
+                        }
+                    }
+                    break;
+                case STATUS:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(StatusConstants.EXPERIMENT_ID, expID);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            Status status = (Status) result;
+                            StatusResource statusResource =
+                                    (StatusResource) Utils.getResource(ResourceType.STATUS, status);
+                            resourceList.add(statusResource);
+                        }
+                    }
+                    break;
+                default:
+                    em.getTransaction().commit();
+                    em.close();
+                    logger.error("Unsupported resource type for experiment resource.", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return resourceList;
+    }
+
+    /**
+     * saveExperiment experiment
+     */
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            Experiment existingExp = em.find(Experiment.class, expID);
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Experiment experiment = new Experiment();
+            Project projectmodel = em.find(Project.class, project.getId());
+            experiment.setProject(projectmodel);
+            experiment.setProjectId(projectmodel.getProject_id());
+            Gateway gateway = em.find(Gateway.class, getGateway().getGatewayId());
+            experiment.setExpId(expID);
+            experiment.setExecutionUser(executionUser);
+            Users userModel = em.find(Users.class, executionUser);
+            experiment.setUser(userModel);
+            experiment.setExecutionUser(userModel.getUser_name());
+            experiment.setGateway(gateway);
+            experiment.setGatewayId(gateway.getGateway_id());
+            experiment.setCreationTime(creationTime);
+            experiment.setExpName(expName);
+            experiment.setExpDesc(description);
+            experiment.setApplicationId(applicationId);
+            experiment.setAppVersion(applicationVersion);
+            experiment.setWorkflowExecutionId(workflowExecutionId);
+            experiment.setWorkflowTemplateVersion(workflowTemplateVersion);
+            experiment.setWorkflowExecutionId(workflowExecutionId);
+            experiment.setAllowNotification(enableEmailNotifications);
+            experiment.setGatewayExecutionId(gatewayExecutionId);
+            if (existingExp != null) {
+                existingExp.setGateway(gateway);
+                existingExp.setGatewayId(gateway.getGateway_id());
+                existingExp.setProject(projectmodel);
+                existingExp.setExecutionUser(executionUser);
+                existingExp.setUser(userModel);
+                existingExp.setProjectId(projectmodel.getProject_id());
+                existingExp.setCreationTime(creationTime);
+                existingExp.setExpName(expName);
+                existingExp.setExpDesc(description);
+                existingExp.setApplicationId(applicationId);
+                existingExp.setAppVersion(applicationVersion);
+                existingExp.setWorkflowExecutionId(workflowExecutionId);
+                existingExp.setWorkflowTemplateVersion(workflowTemplateVersion);
+                existingExp.setWorkflowExecutionId(workflowExecutionId);
+                existingExp.setAllowNotification(enableEmailNotifications);
+                existingExp.setGatewayExecutionId(gatewayExecutionId);
+                experiment = em.merge(existingExp);
+            } else {
+                em.persist(experiment);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    /**
+     *
+     * @param expID experiment ID
+     */
+    public void setExpID(String expID) {
+		this.expID = expID;
+	}
+
+    /**
+     *
+     * @return gatewayResource
+     */
+    public GatewayResource getGateway() {
+		return gateway;
+	}
+
+    /**
+     *
+     * @param gateway gateway
+     */
+    public void setGateway(GatewayResource gateway) {
+		this.gateway = gateway;
+	}
+
+    public String getExecutionUser() {
+        return executionUser;
+    }
+
+    public void setExecutionUser(String executionUser) {
+        this.executionUser = executionUser;
+    }
+
+    /**
+     *
+     * @return project
+     */
+    public ProjectResource getProject() {
+		return project;
+	}
+
+    /**
+     *
+     * @param project  project
+     */
+    public void setProject(ProjectResource project) {
+		this.project = project;
+	}
+
+    public List<NotificationEmailResource> getNotificationEmails () throws RegistryException{
+        List<NotificationEmailResource> emailResources = new ArrayList<NotificationEmailResource>();
+        List<Resource> resources = get(ResourceType.NOTIFICATION_EMAIL);
+        for (Resource resource : resources) {
+            emailResources.add((NotificationEmailResource) resource);
+        }
+        return emailResources;
+    }
+
+    public List<ExperimentInputResource> getExperimentInputs () throws RegistryException{
+        List<ExperimentInputResource> expInputs = new ArrayList<ExperimentInputResource>();
+        List<Resource> resources = get(ResourceType.EXPERIMENT_INPUT);
+        for (Resource resource : resources) {
+            expInputs.add((ExperimentInputResource) resource);
+        }
+        return expInputs;
+    }
+
+    public List<ExperimentOutputResource> getExperimentOutputs () throws RegistryException{
+        List<ExperimentOutputResource> expOutputs = new ArrayList<ExperimentOutputResource>();
+        List<Resource> resources = get(ResourceType.EXPERIMENT_OUTPUT);
+        for (Resource resource : resources) {
+            expOutputs.add((ExperimentOutputResource) resource);
+        }
+        return expOutputs;
+    }
+
+    public StatusResource getExperimentStatus() throws RegistryException{
+        List<Resource> resources = get(ResourceType.STATUS);
+        for (Resource resource : resources) {
+            StatusResource expStatus = (StatusResource) resource;
+            if(expStatus.getStatusType().equals(StatusType.EXPERIMENT.toString())){
+                if (expStatus.getState() == null || expStatus.getState().equals("") ){
+                    expStatus.setState("UNKNOWN");
+                }
+                return expStatus;
+            }
+        }
+        return null;
+    }
+
+    public List<StatusResource> getWorkflowNodeStatuses() throws RegistryException{
+        List<StatusResource> statuses = new ArrayList<StatusResource>();
+        List<Resource> resources = get(ResourceType.STATUS);
+        for (Resource resource : resources) {
+            StatusResource workflowNodeStatus = (StatusResource) resource;
+            if(workflowNodeStatus.getStatusType().equals(StatusType.WORKFLOW_NODE.toString())){
+                if (workflowNodeStatus.getState() == null || workflowNodeStatus.getState().equals("")){
+                    workflowNodeStatus.setState("UNKNOWN");
+                }
+                statuses.add(workflowNodeStatus);
+            }
+        }
+        return statuses;
+    }
+
+    public List<WorkflowNodeDetailResource> getWorkflowNodeDetails () throws RegistryException{
+        List<WorkflowNodeDetailResource> workflowNodeDetailResourceList = new ArrayList<WorkflowNodeDetailResource>();
+        List<Resource> resources = get(ResourceType.WORKFLOW_NODE_DETAIL);
+        for (Resource resource : resources) {
+            WorkflowNodeDetailResource nodeDetailResource = (WorkflowNodeDetailResource) resource;
+            workflowNodeDetailResourceList.add(nodeDetailResource);
+        }
+        return workflowNodeDetailResourceList;
+    }
+
+    public List<ErrorDetailResource> getErrorDetails () throws RegistryException{
+        List<ErrorDetailResource> errorDetailResources = new ArrayList<ErrorDetailResource>();
+        List<Resource> resources = get(ResourceType.ERROR_DETAIL);
+        for (Resource resource : resources) {
+            ErrorDetailResource errorDetailResource = (ErrorDetailResource) resource;
+            errorDetailResources.add(errorDetailResource);
+        }
+        return errorDetailResources;
+    }
+
+    public ComputationSchedulingResource getComputationScheduling (String expId) throws RegistryException{
+        return  (ComputationSchedulingResource)get(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING, expId);
+    }
+
+    public AdvanceInputDataHandlingResource getInputDataHandling (String expId) throws RegistryException{
+        return  (AdvanceInputDataHandlingResource)get(ResourceType.ADVANCE_INPUT_DATA_HANDLING, expId);
+    }
+
+    public AdvancedOutputDataHandlingResource getOutputDataHandling (String expId) throws RegistryException{
+        return  (AdvancedOutputDataHandlingResource)get(ResourceType.ADVANCE_OUTPUT_DATA_HANDLING, expId);
+    }
+
+    public QosParamResource getQOSparams (String expId) throws RegistryException{
+        return  (QosParamResource)get(ResourceType.QOS_PARAM, expId);
+    }
+
+    public ConfigDataResource getUserConfigData(String expID) throws RegistryException{
+        return (ConfigDataResource)get(ResourceType.CONFIG_DATA, expID);
+    }
+    public WorkflowNodeDetailResource getWorkflowNode (String nodeId) throws RegistryException{
+        return (WorkflowNodeDetailResource)get(ResourceType.WORKFLOW_NODE_DETAIL, nodeId);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
new file mode 100644
index 0000000..d33fb05
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
@@ -0,0 +1,436 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+import java.util.ArrayList;
+import java.util.List;
+
+public class GatewayResource extends AbstractResource {
+    private final static Logger logger = LoggerFactory.getLogger(GatewayResource.class);
+
+    private String gatewayId;
+    private String gatewayName;
+    private String domain;
+    private String emailAddress;
+
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
+
+    public String getEmailAddress() {
+        return emailAddress;
+    }
+
+    public void setEmailAddress(String emailAddress) {
+        this.emailAddress = emailAddress;
+    }
+
+    /**
+     *
+     * @param gatewayId gateway name
+     */
+    public GatewayResource(String gatewayId) {
+    	setGatewayId(gatewayId);
+	}
+
+    /**
+     *
+     */
+    public GatewayResource() {
+	}
+
+    /**
+     *
+     * @return gateway name
+     */
+    public String getGatewayName() {
+        return gatewayName;
+    }
+
+    /**
+     *
+     * @param gatewayName
+     */
+    public void setGatewayName(String gatewayName) {
+        this.gatewayName = gatewayName;
+    }
+
+    /**
+     *
+     * @return domain of the gateway
+     */
+    public String getDomain() {
+        return domain;
+    }
+
+    /**
+     *
+     * @param domain domain of the gateway
+     */
+    public void setDomain(String domain) {
+        this.domain = domain;
+    }
+
+
+    /**
+     * Gateway is at the root level.  So it can populate his child resources.
+     * Project, User, Published Workflows, User workflows, Host descriptors,
+     * Service Descriptors, Application descriptors and Experiments are all
+     * its children
+     * @param type resource type of the children
+     * @return specific child resource type
+     */
+    public Resource create(ResourceType type) throws RegistryException {
+        switch (type) {
+            case PROJECT:
+                ProjectResource projectResource = new ProjectResource();
+                projectResource.setGateway(this);
+                return projectResource;
+            case EXPERIMENT:
+                ExperimentResource experimentResource =new ExperimentResource();
+                experimentResource.setGateway(this);
+                return experimentResource;
+            case GATEWAY_WORKER:
+                WorkerResource workerResource = new WorkerResource();
+                workerResource.setGateway(this);
+                return workerResource;
+            default:
+                logger.error("Unsupported resource type for gateway resource.", new IllegalArgumentException());
+                throw new IllegalArgumentException("Unsupported resource type for gateway resource.");
+        }
+    }
+
+    /**
+     * Child resources can be removed from a gateway
+     * @param type child resource type
+     * @param name child resource name
+     */
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+            QueryGenerator generator;
+            switch (type) {
+                case USER:
+                    generator = new QueryGenerator(USERS);
+                    generator.setParameter(UserConstants.USERNAME, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case EXPERIMENT:
+                    generator = new QueryGenerator(EXPERIMENT);
+                    generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                default:
+                    logger.error("Unsupported resource type for gateway resource.", new IllegalArgumentException());
+                    break;
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    /**
+     * Gateway can getExperiment information of his children
+     * @param type child resource type
+     * @param name child resource name
+     * @return specific child resource type
+     */
+    public Resource get(ResourceType type, Object name) throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            QueryGenerator generator;
+            Query q;
+            switch (type) {
+                case GATEWAY_WORKER:
+                    generator = new QueryGenerator(GATEWAY_WORKER);
+                    generator.setParameter(GatewayWorkerConstants.USERNAME, name);
+                    generator.setParameter(GatewayWorkerConstants.GATEWAY_ID, gatewayId);
+                    q = generator.selectQuery(em);
+                    Gateway_Worker worker = (Gateway_Worker) q.getSingleResult();
+                    WorkerResource workerResource =
+                            (WorkerResource) Utils.getResource(ResourceType.GATEWAY_WORKER, worker);
+                    em.getTransaction().commit();
+                    em.close();
+                    return workerResource;
+                case USER:
+                    generator = new QueryGenerator(USERS);
+                    generator.setParameter(UserConstants.USERNAME, name);
+                    q = generator.selectQuery(em);
+                    Users user = (Users) q.getSingleResult();
+                    UserResource userResource =
+                            (UserResource) Utils.getResource(ResourceType.USER, user);
+                    em.getTransaction().commit();
+                    em.close();
+                    return userResource;
+                case EXPERIMENT:
+                    generator = new QueryGenerator(EXPERIMENT);
+                    generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
+                    q = generator.selectQuery(em);
+                    Experiment experiment = (Experiment) q.getSingleResult();
+                    ExperimentResource experimentResource =
+                            (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
+                    em.getTransaction().commit();
+                    em.close();
+                    return experimentResource;
+                default:
+                    em.getTransaction().commit();
+                    em.close();
+                    logger.error("Unsupported resource type for gateway resource.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Unsupported resource type for gateway resource.");
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    /**
+     *
+     * @param type child resource type
+     * @return list of child resources
+     */
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        List<Resource> resourceList = new ArrayList<Resource>();
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+            QueryGenerator generator;
+            List results;
+            switch (type) {
+                case PROJECT:
+                    generator = new QueryGenerator(PROJECT);
+                    Gateway gatewayModel = em.find(Gateway.class, gatewayId);
+                    generator.setParameter("gateway", gatewayModel);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            Project project = (Project) result;
+                            ProjectResource projectResource =
+                                    (ProjectResource) Utils.getResource(ResourceType.PROJECT, project);
+                            resourceList.add(projectResource);
+                        }
+                    }
+                    break;
+                case GATEWAY_WORKER:
+                    generator = new QueryGenerator(GATEWAY_WORKER);
+                    generator.setParameter(GatewayWorkerConstants.GATEWAY_ID, gatewayId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            Gateway_Worker gatewayWorker = (Gateway_Worker) result;
+                            WorkerResource workerResource =
+                                    (WorkerResource) Utils.getResource(ResourceType.GATEWAY_WORKER, gatewayWorker);
+                            resourceList.add(workerResource);
+                        }
+                    }
+                    break;
+                case EXPERIMENT:
+                    generator = new QueryGenerator(EXPERIMENT);
+                    generator.setParameter(ExperimentConstants.GATEWAY_ID, gatewayId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            Experiment experiment = (Experiment) result;
+                            ExperimentResource experimentResource =
+                                    (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
+                            resourceList.add(experimentResource);
+                        }
+                    }
+                    break;
+                case USER:
+                    generator = new QueryGenerator(USERS);
+                    q = generator.selectQuery(em);
+                    for (Object o : q.getResultList()) {
+                        Users user = (Users) o;
+                        UserResource userResource =
+                                (UserResource) Utils.getResource(ResourceType.USER, user);
+                        resourceList.add(userResource);
+                    }
+                    break;
+                default:
+                    em.getTransaction().commit();
+                    em.close();
+                    logger.error("Unsupported resource type for gateway resource.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Unsupported resource type for gateway resource.");
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return resourceList;
+    }
+
+    /**
+     * saveExperiment the gateway to the database
+     */
+    public void save() throws RegistryException {
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            Gateway existingGateway = em.find(Gateway.class, gatewayId);
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Gateway gateway = new Gateway();
+            gateway.setGateway_name(gatewayName);
+            gateway.setGateway_id(gatewayId);
+            gateway.setDomain(domain);
+            gateway.setEmailAddress(emailAddress);
+            if (existingGateway != null) {
+                existingGateway.setDomain(domain);
+                existingGateway.setGateway_name(gatewayName);
+                existingGateway.setEmailAddress(emailAddress);
+                gateway = em.merge(existingGateway);
+            } else {
+                em.persist(gateway);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+
+    }
+
+    /**
+     * check whether child resource already exist in the database
+     * @param type child resource type
+     * @param name name of the child resource
+     * @return true or false
+     */
+    public boolean isExists(ResourceType type, Object name) throws RegistryException{
+        EntityManager em = null;
+        try {
+            switch (type) {
+                case GATEWAY_WORKER:
+                    em = ResourceUtils.getEntityManager();
+                    Gateway_Worker existingWorker = em.find(Gateway_Worker.class, new Gateway_Worker_PK(gatewayId, name.toString()));
+                    em.close();
+                    return existingWorker != null;
+                case USER:
+                    em = ResourceUtils.getEntityManager();
+                    Users existingUser = em.find(Users.class, name);
+                    em.close();
+                    return existingUser != null;
+                case EXPERIMENT:
+                    em = ResourceUtils.getEntityManager();
+                    Experiment existingExp = em.find(Experiment.class, name.toString());
+                    em.close();
+                    return existingExp != null;
+                default:
+                    logger.error("Unsupported resource type for gateway resource.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Unsupported resource type for gateway resource.");
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    public ExperimentResource createExperiment (String experimentID) throws RegistryException{
+        ExperimentResource metadataResource = (ExperimentResource)create(ResourceType.EXPERIMENT);
+        metadataResource.setExpID(experimentID);
+        return metadataResource;
+    }
+
+    public ExperimentResource getExperiment (String expId) throws RegistryException{
+        return (ExperimentResource)get(ResourceType.EXPERIMENT, expId);
+    }
+
+    public List<ExperimentResource> getExperiments () throws RegistryException{
+        List<ExperimentResource> experiments = new ArrayList<ExperimentResource>();
+        List<Resource> resources = get(ResourceType.EXPERIMENT);
+        for (Resource resource : resources){
+            experiments.add((ExperimentResource)resource);
+        }
+        return experiments;
+    }
+}
+


[36/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupSerializer.java
deleted file mode 100644
index f28348a..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.group;
-
-import org.apache.airavata.model.workspace.Group;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class GroupSerializer extends
-        AbstractThriftSerializer<Group._Fields, Group> {
-    private final static Logger logger = LoggerFactory.getLogger(GroupSerializer.class);
-
-    @Override
-    protected Group._Fields[] getFieldValues() {
-        return Group._Fields.values();
-    }
-
-    @Override
-    protected Class<Group> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectDeserializer.java
deleted file mode 100644
index 5e5c5ea..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.project;
-
-import org.apache.airavata.model.workspace.Project;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class ProjectDeserializer extends
-        AbstractThriftDeserializer<Project._Fields, Project> {
-
-    @Override
-    protected Project._Fields getField(final String fieldName) {
-        return Project._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected Project newInstance() {
-        return new Project();
-    }
-
-    @Override
-    protected void validate(final Project instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectSerializer.java
deleted file mode 100644
index 056ee66..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectSerializer.java
+++ /dev/null
@@ -1,40 +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.persistance.registry.jpa.mongo.conversion.project;
-
-import org.apache.airavata.model.workspace.Project;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ProjectSerializer extends AbstractThriftSerializer<Project._Fields, Project> {
-    private final static Logger logger = LoggerFactory.getLogger(ProjectSerializer.class);
-
-    @Override
-    protected Project._Fields[] getFieldValues() {
-        return Project._Fields.values();
-    }
-
-    @Override
-    protected Class<Project> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserDeserializer.java
deleted file mode 100644
index df595bf..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.user;
-
-import org.apache.airavata.model.workspace.User;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class UserDeserializer extends
-        AbstractThriftDeserializer<User._Fields, User> {
-
-    @Override
-    protected User._Fields getField(final String fieldName) {
-        return User._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected User newInstance() {
-        return new User();
-    }
-
-    @Override
-    protected void validate(final User instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserSerializer.java
deleted file mode 100644
index a09aca2..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserSerializer.java
+++ /dev/null
@@ -1,40 +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.persistance.registry.jpa.mongo.conversion.user;
-
-import org.apache.airavata.model.workspace.User;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class UserSerializer extends AbstractThriftSerializer<User._Fields, User> {
-    private final static Logger logger = LoggerFactory.getLogger(UserSerializer.class);
-
-    @Override
-    protected User._Fields[] getFieldValues() {
-        return User._Fields.values();
-    }
-
-    @Override
-    protected Class<User> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ExperimentDao.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ExperimentDao.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ExperimentDao.java
deleted file mode 100644
index af15716..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ExperimentDao.java
+++ /dev/null
@@ -1,374 +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.persistance.registry.jpa.mongo.dao;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.mongodb.*;
-import com.mongodb.util.JSON;
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.ModelConversionHelper;
-import org.apache.airavata.persistance.registry.jpa.mongo.utils.MongoUtil;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.ResultOrderType;
-import org.apache.airavata.registry.cpi.utils.Constants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-public class ExperimentDao{
-    private final static Logger logger = LoggerFactory.getLogger(ExperimentDao.class);
-
-    private static final String EXPERIMENTS_COLLECTION_NAME = "experiments";
-    private DBCollection collection;
-    private ModelConversionHelper modelConversionHelper;
-
-    private static final String EXPERIMENT_ID = "experiment_id";
-    private static final String EXPERIMENT_NAME= "name";
-    private static final String EXPERIMENT_DESCRIPTION = "description";
-    private static final String USER_NAME = "user_name";
-    private static final String GATEWAY = "gateway_execution_id";
-    private static final String APPLICATION_ID = "application_id";
-    private static final String EXPERIMENT_STATUS_STATE = "experiment_status.experiment_state";
-    private static final String CREATION_TIME = "creation_time";
-
-    //Todo Nested Indexes - Its good if we can get rid of them
-    private static final String WORKFLOW_NODE_ID = "workflow_node_details_list.node_instance_id";
-    private static final String TASK_ID = "workflow_node_details_list.task_details_list.task_id";
-
-
-    public ExperimentDao(){
-        collection = MongoUtil.getAiravataRegistry().getCollection(EXPERIMENTS_COLLECTION_NAME);
-        modelConversionHelper = new ModelConversionHelper();
-        collection.dropIndexes();
-        initIndexes();
-    }
-
-    /**
-     * If indexes are already defined this will simply ignore them
-     */
-    private void initIndexes(){
-        collection.createIndex(new BasicDBObject(EXPERIMENT_ID, 1), new BasicDBObject("unique", true));
-        collection.createIndex(new BasicDBObject(WORKFLOW_NODE_ID, 1));
-        collection.createIndex(new BasicDBObject(TASK_ID, 1));
-
-//        //Defining a full-text index on experiment name and experiment description
-//        BasicDBObject object = new BasicDBObject();
-//        object.put(EXPERIMENT_NAME, "text");
-//        object.put(EXPERIMENT_DESCRIPTION, "text");
-//        collection.createIndex (object);
-    }
-
-    public List<Experiment> getAllExperiments() throws RegistryException{
-        List<Experiment> experimentList = new ArrayList<Experiment>();
-        DBCursor cursor = collection.find();
-        for(DBObject document: cursor){
-            try {
-                experimentList.add((Experiment) modelConversionHelper.deserializeObject(
-                        Experiment.class, document.toString()));
-            } catch (IOException e) {
-                throw new RegistryException(e);
-            }
-        }
-        return experimentList;
-    }
-
-    public void createExperiment(Experiment experiment) throws RegistryException{
-        try {
-            WriteResult result = collection.insert((DBObject) JSON.parse(
-                    modelConversionHelper.serializeObject(experiment)));
-            logger.debug("No of inserted results "+ result.getN());
-        } catch (JsonProcessingException e) {
-            throw new RegistryException(e);
-        }
-    }
-
-    /**
-     * The following operation replaces the document with item equal to
-     * the given experiment id. The newly replaced document will only
-     * contain the the _id field and the fields in the replacement document.
-     * @param experiment
-     * @throws RegistryException
-     */
-    public void updateExperiment(Experiment experiment) throws RegistryException{
-        try {
-            DBObject query = BasicDBObjectBuilder.start().add(
-                    EXPERIMENT_ID, experiment.getExperimentId()).get();
-            WriteResult result = collection.update(query, (DBObject) JSON.parse(
-                    modelConversionHelper.serializeObject(experiment)));
-            logger.debug("No of updated results "+ result.getN());
-        } catch (JsonProcessingException e) {
-            throw new RegistryException(e);
-        }
-    }
-
-    public void deleteExperiment(Experiment experiment) throws RegistryException{
-        DBObject query = BasicDBObjectBuilder.start().add(
-                EXPERIMENT_ID, experiment.getExperimentId()).get();
-        WriteResult result = collection.remove(query);
-        logger.debug("No of removed experiments " + result.getN());
-    }
-
-
-    public Experiment getExperiment(String experimentId) throws RegistryException{
-        try {
-            DBObject criteria = new BasicDBObject(EXPERIMENT_ID, experimentId);
-            DBObject doc = collection.findOne(criteria);
-            if(doc != null){
-                String json = doc.toString();
-                return (Experiment)modelConversionHelper.deserializeObject(
-                        Experiment.class, json);
-            }
-        } catch (IOException e) {
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public List<Experiment> searchExperiments(Map<String, String> filters, int limit,
-        int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException{
-        List<Experiment> experimentList = new ArrayList<Experiment>();
-        BasicDBObjectBuilder queryBuilder = BasicDBObjectBuilder.start();
-        for (String field : filters.keySet()) {
-            if (field.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_NAME)) {
-                queryBuilder.add(EXPERIMENT_NAME, new BasicDBObject(
-                        "$regex", ".*" + filters.get(field) + ".*"));
-            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
-                queryBuilder.add(USER_NAME, filters.get(field));
-            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
-                queryBuilder.add(GATEWAY, filters.get(field));
-            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_DESC)) {
-                queryBuilder.add(EXPERIMENT_DESCRIPTION, new BasicDBObject(
-                        "$regex", ".*" + filters.get(field) + ".*"));
-            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_ID)) {
-                queryBuilder.add(APPLICATION_ID, filters.get(field));
-            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_STATUS)) {
-                queryBuilder.add(EXPERIMENT_STATUS_STATE, filters.get(field));
-            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.FROM_DATE)) {
-                queryBuilder.add(CREATION_TIME,new BasicDBObject("$gte",filters.get(field)));
-            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.TO_DATE)) {
-                queryBuilder.add(CREATION_TIME,new BasicDBObject("$lte",filters.get(field)));
-            }
-        }
-
-        //handling pagination and ordering. ordering is allowed only on CREATION_TIME
-        DBCursor cursor;
-        if(limit > 0 && offset >= 0) {
-            if(orderByIdentifier != null && orderByIdentifier.equals(
-                    Constants.FieldConstants.ExperimentConstants.CREATION_TIME)){
-                if(resultOrderType.equals(ResultOrderType.ASC)) {
-                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(CREATION_TIME, 1))
-                            .skip(offset).limit(limit);
-                }else{
-                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(CREATION_TIME, -1))
-                            .skip(offset).limit(limit);
-                }
-            }else {
-                cursor = collection.find(queryBuilder.get()).skip(offset).limit(limit);
-            }
-        }else{
-            if(resultOrderType != null && resultOrderType.equals(
-                    Constants.FieldConstants.ExperimentConstants.CREATION_TIME)){
-                if(resultOrderType.equals(ResultOrderType.ASC)) {
-                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(CREATION_TIME, 1));
-                }else{
-                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(CREATION_TIME, -1));
-                }
-            }else {
-                cursor = collection.find(queryBuilder.get());
-            }
-        }
-        for(DBObject document: cursor){
-            try {
-                experimentList.add((Experiment) modelConversionHelper.deserializeObject(
-                        Experiment.class, document.toString()));
-            } catch (IOException e) {
-                throw new RegistryException(e);
-            }
-        }
-        return experimentList;
-    }
-
-    public void createWFNode(String experimentId, WorkflowNodeDetails workflowNodeDetail) throws RegistryException{
-        Experiment experiment = getExperiment(experimentId);
-        experiment.getWorkflowNodeDetailsList().add(workflowNodeDetail);
-        updateExperiment(experiment);
-    }
-
-    public void updateWFNode(WorkflowNodeDetails workflowNodeDetail) throws RegistryException{
-        Experiment experiment = getParentExperimentOfWFNode(workflowNodeDetail.getNodeInstanceId());
-        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
-            if(wfnd.getNodeInstanceId().equals(workflowNodeDetail.getNodeInstanceId())){
-                experiment.getWorkflowNodeDetailsList().remove(wfnd);
-                experiment.getWorkflowNodeDetailsList().add(workflowNodeDetail);
-                updateExperiment(experiment);
-                return;
-            }
-        }
-    }
-
-    public void deleteWFNode(WorkflowNodeDetails workflowNodeDetail) throws RegistryException{
-        Experiment experiment = getParentExperimentOfWFNode(workflowNodeDetail.getNodeInstanceId());
-        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
-            if(wfnd.getNodeInstanceId().equals(workflowNodeDetail.getNodeInstanceId())){
-                experiment.getWorkflowNodeDetailsList().remove(wfnd);
-                updateExperiment(experiment);
-                return;
-            }
-        }
-    }
-
-    public WorkflowNodeDetails getWFNode(String nodeId) throws RegistryException{
-        Experiment experiment = getParentExperimentOfWFNode(nodeId);
-        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
-            if(wfnd.getNodeInstanceId().equals(nodeId)){
-                return wfnd;
-            }
-        }
-        return null;
-    }
-
-    public void createTaskDetail(String nodeId, TaskDetails taskDetail) throws RegistryException{
-        Experiment experiment = getParentExperimentOfWFNode(nodeId);
-        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
-            if(wfnd.getNodeInstanceId().equals(nodeId)){
-                wfnd.getTaskDetailsList().add(taskDetail);
-                updateExperiment(experiment);
-                return;
-            }
-        }
-    }
-
-    public void updateTaskDetail(TaskDetails taskDetail) throws RegistryException{
-        Experiment experiment = getParentExperimentOfTask(taskDetail.getTaskId());
-        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
-            for(TaskDetails taskDetails: wfnd.getTaskDetailsList()){
-                if(taskDetails.getTaskId().equals(taskDetail)){
-                    wfnd.getTaskDetailsList().remove(taskDetail);
-                    wfnd.getTaskDetailsList().add(taskDetail);
-                    updateExperiment(experiment);
-                    return;
-                }
-            }
-        }
-    }
-
-    public void deleteTaskDetail(TaskDetails taskDetail) throws RegistryException{
-        Experiment experiment = getParentExperimentOfTask(taskDetail.getTaskId());
-        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
-            for(TaskDetails taskDetails: wfnd.getTaskDetailsList()){
-                if(taskDetails.getTaskId().equals(taskDetail)){
-                    wfnd.getTaskDetailsList().remove(taskDetail);
-                    updateExperiment(experiment);
-                    return;
-                }
-            }
-        }
-    }
-
-    public TaskDetails getTaskDetail(String taskId) throws RegistryException{
-        Experiment experiment = getParentExperimentOfTask(taskId);
-        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
-            for(TaskDetails taskDetails: wfnd.getTaskDetailsList()){
-                if(taskDetails.getTaskId().equals(taskId)){
-                    return taskDetails;
-                }
-            }
-        }
-        return null;
-    }
-
-
-    /**
-     * Method to get parent Experiment of the given workflow node instance id
-     * @param nodeInstanceId
-     * @return
-     * @throws RegistryException
-     */
-    public Experiment getParentExperimentOfWFNode(String nodeInstanceId) throws RegistryException{
-        try {
-            DBObject criteria = new BasicDBObject(WORKFLOW_NODE_ID, nodeInstanceId);
-            DBObject doc = collection.findOne(criteria);
-            if(doc != null){
-                String json = doc.toString();
-                return (Experiment)modelConversionHelper.deserializeObject(
-                        Experiment.class, json);
-            }
-        } catch (IOException e) {
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    /**
-     * Method to get the parent experiment of the given task id
-     * @param taskId
-     * @return
-     * @throws RegistryException
-     */
-    public Experiment getParentExperimentOfTask(String taskId) throws RegistryException{
-        try {
-            DBObject criteria = new BasicDBObject(TASK_ID, taskId);
-            DBObject doc = collection.findOne(criteria);
-            if(doc != null){
-                String json = doc.toString();
-                return (Experiment)modelConversionHelper.deserializeObject(
-                        Experiment.class, json);
-            }
-        } catch (IOException e) {
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    /**
-     * Method to get the parent workflow node of the given task id
-     * @param taskId
-     * @return
-     * @throws RegistryException
-     */
-    public WorkflowNodeDetails getParentWFNodeOfTask(String taskId) throws RegistryException{
-        try {
-            DBObject criteria = new BasicDBObject(TASK_ID, taskId);
-            DBObject doc = collection.findOne(criteria);
-            if(doc != null){
-                String json = doc.toString();
-                Experiment experiment = (Experiment)modelConversionHelper.deserializeObject(
-                        Experiment.class, json);
-                for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
-                    for(TaskDetails taskDetails: wfnd.getTaskDetailsList()){
-                        if(taskDetails.getTaskId().equals(taskId)){
-                            return wfnd;
-                        }
-                    }
-                }
-            }
-        } catch (IOException e) {
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ProjectDao.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ProjectDao.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ProjectDao.java
deleted file mode 100644
index e3ea7eb..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ProjectDao.java
+++ /dev/null
@@ -1,189 +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.persistance.registry.jpa.mongo.dao;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.mongodb.*;
-import com.mongodb.util.JSON;
-import org.apache.airavata.model.workspace.Project;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.ModelConversionHelper;
-import org.apache.airavata.persistance.registry.jpa.mongo.utils.MongoUtil;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.ResultOrderType;
-import org.apache.airavata.registry.cpi.utils.Constants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-public class ProjectDao {
-    private final static Logger logger = LoggerFactory.getLogger(ProjectDao.class);
-
-    private static final String PROJECTS_COLLECTION_NAME = "projects";
-    private DBCollection collection;
-    private ModelConversionHelper modelConversionHelper;
-
-    private static final String PROJECT_ID = "project_id";
-    private static final String PROJECT_NAME = "name";
-    private static final String PROJECT_DESCRIPTION = "description";
-    private static final String PROJECT_OWNER = "owner";
-    private static final String PROJECT_CREATION_TIME = "creation_time";
-
-    public ProjectDao(){
-        collection = MongoUtil.getAiravataRegistry().getCollection(PROJECTS_COLLECTION_NAME);
-        modelConversionHelper = new ModelConversionHelper();
-        collection.dropIndexes();
-        initIndexes();
-    }
-
-    /**
-     * If indexes are already defined this will simply ignore them
-     */
-    private void initIndexes(){
-        collection.createIndex(new BasicDBObject(PROJECT_ID, 1), new BasicDBObject("unique", true));
-        collection.createIndex(new BasicDBObject(PROJECT_NAME, 1));
-        collection.createIndex(new BasicDBObject(PROJECT_OWNER, 1));
-        collection.createIndex(new BasicDBObject(PROJECT_DESCRIPTION, 1));
-        collection.createIndex(new BasicDBObject(PROJECT_CREATION_TIME, 1));
-    }
-
-    public List<Project> getAllProjects() throws RegistryException{
-        List<Project> projectList = new ArrayList();
-        DBCursor cursor = collection.find();
-        for(DBObject document: cursor){
-            try {
-                projectList.add((Project) modelConversionHelper.deserializeObject(
-                        Project.class, document.toString()));
-            } catch (IOException e) {
-                throw new RegistryException(e);
-            }
-        }
-        return projectList;
-    }
-
-    public void createProject(Project project) throws RegistryException{
-        try {
-            WriteResult result = collection.insert((DBObject) JSON.parse(
-                    modelConversionHelper.serializeObject(project)));
-            logger.debug("No of inserted results "+ result.getN());
-        } catch (JsonProcessingException e) {
-            throw new RegistryException(e);
-        }
-    }
-
-    /**
-     * The following operation replaces the document with item equal to
-     * the given project id. The newly replaced document will only
-     * contain the the _id field and the fields in the replacement document.
-     * @param project
-     * @throws org.apache.airavata.registry.cpi.RegistryException
-     */
-    public void updateProject(Project project) throws RegistryException{
-        try {
-            DBObject query = BasicDBObjectBuilder.start().add(
-                    PROJECT_ID, project.getProjectId()).get();
-            WriteResult result = collection.update(query, (DBObject) JSON.parse(
-                    modelConversionHelper.serializeObject(project)));
-            logger.debug("No of updated results "+ result.getN());
-        } catch (JsonProcessingException e) {
-            throw new RegistryException(e);
-        }
-    }
-
-    public void deleteProject(Project project) throws RegistryException{
-        DBObject query = BasicDBObjectBuilder.start().add(
-                PROJECT_ID, project.getProjectId()).get();
-        WriteResult result = collection.remove(query);
-        logger.debug("No of removed experiments " + result.getN());
-    }
-
-    public Project getProject(String projectId) throws RegistryException{
-        try {
-            DBObject criteria = new BasicDBObject(PROJECT_ID, projectId);
-            DBObject doc = collection.findOne(criteria);
-            if(doc != null){
-                String json = doc.toString();
-                return (Project)modelConversionHelper.deserializeObject(
-                        Project.class, json);
-            }
-        } catch (IOException e) {
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public List<Project> searchProjects(Map<String, String> filters, int limit,
-        int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException{
-        List<Project> projectList = new ArrayList();
-        BasicDBObjectBuilder queryBuilder = BasicDBObjectBuilder.start();
-        for (String field : filters.keySet()) {
-//            if (field.equals(Constants.FieldConstants.ProjectConstants.PROJECT_NAME)){
-//                fil.put(AbstractResource.ProjectConstants.PROJECT_NAME, filters.get(field));
-//            }else if (field.equals(Constants.FieldConstants.ProjectConstants.OWNER)){
-//                fil.put(AbstractResource.ProjectConstants.USERNAME, filters.get(field));
-//            }else if (field.equals(Constants.FieldConstants.ProjectConstants.DESCRIPTION)){
-//                fil.put(AbstractResource.ProjectConstants.DESCRIPTION, filters.get(field));
-//            }else if (field.equals(Constants.FieldConstants.ProjectConstants.GATEWAY_ID)){
-//                fil.put(AbstractResource.ProjectConstants.GATEWAY_ID, filters.get(field));
-//            }
-        }
-
-        //handling pagination and ordering. ordering is allowed only on PROJECT_CREATION_TIME
-        DBCursor cursor;
-        if(limit > 0 && offset >= 0) {
-            if(orderByIdentifier != null && orderByIdentifier.equals(
-                    Constants.FieldConstants.ProjectConstants.CREATION_TIME)){
-                if(resultOrderType.equals(ResultOrderType.ASC)) {
-                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(PROJECT_CREATION_TIME, 1))
-                            .skip(offset).limit(limit);
-                }else{
-                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(PROJECT_CREATION_TIME, -1))
-                            .skip(offset).limit(limit);
-                }
-            }else {
-                cursor = collection.find(queryBuilder.get()).skip(offset).limit(limit);
-            }
-        }else{
-            if(resultOrderType != null && resultOrderType.equals(
-                    Constants.FieldConstants.ProjectConstants.CREATION_TIME)){
-                if(resultOrderType.equals(ResultOrderType.ASC)) {
-                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(PROJECT_CREATION_TIME, 1));
-                }else{
-                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(PROJECT_CREATION_TIME, -1));
-                }
-            }else {
-                cursor = collection.find(queryBuilder.get());
-            }
-        }
-        for(DBObject document: cursor){
-            try {
-                projectList.add((Project) modelConversionHelper.deserializeObject(
-                        Project.class, document.toString()));
-            } catch (IOException e) {
-                throw new RegistryException(e);
-            }
-        }
-        return projectList;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/utils/MongoUtil.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/utils/MongoUtil.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/utils/MongoUtil.java
deleted file mode 100644
index 4b7a2f9..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/utils/MongoUtil.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.utils;
-
-import com.mongodb.DB;
-import com.mongodb.MongoClient;
-import com.mongodb.MongoException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MongoUtil {
-    private final static Logger logger = LoggerFactory.getLogger(MongoUtil.class);
-
-    private static final int port = 27017;
-    private static final String host = "localhost";
-    private static MongoClient mongoClient = null;
-    private static DB airavataRegistry;
-    public static String AIRAVATA_REGISTRY_NAME = "airavata-registry";
-
-    public static MongoClient getMongoClient() {
-        if (mongoClient == null) {
-            try {
-                mongoClient = new MongoClient(host, port);
-                logger.debug("New Mongo Client created with [" + host + "] and ["
-                        + port + "]");
-            } catch (MongoException e) {
-                logger.error(e.getMessage());
-            }
-        }
-        return mongoClient;
-    }
-
-    public static DB getAiravataRegistry(){
-        if (airavataRegistry == null) {
-            try {
-                airavataRegistry = getMongoClient().getDB(AIRAVATA_REGISTRY_NAME);
-            } catch (MongoException e) {
-                logger.error(e.getMessage());
-            }
-        }
-        return airavataRegistry;
-    }
-
-    public static void dropAiravataRegistry(){
-        try {
-            getMongoClient().dropDatabase(AIRAVATA_REGISTRY_NAME);
-            logger.debug("Dropped Airavata Registry");
-        } catch (MongoException e) {
-            logger.error(e.getMessage());
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
deleted file mode 100644
index e05d59d..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
+++ /dev/null
@@ -1,317 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.registry.cpi.RegistryException;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public abstract class AbstractResource implements Resource {
-	// table names
-	public static final String GATEWAY = "Gateway";
-	public static final String CONFIGURATION = "Configuration";
-	public static final String USERS = "Users";
-	public static final String GATEWAY_WORKER = "Gateway_Worker";
-	public static final String PROJECT = "Project";
-	public static final String PROJECT_USER = "ProjectUser";
-	public static final String EXPERIMENT = "Experiment";
-	public static final String NOTIFICATION_EMAIL = "Notification_Email";
-	public static final String EXPERIMENT_CONFIG_DATA = "ExperimentConfigData";
-	public static final String EXPERIMENT_INPUT = "Experiment_Input";
-	public static final String EXPERIMENT_OUTPUT = "Experiment_Output";
-	public static final String WORKFLOW_NODE_DETAIL = "WorkflowNodeDetail";
-	public static final String TASK_DETAIL = "TaskDetail";
-	public static final String ERROR_DETAIL = "ErrorDetail";
-	public static final String APPLICATION_INPUT = "ApplicationInput";
-	public static final String APPLICATION_OUTPUT = "ApplicationOutput";
-	public static final String NODE_INPUT = "NodeInput";
-	public static final String NODE_OUTPUT = "NodeOutput";
-	public static final String JOB_DETAIL = "JobDetail";
-	public static final String DATA_TRANSFER_DETAIL = "DataTransferDetail";
-	public static final String STATUS = "Status";
-	public static final String CONFIG_DATA = "ExperimentConfigData";
-	public static final String COMPUTATIONAL_RESOURCE_SCHEDULING = "Computational_Resource_Scheduling";
-	public static final String ADVANCE_INPUT_DATA_HANDLING = "AdvancedInputDataHandling";
-	public static final String ADVANCE_OUTPUT_DATA_HANDLING = "AdvancedOutputDataHandling";
-	public static final String QOS_PARAMS = "QosParam";
-
-
-	// Gateway Table
-	public final class GatewayConstants {
-		public static final String GATEWAY_ID = "gateway_id";
-		public static final String GATEWAY_NAME = "gateway_name";
-		public static final String DOMAIN = "domain";
-		public static final String EMAIL_ADDRESS = "emailAddress";
-	}
-
-	// Configuration Table
-	public final class ConfigurationConstants {
-		// public static final String CONFIG_ID = "config_ID";
-		public static final String CONFIG_KEY = "config_key";
-		public static final String CONFIG_VAL = "config_val";
-		public static final String EXPIRE_DATE = "expire_date";
-		public static final String CATEGORY_ID = "category_id";
-		public static final String CATEGORY_ID_DEFAULT_VALUE = "SYSTEM";
-	}
-
-	// Users table
-	public final class UserConstants {
-		public static final String USERNAME = "user_name";
-		public static final String PASSWORD = "password";
-	}
-
-	// Gateway_Worker table
-	public final class GatewayWorkerConstants {
-		public static final String USERNAME = "user_name";
-		public static final String GATEWAY_ID = "gateway_id";
-	}
-
-	// Project table
-	public final class ProjectConstants {
-		public static final String GATEWAY_ID = "gateway_id";
-		public static final String USERNAME = "user_name";
-		public static final String PROJECT_NAME = "project_name";
-		public static final String PROJECT_ID = "project_id";
-		public static final String DESCRIPTION = "description";
-        public static final String CREATION_TIME = "creationTime";
-	}
-
-    // Project table
-    public final class ProjectUserConstants {
-        public static final String USERNAME = "userName";
-        public static final String PROJECT_ID = "projectID";
-    }
-
-	// Experiment table
-	public final class ExperimentConstants {
-		public static final String PROJECT_ID = "projectID";
-		public static final String EXECUTION_USER = "executionUser";
-		public static final String GATEWAY_ID = "gatewayId";
-		public static final String EXPERIMENT_ID = "expId";
-		public static final String EXPERIMENT_NAME = "expName";
-		public static final String DESCRIPTION = "expDesc";
-		public static final String CREATION_TIME = "creationTime";
-		public static final String APPLICATION_ID = "applicationId";
-		public static final String APPLICATION_VERSION = "appVersion";
-		public static final String WORKFLOW_TEMPLATE_ID = "workflowTemplateId";
-		public static final String WORKFLOW_TEMPLATE_VERSION = "workflowTemplateVersion";
-		public static final String WORKFLOW_EXECUTION_ID = "workflowExecutionId";
-	}
-
-    // Experiment Configuration Data table
-    public final class ExperimentConfigurationDataConstants {
-        public static final String EXPERIMENT_ID = "expId";
-        public static final String AIRAVATA_AUTO_SCHEDULE = "airavataAutoSchedule";
-        public static final String OVERRIDE_MANUAL_SCHEDULE = "overrideManualParams";
-        public static final String SHARE_EXPERIMENT = "shareExp";
-    }
-
-    public final class NotificationEmailConstants {
-        public static final String EXPERIMENT_ID = "experiment_id";
-        public static final String TASK_ID = "taskId";
-        public static final String EMAIL_ADDRESS = "emailAddress";
-    }
-
-    //Experiment Input table
-    public final class ExperimentInputConstants {
-        public static final String EXPERIMENT_ID = "experiment_id";
-        public static final String EXPERIMENT_INPUT_KEY = "ex_key";
-        public static final String EXPERIMENT_INPUT_VAL = "value";
-        public static final String INPUT_TYPE = "inputType";
-        public static final String METADATA = "metadata";
-    }
-
-    //Experiment Output table
-    public final class ExperimentOutputConstants {
-        public static final String EXPERIMENT_ID = "experiment_id";
-        public static final String EXPERIMENT_OUTPUT_KEY = "ex_key";
-        public static final String EXPERIMENT_OUTPUT_VAL = "value";
-        public static final String OUTPUT_TYPE = "outputKeyType";
-        public static final String METADATA = "metadata";
-    }
-
-	// Workflow_Data table
-	public final class WorkflowNodeDetailsConstants {
-		public static final String EXPERIMENT_ID = "expId";
-		public static final String NODE_INSTANCE_ID = "nodeId";
-		public static final String CREATION_TIME = "creationTime";
-		public static final String NODE_NAME = "nodeName";
-	}
-
-	// TaskDetail table
-	public final class TaskDetailConstants {
-		public static final String TASK_ID = "taskId";
-		public static final String NODE_INSTANCE_ID = "nodeId";
-		public static final String CREATION_TIME = "creationTime";
-		public static final String APPLICATION_ID = "appId";
-		public static final String APPLICATION_VERSION = "appVersion";
-	}
-
-	// ErrorDetails table
-	public final class ErrorDetailConstants {
-		public static final String ERROR_ID = "errorID";
-		public static final String EXPERIMENT_ID = "expId";
-		public static final String TASK_ID = "taskId";
-		public static final String JOB_ID = "jobId";
-		public static final String NODE_INSTANCE_ID = "nodeId";
-		public static final String CREATION_TIME = "creationTime";
-		public static final String ACTUAL_ERROR_MESSAGE = "actualErrorMsg";
-		public static final String USER_FRIEDNLY_ERROR_MSG = "userFriendlyErrorMsg";
-		public static final String TRANSIENT_OR_PERSISTENT = "transientPersistent";
-		public static final String ERROR_CATEGORY = "errorCategory";
-		public static final String CORRECTIVE_ACTION = "correctiveAction";
-		public static final String ACTIONABLE_GROUP = "actionableGroup";
-	}
-
-    // ApplicationInput table
-	public final class ApplicationInputConstants {
-		public static final String TASK_ID = "taskId";
-		public static final String INPUT_KEY = "inputKey";
-		public static final String INPUT_KEY_TYPE = "inputKeyType";
-		public static final String METADATA = "metadata";
-		public static final String VALUE = "value";
-	}
-
-    // ApplicationOutput table
-    public final class ApplicationOutputConstants {
-        public static final String TASK_ID = "taskId";
-        public static final String OUTPUT_KEY = "outputKey";
-        public static final String OUTPUT_KEY_TYPE = "outputKeyType";
-        public static final String METADATA = "metadata";
-        public static final String VALUE = "value";
-    }
-
-    // NodeInput table
-    public final class NodeInputConstants {
-        public static final String NODE_INSTANCE_ID = "nodeId";
-        public static final String INPUT_KEY = "inputKey";
-        public static final String INPUT_KEY_TYPE = "inputKeyType";
-        public static final String METADATA = "metadata";
-        public static final String VALUE = "value";
-    }
-
-    // NodeOutput table
-    public final class NodeOutputConstants {
-        public static final String NODE_INSTANCE_ID = "nodeId";
-        public static final String OUTPUT_KEY = "outputKey";
-        public static final String OUTPUT_KEY_TYPE = "outputKeyType";
-        public static final String METADATA = "metadata";
-        public static final String VALUE = "value";
-    }
-
-    // Job Details table constants
-    public final class JobDetailConstants{
-        public static final String JOB_ID = "jobId";
-        public static final String TASK_ID = "taskId";
-        public static final String JOB_DESCRIPTION = "jobDescription";
-        public static final String CREATION_TIME = "jobDescription";
-    }
-
-    // Data transfer Details table constants
-    public final class DataTransferDetailConstants{
-        public static final String TRANSFER_ID = "transferId";
-        public static final String TASK_ID = "taskId";
-        public static final String TRANSFER_DESC = "transferDesc";
-        public static final String CREATION_TIME = "creationTime";
-    }
-
-    // Status table constants
-    public final class StatusConstants {
-        public static final String STATUS_ID = "statusId";
-        public static final String EXPERIMENT_ID = "expId";
-        public static final String NODE_INSTANCE_ID = "nodeId";
-        public static final String TRANSFER_ID = "transferId";
-        public static final String TASK_ID = "taskId";
-        public static final String JOB_ID = "jobId";
-        public static final String STATE = "state";
-        public static final String STATUS_UPDATE_TIME = "statusUpdateTime";
-        public static final String STATUS_TYPE = "statusType";
-    }
-
-    public static final class ComputationalResourceSchedulingConstants{
-        public static final String RESOURCE_SCHEDULING_ID = "schedulingId";
-        public static final String EXPERIMENT_ID = "expId";
-        public static final String TASK_ID = "taskId";
-        public static final String RESOURCE_HOST_ID = "resourceHostId";
-        public static final String CPU_COUNT = "cpuCount";
-        public static final String NODE_COUNT = "nodeCount";
-        public static final String NO_OF_THREADS = "numberOfThreads";
-        public static final String QUEUE_NAME = "queueName";
-        public static final String WALLTIME_LIMIT = "wallTimeLimit";
-        public static final String JOB_START_TIME = "jobStartTime";
-        public static final String TOTAL_PHYSICAL_MEMORY = "totalPhysicalmemory";
-        public static final String COMPUTATIONAL_PROJECT_ACCOUNT = "projectName";
-    }
-
-    public static final class AdvancedInputDataHandlingConstants {
-        public static final String INPUT_DATA_HANDLING_ID = "dataHandlingId";
-        public static final String EXPERIMENT_ID = "expId";
-        public static final String TASK_ID = "taskId";
-        public static final String WORKING_DIR_PARENT = "parentWorkingDir";
-        public static final String UNIQUE_WORKING_DIR = "workingDir";
-        public static final String STAGE_INPUT_FILES_TO_WORKING_DIR = "stageInputsToWorkingDir";
-        public static final String CLEAN_AFTER_JOB = "cleanAfterJob";
-    }
-
-    public static final class AdvancedOutputDataHandlingConstants {
-        public static final String OUTPUT_DATA_HANDLING_ID = "outputDataHandlingId";
-        public static final String EXPERIMENT_ID = "expId";
-        public static final String TASK_ID = "taskId";
-        public static final String OUTPUT_DATA_DIR = "outputDataDir";
-        public static final String DATA_REG_URL = "dataRegUrl";
-        public static final String PERSIST_OUTPUT_DATA = "persistOutputData";
-    }
-
-    public static final class QosParamsConstants {
-        public static final String QOS_ID = "qosId";
-        public static final String EXPERIMENT_ID = "expId";
-        public static final String TASK_ID = "taskId";
-        public static final String START_EXECUTION_AT = "startExecutionAt";
-        public static final String EXECUTE_BEFORE = "executeBefore";
-        public static final String NO_OF_RETRIES = "noOfRetries";
-    }
-
-
-	protected AbstractResource() {
-	}
-
-	public boolean isExists(ResourceType type, Object name) throws RegistryException {
-		try {
-			return get(type, name) != null;
-		} catch (Exception e) {
-			return false;
-		}
-	}
-
-	@SuppressWarnings("unchecked")
-	public static <T> List<T> getResourceList(List<Resource> resources,
-			Class<?> T) {
-		List<T> list = new ArrayList<T>();
-		for (Resource o : resources) {
-			list.add((T) o);
-		}
-		return list;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvanceInputDataHandlingResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvanceInputDataHandlingResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvanceInputDataHandlingResource.java
deleted file mode 100644
index 4ad08e4..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvanceInputDataHandlingResource.java
+++ /dev/null
@@ -1,168 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.AdvancedInputDataHandling;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment;
-import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.util.List;
-
-public class AdvanceInputDataHandlingResource extends AbstractResource {
-    private static final Logger logger = LoggerFactory.getLogger(AdvanceInputDataHandlingResource.class);
-    private int dataHandlingId = 0;
-    private ExperimentResource experimentResource;
-    private TaskDetailResource taskDetailResource;
-    private String workingDirParent;
-    private String workingDir;
-    private boolean stageInputFiles;
-    private boolean cleanAfterJob;
-
-    public int getDataHandlingId() {
-        return dataHandlingId;
-    }
-
-    public void setDataHandlingId(int dataHandlingId) {
-        this.dataHandlingId = dataHandlingId;
-    }
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    public TaskDetailResource getTaskDetailResource() {
-        return taskDetailResource;
-    }
-
-    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
-        this.taskDetailResource = taskDetailResource;
-    }
-
-    public String getWorkingDirParent() {
-        return workingDirParent;
-    }
-
-    public void setWorkingDirParent(String workingDirParent) {
-        this.workingDirParent = workingDirParent;
-    }
-
-    public String getWorkingDir() {
-        return workingDir;
-    }
-
-    public void setWorkingDir(String workingDir) {
-        this.workingDir = workingDir;
-    }
-
-    public boolean isStageInputFiles() {
-        return stageInputFiles;
-    }
-
-    public void setStageInputFiles(boolean stageInputFiles) {
-        this.stageInputFiles = stageInputFiles;
-    }
-
-    public boolean isCleanAfterJob() {
-        return cleanAfterJob;
-    }
-
-    public void setCleanAfterJob(boolean cleanAfterJob) {
-        this.cleanAfterJob = cleanAfterJob;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for input data handling resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws RegistryException {
-        logger.error("Unsupported resource type for input data handling resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for input data handling resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for input data handling resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            AdvancedInputDataHandling dataHandling;
-            if (dataHandlingId != 0) {
-                dataHandling = em.find(AdvancedInputDataHandling.class, dataHandlingId);
-                dataHandling.setDataHandlingId(dataHandlingId);
-            } else {
-                dataHandling = new AdvancedInputDataHandling();
-            }
-            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
-            if (taskDetailResource != null) {
-                TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
-                dataHandling.setTaskId(taskDetailResource.getTaskId());
-                dataHandling.setTask(taskDetail);
-            }
-            dataHandling.setExpId(experimentResource.getExpID());
-            dataHandling.setExperiment(experiment);
-            dataHandling.setWorkingDir(workingDir);
-            dataHandling.setParentWorkingDir(workingDirParent);
-            dataHandling.setStageInputsToWorkingDir(stageInputFiles);
-            dataHandling.setCleanAfterJob(cleanAfterJob);
-            em.persist(dataHandling);
-            dataHandlingId = dataHandling.getDataHandlingId();
-            em.getTransaction().commit();
-            em.close();
-        }catch (Exception e){
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvancedOutputDataHandlingResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvancedOutputDataHandlingResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvancedOutputDataHandlingResource.java
deleted file mode 100644
index bb3cc80..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvancedOutputDataHandlingResource.java
+++ /dev/null
@@ -1,159 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.AdvancedOutputDataHandling;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment;
-import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.util.List;
-
-public class AdvancedOutputDataHandlingResource extends AbstractResource {
-    private static final Logger logger = LoggerFactory.getLogger(AdvancedOutputDataHandlingResource.class);
-    private int outputDataHandlingId = 0;
-    private ExperimentResource experimentResource;
-    private TaskDetailResource taskDetailResource;
-    private  String outputDataDir;
-    private String dataRegUrl;
-    private boolean persistOutputData;
-
-    public int getOutputDataHandlingId() {
-        return outputDataHandlingId;
-    }
-
-    public void setOutputDataHandlingId(int outputDataHandlingId) {
-        this.outputDataHandlingId = outputDataHandlingId;
-    }
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    public TaskDetailResource getTaskDetailResource() {
-        return taskDetailResource;
-    }
-
-    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
-        this.taskDetailResource = taskDetailResource;
-    }
-
-    public String getOutputDataDir() {
-        return outputDataDir;
-    }
-
-    public void setOutputDataDir(String outputDataDir) {
-        this.outputDataDir = outputDataDir;
-    }
-
-    public String getDataRegUrl() {
-        return dataRegUrl;
-    }
-
-    public void setDataRegUrl(String dataRegUrl) {
-        this.dataRegUrl = dataRegUrl;
-    }
-
-    public boolean isPersistOutputData() {
-        return persistOutputData;
-    }
-
-    public void setPersistOutputData(boolean persistOutputData) {
-        this.persistOutputData = persistOutputData;
-    }
-
-
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for output data handling resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-
-    public void remove(ResourceType type, Object name) throws RegistryException {
-        logger.error("Unsupported resource type for output data handling resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-
-    public Resource get(ResourceType type, Object name) throws RegistryException  {
-        logger.error("Unsupported resource type for output data handling resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for output data handling resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-
-    public void save() throws RegistryException {
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            AdvancedOutputDataHandling dataHandling;
-            if (outputDataHandlingId != 0 ){
-                dataHandling = em.find(AdvancedOutputDataHandling.class, outputDataHandlingId);
-                dataHandling.setOutputDataHandlingId(outputDataHandlingId);
-            }else {
-                dataHandling = new AdvancedOutputDataHandling();
-            }
-            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
-            if (taskDetailResource !=null){
-                TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
-                dataHandling.setTaskId(taskDetailResource.getTaskId());
-                dataHandling.setTask(taskDetail);
-            }
-
-            dataHandling.setExpId(experimentResource.getExpID());
-            dataHandling.setExperiment(experiment);
-            dataHandling.setDataRegUrl(dataRegUrl);
-            dataHandling.setOutputDataDir(outputDataDir);
-            dataHandling.setPersistOutputData(persistOutputData);
-            em.persist(dataHandling);
-            outputDataHandlingId = dataHandling.getOutputDataHandlingId();
-            em.getTransaction().commit();
-            em.close();
-        }catch (Exception e){
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java
deleted file mode 100644
index d04fc85..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java
+++ /dev/null
@@ -1,235 +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.persistance.registry.jpa.resources;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.ApplicationInput;
-import org.apache.airavata.persistance.registry.jpa.model.ApplicationInput_PK;
-import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ApplicationInputResource extends AbstractResource {
-	private static final Logger logger = LoggerFactory.getLogger(ApplicationInputResource.class);
-    private TaskDetailResource taskDetailResource;
-    private String inputKey;
-    private String dataType;
-    private String metadata;
-    private String value;
-    private String appArgument;
-    private boolean standardInput;
-    private String userFriendlyDesc;
-    private int inputOrder;
-    private boolean isRequired;
-    private boolean requiredToCMD;
-    private boolean dataStaged;
-
-    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;
-    }
-
-    public int getInputOrder() {
-        return inputOrder;
-    }
-
-    public void setInputOrder(int inputOrder) {
-        this.inputOrder = inputOrder;
-    }
-
-    public String getAppArgument() {
-        return appArgument;
-    }
-
-    public void setAppArgument(String appArgument) {
-        this.appArgument = appArgument;
-    }
-
-    public boolean isStandardInput() {
-        return standardInput;
-    }
-
-    public void setStandardInput(boolean standardInput) {
-        this.standardInput = standardInput;
-    }
-
-    public String getUserFriendlyDesc() {
-        return userFriendlyDesc;
-    }
-
-    public void setUserFriendlyDesc(String userFriendlyDesc) {
-        this.userFriendlyDesc = userFriendlyDesc;
-    }
-
-    public String getInputKey() {
-        return inputKey;
-    }
-
-    public void setInputKey(String inputKey) {
-        this.inputKey = inputKey;
-    }
-
-    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 getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public TaskDetailResource getTaskDetailResource() {
-        return taskDetailResource;
-    }
-
-    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
-        this.taskDetailResource = taskDetailResource;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for application input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for application input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws RegistryException {
-        logger.error("Unsupported resource type for application input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for application input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void save() throws RegistryException {
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            ApplicationInput existingInput = em.find(ApplicationInput.class, new ApplicationInput_PK(inputKey, taskDetailResource.getTaskId()));
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            ApplicationInput applicationInput = new ApplicationInput();
-            TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
-            applicationInput.setTask(taskDetail);
-            applicationInput.setTaskId(taskDetail.getTaskId());
-            applicationInput.setInputKey(inputKey);
-            applicationInput.setDataType(dataType);
-            applicationInput.setAppArgument(appArgument);
-            applicationInput.setStandardInput(standardInput);
-            applicationInput.setUserFriendlyDesc(userFriendlyDesc);
-            applicationInput.setInputOrder(inputOrder);
-            applicationInput.setRequiredToCMD(requiredToCMD);
-            applicationInput.setRequired(isRequired);
-            applicationInput.setDataStaged(dataStaged);
-            if (value != null){
-                applicationInput.setValue(value.toCharArray());
-            }
-
-            applicationInput.setMetadata(metadata);
-
-            if (existingInput != null) {
-                existingInput.setTask(taskDetail);
-                existingInput.setTaskId(taskDetail.getTaskId());
-                existingInput.setInputKey(inputKey);
-                existingInput.setDataType(dataType);
-                existingInput.setAppArgument(appArgument);
-                existingInput.setStandardInput(standardInput);
-                existingInput.setUserFriendlyDesc(userFriendlyDesc);
-                existingInput.setInputOrder(inputOrder);
-                existingInput.setRequiredToCMD(requiredToCMD);
-                existingInput.setRequired(isRequired);
-                existingInput.setDataStaged(dataStaged);
-                if (value != null){
-                    existingInput.setValue(value.toCharArray());
-                }
-                existingInput.setMetadata(metadata);
-                applicationInput = em.merge(existingInput);
-            } else {
-                em.persist(applicationInput);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            throw new RegistryException(e.getMessage());
-        } finally {
-                if (em != null && em.isOpen()) {
-                    if (em.getTransaction().isActive()){
-                        em.getTransaction().rollback();
-                    }
-                    em.close();
-                }
-            }
-        }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationOutputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationOutputResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationOutputResource.java
deleted file mode 100644
index c937df3..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationOutputResource.java
+++ /dev/null
@@ -1,213 +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.persistance.registry.jpa.resources;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.ApplicationOutput;
-import org.apache.airavata.persistance.registry.jpa.model.ApplicationOutput_PK;
-import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ApplicationOutputResource extends AbstractResource {
-	private static final Logger logger = LoggerFactory.getLogger(ApplicationOutputResource.class);
-    private TaskDetailResource taskDetailResource;
-    private String outputKey;
-    private String dataType;
-    private String value;
-    private boolean isRequired;
-    private boolean dataMovement;
-    private String dataNameLocation;
-    private boolean requiredToCMD;
-    private String searchQuery;
-    private String appArgument;
-
-    public String getSearchQuery() {
-        return searchQuery;
-    }
-
-    public void setSearchQuery(String searchQuery) {
-        this.searchQuery = searchQuery;
-    }
-
-    public String getAppArgument() {
-        return appArgument;
-    }
-
-    public void setAppArgument(String appArgument) {
-        this.appArgument = appArgument;
-    }
-
-    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 getOutputKey() {
-        return outputKey;
-    }
-
-    public void setOutputKey(String outputKey) {
-        this.outputKey = outputKey;
-    }
-
-    public String getDataType() {
-        return dataType;
-    }
-
-    public void setDataType(String dataType) {
-        this.dataType = dataType;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public TaskDetailResource getTaskDetailResource() {
-        return taskDetailResource;
-    }
-
-    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
-        this.taskDetailResource = taskDetailResource;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for application output data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for application output data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for application output data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for application output data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void save() throws RegistryException {
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            ApplicationOutput existingOutput = em.find(ApplicationOutput.class, new ApplicationOutput_PK(outputKey, taskDetailResource.getTaskId()));
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            ApplicationOutput applicationOutput = new ApplicationOutput();
-            TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
-            applicationOutput.setTask(taskDetail);
-            applicationOutput.setTaskId(taskDetail.getTaskId());
-            applicationOutput.setOutputKey(outputKey);
-            applicationOutput.setDataType(dataType);
-            applicationOutput.setRequired(isRequired);
-            applicationOutput.setAddedToCmd(requiredToCMD);
-            applicationOutput.setDataMovement(dataMovement);
-            applicationOutput.setDataNameLocation(dataNameLocation);
-            applicationOutput.setSearchQuery(searchQuery);
-            applicationOutput.setApplicationArgument(appArgument);
-            if (value != null){
-                applicationOutput.setValue(value.toCharArray());
-            }
-
-            if (existingOutput != null) {
-                existingOutput.setTask(taskDetail);
-                existingOutput.setTaskId(taskDetail.getTaskId());
-                existingOutput.setOutputKey(outputKey);
-                existingOutput.setDataType(dataType);
-                existingOutput.setRequired(isRequired);
-                existingOutput.setAddedToCmd(requiredToCMD);
-                existingOutput.setDataMovement(dataMovement);
-                existingOutput.setDataNameLocation(dataNameLocation);
-                existingOutput.setSearchQuery(searchQuery);
-                existingOutput.setApplicationArgument(appArgument);
-                if (value != null){
-                    existingOutput.setValue(value.toCharArray());
-                }
-                applicationOutput = em.merge(existingOutput);
-            } else {
-                em.persist(applicationOutput);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e.getMessage());
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}


[35/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
deleted file mode 100644
index 7c0327f..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
+++ /dev/null
@@ -1,229 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.Computational_Resource_Scheduling;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment;
-import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.sql.Timestamp;
-import java.util.List;
-
-public class ComputationSchedulingResource extends AbstractResource {
-    private static final Logger logger = LoggerFactory.getLogger(ComputationSchedulingResource.class);
-    private int schedulingId = 0;
-    private ExperimentResource experimentResource;
-    private TaskDetailResource taskDetailResource;
-    private String resourceHostId;
-    private int cpuCount;
-    private int nodeCount;
-    private int numberOfThreads;
-    private String queueName;
-    private int walltimeLimit;
-    private Timestamp jobStartTime;
-    private int physicalMemory;
-    private String projectName;
-    private String chessisName;
-
-    public String getChessisName() {
-        return chessisName;
-    }
-
-    public void setChessisName(String chessisName) {
-        this.chessisName = chessisName;
-    }
-
-    public int getSchedulingId() {
-        return schedulingId;
-    }
-
-    public void setSchedulingId(int schedulingId) {
-        this.schedulingId = schedulingId;
-    }
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    public TaskDetailResource getTaskDetailResource() {
-        return taskDetailResource;
-    }
-
-    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
-        this.taskDetailResource = taskDetailResource;
-    }
-
-    public String getResourceHostId() {
-        return resourceHostId;
-    }
-
-    public void setResourceHostId(String resourceHostId) {
-        this.resourceHostId = resourceHostId;
-    }
-
-    public int getCpuCount() {
-        return cpuCount;
-    }
-
-    public void setCpuCount(int cpuCount) {
-        this.cpuCount = cpuCount;
-    }
-
-    public int getNodeCount() {
-        return nodeCount;
-    }
-
-    public void setNodeCount(int nodeCount) {
-        this.nodeCount = nodeCount;
-    }
-
-    public int getNumberOfThreads() {
-        return numberOfThreads;
-    }
-
-    public void setNumberOfThreads(int numberOfThreads) {
-        this.numberOfThreads = numberOfThreads;
-    }
-
-    public String getQueueName() {
-        return queueName;
-    }
-
-    public void setQueueName(String queueName) {
-        this.queueName = queueName;
-    }
-
-    public int getWalltimeLimit() {
-        return walltimeLimit;
-    }
-
-    public void setWalltimeLimit(int walltimeLimit) {
-        this.walltimeLimit = walltimeLimit;
-    }
-
-    public Timestamp getJobStartTime() {
-        return jobStartTime;
-    }
-
-    public void setJobStartTime(Timestamp jobStartTime) {
-        this.jobStartTime = jobStartTime;
-    }
-
-    public int getPhysicalMemory() {
-        return physicalMemory;
-    }
-
-    public void setPhysicalMemory(int physicalMemory) {
-        this.physicalMemory = physicalMemory;
-    }
-
-    public String getProjectName() {
-        return projectName;
-    }
-
-    public void setProjectName(String projectName) {
-        this.projectName = projectName;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for computational scheduling resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for computational scheduling resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for computational scheduling resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for computational scheduling resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Computational_Resource_Scheduling scheduling;
-            if (schedulingId != 0) {
-                scheduling = em.find(Computational_Resource_Scheduling.class, schedulingId);
-                scheduling.setSchedulingId(schedulingId);
-            } else {
-                scheduling = new Computational_Resource_Scheduling();
-            }
-            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
-            if (taskDetailResource != null) {
-                TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
-                scheduling.setTask(taskDetail);
-                scheduling.setTaskId(taskDetailResource.getTaskId());
-            }
-            scheduling.setExpId(experimentResource.getExpID());
-            scheduling.setExperiment(experiment);
-            scheduling.setResourceHostId(resourceHostId);
-            scheduling.setCpuCount(cpuCount);
-            scheduling.setNodeCount(nodeCount);
-            scheduling.setNumberOfThreads(numberOfThreads);
-            scheduling.setQueueName(queueName);
-            scheduling.setWallTimeLimit(walltimeLimit);
-            scheduling.setJobStartTime(jobStartTime);
-            scheduling.setTotalPhysicalmemory(physicalMemory);
-            scheduling.setProjectName(projectName);
-            scheduling.setChessisName(chessisName);
-            em.persist(scheduling);
-            schedulingId = scheduling.getSchedulingId();
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
deleted file mode 100644
index c45ba07..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
+++ /dev/null
@@ -1,162 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment;
-import org.apache.airavata.persistance.registry.jpa.model.ExperimentConfigData;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.util.List;
-
-public class ConfigDataResource extends AbstractResource {
-    private static final Logger logger = LoggerFactory.getLogger(ConfigDataResource.class);
-    private ExperimentResource experimentResource;
-    private boolean airavataAutoSchedule;
-    private boolean overrideManualParams;
-    private boolean shareExp;
-    private String userDn;
-    private boolean generateCert;
-
-    public String getUserDn() {
-        return userDn;
-    }
-
-    public void setUserDn(String userDn) {
-        this.userDn = userDn;
-    }
-
-    public boolean isGenerateCert() {
-        return generateCert;
-    }
-
-    public void setGenerateCert(boolean generateCert) {
-        this.generateCert = generateCert;
-    }
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    public boolean isAiravataAutoSchedule() {
-        return airavataAutoSchedule;
-    }
-
-    public void setAiravataAutoSchedule(boolean airavataAutoSchedule) {
-        this.airavataAutoSchedule = airavataAutoSchedule;
-    }
-
-    public boolean isOverrideManualParams() {
-        return overrideManualParams;
-    }
-
-    public void setOverrideManualParams(boolean overrideManualParams) {
-        this.overrideManualParams = overrideManualParams;
-    }
-
-    public boolean isShareExp() {
-        return shareExp;
-    }
-
-    public void setShareExp(boolean shareExp) {
-        this.shareExp = shareExp;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for config data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for config data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for config data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for config data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            ExperimentConfigData existingConfig = em.find(ExperimentConfigData.class, experimentResource.getExpID());
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            ExperimentConfigData configData = new ExperimentConfigData();
-            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
-            configData.setExpId(experimentResource.getExpID());
-            configData.setExperiment(experiment);
-            configData.setAiravataAutoSchedule(airavataAutoSchedule);
-            configData.setOverrideManualParams(overrideManualParams);
-            configData.setShareExp(shareExp);
-            configData.setUserDn(userDn);
-            configData.setGenerateCert(generateCert);
-            if (existingConfig != null) {
-                existingConfig.setExpId(experimentResource.getExpID());
-                existingConfig.setExperiment(experiment);
-                existingConfig.setAiravataAutoSchedule(airavataAutoSchedule);
-                existingConfig.setOverrideManualParams(overrideManualParams);
-                existingConfig.setShareExp(shareExp);
-                existingConfig.setUserDn(userDn);
-                existingConfig.setGenerateCert(generateCert);
-                configData = em.merge(existingConfig);
-            } else {
-                em.persist(configData);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
deleted file mode 100644
index 1214e47..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.resources;
-
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.locks.Lock;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.Configuration;
-import org.apache.airavata.persistance.registry.jpa.model.Configuration_PK;
-import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ConfigurationResource extends AbstractResource {
-    private final static Logger logger = LoggerFactory.getLogger(ConfigurationResource.class);
-    private String configKey;
-    private String configVal;
-    private Timestamp expireDate;
-    private String categoryID = ConfigurationConstants.CATEGORY_ID_DEFAULT_VALUE;
-
-    public ConfigurationResource() {
-    }
-
-    /**
-     * @param configKey configuration key
-     * @param configVal configuration value
-     */
-    public ConfigurationResource(String configKey, String configVal) {
-        this.configKey = configKey;
-        this.configVal = configVal;
-    }
-
-    /**
-     * Since Configuration does not depend on any other data structures at the
-     * system, this method is not valid
-     *
-     * @param type child resource types
-     * @return UnsupportedOperationException
-     */
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported operation for configuration resource " +
-                "since there are no child resources generated by configuration resource.. ",
-                new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * Since Configuration does not depend on any other data structures at the
-     * system, this method is not valid
-     *
-     * @param type child resource types
-     * @param name name of the child resource
-     *             throws UnsupportedOperationException
-     */
-    public void remove(ResourceType type, Object name) throws RegistryException {
-        logger.error("Unsupported operation for configuration resource " +
-                "since there are no child resources generated by configuration resource.. ",
-                new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-
-    /**
-     * Since Configuration does not depend on any other data structures at the
-     * system, this method is not valid
-     *
-     * @param type child resource types
-     * @param name name of the child resource
-     * @return UnsupportedOperationException
-     */
-    public Resource get(ResourceType type, Object name) throws RegistryException {
-        logger.error("Unsupported operation for configuration resource " +
-                "since there are no child resources generated by configuration resource.. ",
-                new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * Since Configuration does not depend on any other data structures at the
-     * system, this method is not valid
-     *
-     * @param type child resource types
-     * @return UnsupportedOperationException
-     */
-    public List<Resource> get(ResourceType type) throws RegistryException {
-        logger.error("Unsupported operation for configuration resource " +
-                "since there are no child resources generated by configuration resource.. ",
-                new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * @param expireDate expire date of the configuration
-     */
-    public void setExpireDate(Timestamp expireDate) {
-        this.expireDate = expireDate;
-    }
-
-    /**
-     * saveExperiment configuration to database
-     */
-    public synchronized void save() throws RegistryException {
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            //whether existing
-            Configuration existing = em.find(Configuration.class, new Configuration_PK(configKey, configVal, categoryID));
-            em.close();
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Configuration configuration = new Configuration();
-            configuration.setConfig_key(configKey);
-            configuration.setConfig_val(configVal);
-            configuration.setExpire_date(expireDate);
-            configuration.setCategory_id(categoryID);
-            if (existing != null) {
-                existing.setExpire_date(expireDate);
-                existing.setCategory_id(categoryID);
-                configuration = em.merge(existing);
-            } else {
-                em.persist(configuration);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     * Since Configuration does not depend on any other data structures at the
-     * system, this method is not valid
-     *
-     * @param type child resource types
-     * @param name of the child resource
-     * @return UnsupportedOperationException
-     */
-    public boolean isExists(ResourceType type, Object name) {
-        logger.error("Unsupported operation for configuration resource " +
-                "since there are no child resources generated by configuration resource.. ",
-                new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * @return configuration value
-     */
-    public String getConfigVal() {
-        return configVal;
-    }
-
-    /**
-     * @param configKey configuration key
-     */
-    public void setConfigKey(String configKey) {
-        this.configKey = configKey;
-    }
-
-    /**
-     * @param configVal configuration value
-     */
-    public void setConfigVal(String configVal) {
-        this.configVal = configVal;
-    }
-
-    public String getCategoryID() {
-        return categoryID;
-    }
-
-    public void setCategoryID(String categoryID) {
-        this.categoryID = categoryID;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java
deleted file mode 100644
index ab1b49e..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java
+++ /dev/null
@@ -1,272 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.DataTransferDetail;
-import org.apache.airavata.persistance.registry.jpa.model.Status;
-import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
-import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.utils.StatusType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.List;
-
-public class DataTransferDetailResource extends AbstractResource {
-    private static final Logger logger = LoggerFactory.getLogger(DataTransferDetailResource.class);
-    private String transferId;
-    private TaskDetailResource taskDetailResource;
-    private Timestamp creationTime;
-    private String transferDescription;
-
-    public String getTransferId() {
-        return transferId;
-    }
-
-    public void setTransferId(String transferId) {
-        this.transferId = transferId;
-    }
-
-    public TaskDetailResource getTaskDetailResource() {
-        return taskDetailResource;
-    }
-
-    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
-        this.taskDetailResource = taskDetailResource;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public String getTransferDescription() {
-        return transferDescription;
-    }
-
-    public void setTransferDescription(String transferDescription) {
-        this.transferDescription = transferDescription;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException {
-        switch (type){
-            case STATUS:
-                StatusResource statusResource = new StatusResource();
-                statusResource.setDataTransferDetail(this);
-                return statusResource;
-            default:
-                logger.error("Unsupported resource type for data transfer details data resource.", new UnsupportedOperationException());
-                throw new UnsupportedOperationException();
-        }
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws RegistryException {
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-            QueryGenerator generator;
-            switch (type) {
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.TRANSFER_ID, name);
-                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.DATA_TRANSFER);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                default:
-                    logger.error("Unsupported resource type for data transfer details resource.", new IllegalArgumentException());
-                    break;
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            QueryGenerator generator;
-            Query q;
-            switch (type) {
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.TRANSFER_ID, name);
-                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.DATA_TRANSFER);
-                    q = generator.selectQuery(em);
-                    Status status = (Status) q.getSingleResult();
-                    StatusResource statusResource = (StatusResource) Utils.getResource(ResourceType.STATUS, status);
-                    em.getTransaction().commit();
-                    em.close();
-                    return statusResource;
-                default:
-                    em.getTransaction().commit();
-                    em.close();
-                    logger.error("Unsupported resource type for data transfer details resource.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Unsupported resource type for data transfer details resource.");
-            }
-        } catch (Exception e) {
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        List<Resource> resourceList = new ArrayList<Resource>();
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-            QueryGenerator generator;
-            List results;
-            switch (type) {
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.TRANSFER_ID, transferId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Status status = (Status) result;
-                            StatusResource statusResource =
-                                    (StatusResource) Utils.getResource(ResourceType.STATUS, status);
-                            resourceList.add(statusResource);
-                        }
-                    }
-                    break;
-                default:
-                    em.getTransaction().commit();
-                    em.close();
-                    logger.error("Unsupported resource type for workflow node details resource.", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return resourceList;
-    }
-
-    
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            DataTransferDetail existingDF = em.find(DataTransferDetail.class, transferId);
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            DataTransferDetail dataTransferDetail = new DataTransferDetail();
-            TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
-            dataTransferDetail.setTransferId(transferId);
-            dataTransferDetail.setTask(taskDetail);
-            dataTransferDetail.setTaskId(taskDetailResource.getTaskId());
-            dataTransferDetail.setCreationTime(creationTime);
-            if (transferDescription != null) {
-                dataTransferDetail.setTransferDesc(transferDescription.toCharArray());
-            }
-            if (existingDF != null) {
-                existingDF.setTransferId(transferId);
-                existingDF.setTask(taskDetail);
-                existingDF.setTaskId(taskDetailResource.getTaskId());
-                existingDF.setCreationTime(creationTime);
-                if (transferDescription != null) {
-                    existingDF.setTransferDesc(transferDescription.toCharArray());
-                }
-                dataTransferDetail = em.merge(existingDF);
-            } else {
-                em.persist(dataTransferDetail);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    public StatusResource getDataTransferStatus () throws RegistryException{
-        List<Resource> resources = get(ResourceType.STATUS);
-        for (Resource resource : resources) {
-            StatusResource dataTransferStatus = (StatusResource) resource;
-            if(dataTransferStatus.getStatusType().equals(StatusType.DATA_TRANSFER.toString())){
-                if (dataTransferStatus.getState() == null || dataTransferStatus.getState().equals("") ){
-                    dataTransferStatus.setState("UNKNOWN");
-                }
-                return dataTransferStatus;
-            }
-        }
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
deleted file mode 100644
index 56a4e57..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
+++ /dev/null
@@ -1,229 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.ErrorDetail;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment;
-import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
-import org.apache.airavata.persistance.registry.jpa.model.WorkflowNodeDetail;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.sql.Timestamp;
-import java.util.List;
-
-public class ErrorDetailResource extends AbstractResource {
-    private static final Logger logger = LoggerFactory.getLogger(ErrorDetailResource.class);
-    private int errorId;
-    private ExperimentResource experimentResource;
-    private TaskDetailResource taskDetailResource;
-    private WorkflowNodeDetailResource nodeDetail;
-    private Timestamp creationTime;
-    private String actualErrorMsg;
-    private String userFriendlyErrorMsg;
-    private boolean transientPersistent;
-    private String errorCategory;
-    private String correctiveAction;
-    private String actionableGroup;
-    private String jobId;
-
-    public int getErrorId() {
-        return errorId;
-    }
-
-    public void setErrorId(int errorId) {
-        this.errorId = errorId;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public String getActualErrorMsg() {
-        return actualErrorMsg;
-    }
-
-    public void setActualErrorMsg(String actualErrorMsg) {
-        this.actualErrorMsg = actualErrorMsg;
-    }
-
-    public String getUserFriendlyErrorMsg() {
-        return userFriendlyErrorMsg;
-    }
-
-    public void setUserFriendlyErrorMsg(String userFriendlyErrorMsg) {
-        this.userFriendlyErrorMsg = userFriendlyErrorMsg;
-    }
-
-    public boolean isTransientPersistent() {
-        return transientPersistent;
-    }
-
-    public void setTransientPersistent(boolean transientPersistent) {
-        this.transientPersistent = transientPersistent;
-    }
-
-    public String getErrorCategory() {
-        return errorCategory;
-    }
-
-    public void setErrorCategory(String errorCategory) {
-        this.errorCategory = errorCategory;
-    }
-
-    public String getCorrectiveAction() {
-        return correctiveAction;
-    }
-
-    public void setCorrectiveAction(String correctiveAction) {
-        this.correctiveAction = correctiveAction;
-    }
-
-    public String getActionableGroup() {
-        return actionableGroup;
-    }
-
-    public void setActionableGroup(String actionableGroup) {
-        this.actionableGroup = actionableGroup;
-    }
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    public TaskDetailResource getTaskDetailResource() {
-        return taskDetailResource;
-    }
-
-    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
-        this.taskDetailResource = taskDetailResource;
-    }
-
-    public WorkflowNodeDetailResource getNodeDetail() {
-        return nodeDetail;
-    }
-
-    public void setNodeDetail(WorkflowNodeDetailResource nodeDetail) {
-        this.nodeDetail = nodeDetail;
-    }
-
-    public String getJobId() {
-        return jobId;
-    }
-
-    public void setJobId(String jobId) {
-        this.jobId = jobId;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for error details data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws RegistryException {
-        logger.error("Unsupported resource type for error details data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for error details data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for error details data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            ErrorDetail errorDetail;
-            if (errorId != 0) {
-                errorDetail = em.find(ErrorDetail.class, errorId);
-                errorDetail.setErrorId(errorId);
-            } else {
-                errorDetail = new ErrorDetail();
-            }
-            errorDetail.setErrorId(errorId);
-            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
-            errorDetail.setExperiment(experiment);
-            errorDetail.setExpId(experimentResource.getExpID());
-            if (taskDetailResource != null) {
-                TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
-                errorDetail.setTask(taskDetail);
-                errorDetail.setTaskId(taskDetail.getTaskId());
-            }
-
-            if (nodeDetail != null) {
-                WorkflowNodeDetail workflowNodeDetail = em.find(WorkflowNodeDetail.class, nodeDetail.getNodeInstanceId());
-                errorDetail.setNodeDetails(workflowNodeDetail);
-                errorDetail.setNodeId(workflowNodeDetail.getNodeId());
-            }
-            errorDetail.setCreationTime(creationTime);
-            if (actualErrorMsg != null){
-                errorDetail.setActualErrorMsg(actualErrorMsg.toCharArray());
-            }
-
-            errorDetail.setUserFriendlyErrorMsg(userFriendlyErrorMsg);
-            errorDetail.setTransientPersistent(transientPersistent);
-            errorDetail.setErrorCategory(errorCategory);
-            errorDetail.setCorrectiveAction(correctiveAction);
-            errorDetail.setActionableGroup(actionableGroup);
-            errorDetail.setJobId(jobId);
-            em.persist(errorDetail);
-            errorId = errorDetail.getErrorId();
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java
deleted file mode 100644
index 1466522..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java
+++ /dev/null
@@ -1,229 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment_Input;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment_Input_PK;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.util.List;
-
-public class ExperimentInputResource extends AbstractResource {
-    private static final Logger logger = LoggerFactory.getLogger(ExperimentInputResource.class);
-
-    private ExperimentResource experimentResource;
-    private String experimentKey;
-    private String value;
-    private String metadata;
-    private String dataType;
-    private String appArgument;
-    private boolean standardInput;
-    private String userFriendlyDesc;
-    private int inputOrder;
-    private boolean isRequired;
-    private boolean requiredToCMD;
-    private boolean dataStaged;
-
-    public boolean getRequired() {
-        return isRequired;
-    }
-
-    public void setRequired(boolean required) {
-        this.isRequired = required;
-    }
-
-    public boolean getRequiredToCMD() {
-        return requiredToCMD;
-    }
-
-    public void setRequiredToCMD(boolean requiredToCMD) {
-        this.requiredToCMD = requiredToCMD;
-    }
-
-    public boolean isDataStaged() {
-        return dataStaged;
-    }
-
-    public void setDataStaged(boolean dataStaged) {
-        this.dataStaged = dataStaged;
-    }
-
-    public int getInputOrder() {
-        return inputOrder;
-    }
-
-    public void setInputOrder(int inputOrder) {
-        this.inputOrder = inputOrder;
-    }
-
-    public String getAppArgument() {
-        return appArgument;
-    }
-
-    public void setAppArgument(String appArgument) {
-        this.appArgument = appArgument;
-    }
-
-    public boolean isStandardInput() {
-        return standardInput;
-    }
-
-    public void setStandardInput(boolean standardInput) {
-        this.standardInput = standardInput;
-    }
-
-    public String getUserFriendlyDesc() {
-        return userFriendlyDesc;
-    }
-
-    public void setUserFriendlyDesc(String userFriendlyDesc) {
-        this.userFriendlyDesc = userFriendlyDesc;
-    }
-
-    public String getExperimentKey() {
-        return experimentKey;
-    }
-
-    public void setExperimentKey(String experimentKey) {
-        this.experimentKey = experimentKey;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    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 Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public Resource get(ResourceType type, Object name) throws RegistryException {
-        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public List<Resource> get(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            Experiment_Input existingInput = em.find(Experiment_Input.class, new Experiment_Input_PK(experimentResource.getExpID(), experimentKey));
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Experiment_Input exInput = new Experiment_Input();
-            exInput.setEx_key(experimentKey);
-            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
-            exInput.setExperiment(experiment);
-            exInput.setExperiment_id(experiment.getExpId());
-            if (value != null){
-                exInput.setValue(value.toCharArray());
-            }
-            exInput.setDataType(dataType);
-            exInput.setMetadata(metadata);
-            exInput.setAppArgument(appArgument);
-            exInput.setStandardInput(standardInput);
-            exInput.setUserFriendlyDesc(userFriendlyDesc);
-            exInput.setInputOrder(inputOrder);
-            exInput.setRequiredToCMD(requiredToCMD);
-            exInput.setRequired(isRequired);
-            exInput.setDataStaged(dataStaged);
-            if (existingInput != null) {
-                existingInput.setEx_key(experimentKey);
-                existingInput.setExperiment(experiment);
-                existingInput.setExperiment_id(experiment.getExpId());
-                if (value != null){
-                    existingInput.setValue(value.toCharArray());
-                }
-                existingInput.setDataType(dataType);
-                existingInput.setMetadata(metadata);
-                existingInput.setAppArgument(appArgument);
-                existingInput.setStandardInput(standardInput);
-                existingInput.setUserFriendlyDesc(userFriendlyDesc);
-                existingInput.setInputOrder(inputOrder);
-                existingInput.setRequiredToCMD(requiredToCMD);
-                existingInput.setRequired(isRequired);
-                existingInput.setDataStaged(dataStaged);
-                exInput = em.merge(existingInput);
-            } else {
-                em.persist(exInput);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java
deleted file mode 100644
index 17bd23a..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java
+++ /dev/null
@@ -1,209 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment_Output;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment_Output_PK;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.util.List;
-
-public class ExperimentOutputResource extends AbstractResource {
-    private static final Logger logger = LoggerFactory.getLogger(ExperimentOutputResource.class);
-
-    private ExperimentResource experimentResource;
-    private String experimentKey;
-    private String value;
-    private String dataType;
-    private boolean isRequired;
-    private boolean dataMovement;
-    private String dataNameLocation;
-    private boolean requiredToCMD;
-    private String searchQuery;
-    private String appArgument;
-
-    public String getSearchQuery() {
-        return searchQuery;
-    }
-
-    public void setSearchQuery(String searchQuery) {
-        this.searchQuery = searchQuery;
-    }
-
-    public String getAppArgument() {
-        return appArgument;
-    }
-
-    public void setAppArgument(String appArgument) {
-        this.appArgument = appArgument;
-    }
-
-
-    public boolean getRequiredToCMD() {
-        return requiredToCMD;
-    }
-
-    public void setRequiredToCMD(boolean requiredToCMD) {
-        this.requiredToCMD = requiredToCMD;
-    }
-
-    public boolean getRequired() {
-        return isRequired;
-    }
-
-    public void setRequired(boolean required) {
-        this.isRequired = required;
-    }
-
-    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 getExperimentKey() {
-        return experimentKey;
-    }
-
-    public void setExperimentKey(String experimentKey) {
-        this.experimentKey = experimentKey;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    public String getDataType() {
-        return dataType;
-    }
-
-    public void setDataType(String dataType) {
-        this.dataType = dataType;
-    }
-
-    public Resource create(ResourceType type)  throws RegistryException {
-        logger.error("Unsupported resource type for experiment output data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public void remove(ResourceType type, Object name)  throws RegistryException{
-        logger.error("Unsupported resource type for experiment output data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public Resource get(ResourceType type, Object name)  throws RegistryException{
-        logger.error("Unsupported resource type for experiment output data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public List<Resource> get(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for experiment output data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public void save() throws RegistryException {
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            Experiment_Output existingOutput = em.find(Experiment_Output.class, new Experiment_Output_PK(experimentResource.getExpID(), experimentKey));
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Experiment_Output exOutput = new Experiment_Output();
-            exOutput.setEx_key(experimentKey);
-            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
-            exOutput.setExperiment(experiment);
-            exOutput.setExperiment_id(experiment.getExpId());
-            if (value != null){
-                exOutput.setValue(value.toCharArray());
-            }
-            exOutput.setDataType(dataType);
-            exOutput.setRequired(isRequired);
-            exOutput.setRequiredToCMD(requiredToCMD);
-            exOutput.setDataMovement(dataMovement);
-            exOutput.setDataNameLocation(dataNameLocation);
-            exOutput.setApplicationArgument(appArgument);
-            exOutput.setSearchQuery(searchQuery);
-
-            if (existingOutput != null) {
-                existingOutput.setEx_key(experimentKey);
-                existingOutput.setExperiment(experiment);
-                if (value != null){
-                    existingOutput.setValue(value.toCharArray());
-                }
-                existingOutput.setExperiment_id(experiment.getExpId());
-                existingOutput.setDataType(dataType);
-                existingOutput.setRequired(isRequired);
-                existingOutput.setRequiredToCMD(requiredToCMD);
-                existingOutput.setDataMovement(dataMovement);
-                existingOutput.setDataNameLocation(dataNameLocation);
-                existingOutput.setApplicationArgument(appArgument);
-                existingOutput.setSearchQuery(searchQuery);
-                exOutput = em.merge(existingOutput);
-            } else {
-                em.persist(exOutput);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}


[41/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
deleted file mode 100644
index e6f7c4c..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
+++ /dev/null
@@ -1,1643 +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.persistance.registry.jpa.impl;
-
-import org.apache.airavata.common.logger.AiravataLogger;
-import org.apache.airavata.common.logger.AiravataLoggerFactory;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.workspace.experiment.*;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.mongo.dao.ExperimentDao;
-import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.persistance.registry.jpa.utils.ThriftDataModelConversion;
-import org.apache.airavata.registry.cpi.CompositeIdentifier;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.RegistryModelType;
-import org.apache.airavata.registry.cpi.ResultOrderType;
-import org.apache.airavata.registry.cpi.utils.Constants;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-public class ExperimentRegistry {
-    private GatewayResource gatewayResource;
-    private WorkerResource workerResource;
-    private final static AiravataLogger logger = AiravataLoggerFactory.getLogger(ExperimentRegistry.class);
-
-    private ExperimentDao experimentDao;
-
-    public ExperimentRegistry(GatewayResource gateway, UserResource user) throws RegistryException {
-        gatewayResource = gateway;
-        if (!gatewayResource.isExists(ResourceType.GATEWAY_WORKER, user.getUserName())) {
-            workerResource = ResourceUtils.addGatewayWorker(gateway, user);
-        } else {
-            workerResource = (WorkerResource) ResourceUtils.getWorker(gateway.getGatewayId(), user.getUserName());
-        }
-
-        this.experimentDao = new ExperimentDao();
-    }
-
-    public String addExperiment(Experiment experiment, String gatewayId) throws RegistryException {
-        try {
-            if (!ResourceUtils.isUserExist(experiment.getUserName())) {
-                ResourceUtils.addUser(experiment.getUserName(), null);
-            }
-            if (!workerResource.isProjectExists(experiment.getProjectId())) {
-                logger.error("Project does not exist in the system..");
-                throw new Exception("Project does not exist in the system, Please" +
-                        " create the project first...");
-            }
-            //setting up unique ids
-            experiment.setExperimentId(getExperimentId(experiment.getName()));
-            for (WorkflowNodeDetails wfnd : experiment.getWorkflowNodeDetailsList()) {
-                wfnd.setNodeInstanceId(getNodeInstanceID(wfnd.getNodeName()));
-                for (TaskDetails taskDetails : wfnd.getTaskDetailsList()) {
-                    taskDetails.setTaskId(getTaskId(wfnd.getNodeName()));
-                    for (DataTransferDetails dtd : taskDetails.getDataTransferDetailsList()) {
-                        dtd.setTransferId(getDataTransferID(taskDetails.getTaskId()));
-                    }
-                }
-            }
-            experimentDao.createExperiment(experiment);
-        } catch (Exception e) {
-            logger.error("Error while saving experiment to registry", e);
-            throw new RegistryException(e);
-        }
-        return experiment.getExperimentId();
-    }
-
-    public String addUserConfigData(UserConfigurationData configurationData, String expId) throws RegistryException {
-        try {
-            Experiment experiment = experimentDao.getExperiment(expId);
-            experiment.setUserConfigurationData(configurationData);
-            experimentDao.updateExperiment(experiment);
-            return expId;
-        } catch (Exception e) {
-            logger.error("Unable to save user config data", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public String addExpOutputs(List<OutputDataObjectType> exOutput, String expId) throws RegistryException {
-        return updateExpOutputs(exOutput, expId);
-    }
-
-    public String updateExpOutputs(List<OutputDataObjectType> exOutput, String expId) throws RegistryException {
-        try {
-            Experiment experiement = experimentDao.getExperiment(expId);
-            experiement.setExperimentOutputs(exOutput);
-            experimentDao.updateExperiment(experiement);
-            return expId;
-        } catch (Exception e) {
-            logger.error("Error while updating experiment outputs", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public String addNodeOutputs(List<OutputDataObjectType> wfOutputs, CompositeIdentifier ids) throws RegistryException {
-        return updateNodeOutputs(wfOutputs, (String) ids.getSecondLevelIdentifier());
-    }
-
-    public String updateNodeOutputs(List<OutputDataObjectType> wfOutputs, String nodeId) throws RegistryException {
-        try {
-            WorkflowNodeDetails wfnd = experimentDao.getWFNode(nodeId);
-            wfnd.setNodeOutputs(wfOutputs);
-            experimentDao.updateWFNode(wfnd);
-            return nodeId;
-        } catch (Exception e) {
-            logger.error("Error while updating node outputs...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public String addApplicationOutputs(List<OutputDataObjectType> appOutputs, CompositeIdentifier ids) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getThirdLevelIdentifier());
-            taskDetails.getApplicationOutputs().addAll(appOutputs);
-            experimentDao.updateTaskDetail(taskDetails);
-            return (String) ids.getSecondLevelIdentifier();
-        } catch (Exception e) {
-            logger.error("Error while adding application outputs...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public String updateExperimentStatus(ExperimentStatus experimentStatus, String expId)
-            throws RegistryException {
-        try {
-            Experiment experiment = experimentDao.getExperiment(expId);
-            String currentState = (experiment.getExperimentStatus() == null)
-                    ? ExperimentState.UNKNOWN.name()
-                    : experiment.getExperimentStatus().getExperimentState().name();
-            if (isValidStatusTransition(ExperimentState.valueOf(currentState),
-                    experimentStatus.getExperimentState())) {
-                experiment.setExperimentStatus(experimentStatus);
-                experimentDao.updateExperiment(experiment);
-                logger.debugId(expId, "Updated experiment {} status to {}.",
-                        expId, experimentStatus.toString());
-                return experiment.getExperimentId();
-            }
-        } catch (Exception e) {
-            logger.errorId(expId, "Error while updating experiment status...", e);
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public String addWorkflowNodeStatus(WorkflowNodeStatus status, CompositeIdentifier ids) throws RegistryException {
-        return updateWorkflowNodeStatus(status, (String) ids.getSecondLevelIdentifier());
-    }
-
-    public String updateWorkflowNodeStatus(WorkflowNodeStatus status, String nodeId) throws RegistryException {
-        try {
-            WorkflowNodeDetails wfnd = experimentDao.getWFNode(nodeId);
-            wfnd.setWorkflowNodeStatus(status);
-            experimentDao.updateWFNode(wfnd);
-            return nodeId;
-        } catch (Exception e) {
-            logger.errorId(nodeId, "Error while updating workflow node status to " + status.toString() + "...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public String addTaskStatus(TaskStatus status, CompositeIdentifier ids) throws RegistryException {
-        return updateTaskStatus(status, (String) ids.getThirdLevelIdentifier());
-    }
-
-    public String updateTaskStatus(TaskStatus status, String taskId) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
-            taskDetails.setTaskStatus(status);
-            experimentDao.updateTaskDetail(taskDetails);
-            return taskId;
-        } catch (Exception e) {
-            logger.errorId(taskId, "Error while updating task status to " + status.toString() + "...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    /**
-     * @param status job status
-     * @param ids    composite id will contain taskid and jobid
-     * @return status id
-     */
-    public String addJobStatus(JobStatus status, CompositeIdentifier ids) throws RegistryException {
-        return updateJobStatus(status, ids);
-    }
-
-    public String updateJobStatus(JobStatus status, CompositeIdentifier ids) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
-            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
-                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
-                    if (status.getJobState() == null) {
-                        status.setJobState(JobState.UNKNOWN);
-                    }
-                    jobDetails.setJobStatus(status);
-                    experimentDao.updateTaskDetail(taskDetails);
-                    return (String) ids.getSecondLevelIdentifier();
-                }
-            }
-            return null;
-        } catch (Exception e) {
-            logger.errorId(ids.toString(), "Error while updating job status to " + status.toString() + " ...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    /**
-     * @param status application status
-     * @param ids    composite id will contain taskid and jobid
-     * @return status id
-     */
-    public String addApplicationStatus(ApplicationStatus status, CompositeIdentifier ids) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
-            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
-                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
-                    jobDetails.setApplicationStatus(status);
-                    experimentDao.updateTaskDetail(taskDetails);
-                    return (String) ids.getSecondLevelIdentifier();
-                }
-            }
-            return null;
-        } catch (Exception e) {
-            logger.error("Unable to read airavata-server properties", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void updateApplicationStatus(ApplicationStatus status, CompositeIdentifier ids) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
-            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
-                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
-                    jobDetails.setApplicationStatus(status);
-                    experimentDao.updateTaskDetail(taskDetails);
-                    return;
-                }
-            }
-        } catch (Exception e) {
-            logger.error("Error while updating application status...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    /**
-     * @param status data transfer status
-     * @param ids    contains taskId and transfer id
-     * @return status id
-     */
-    public String addTransferStatus(TransferStatus status, CompositeIdentifier ids) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
-            for (DataTransferDetails dataTransferDetails : taskDetails.getDataTransferDetailsList()) {
-                if (dataTransferDetails.getTransferId().equals(ids.getSecondLevelIdentifier())) {
-                    if (status.getTransferState() == null) {
-                        status.setTransferState(TransferState.UNKNOWN);
-                    }
-                    dataTransferDetails.setTransferStatus(status);
-                    experimentDao.updateTaskDetail(taskDetails);
-                    return (String) ids.getSecondLevelIdentifier();
-                }
-            }
-            return null;
-        } catch (Exception e) {
-            logger.error("Error while adding transfer status...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void updateTransferStatus(TransferStatus status, CompositeIdentifier ids) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
-            for (DataTransferDetails dataTransferDetails : taskDetails.getDataTransferDetailsList()) {
-                if (dataTransferDetails.getTransferId().equals(ids.getSecondLevelIdentifier())) {
-                    dataTransferDetails.setTransferStatus(status);
-                    experimentDao.updateTaskDetail(taskDetails);
-                }
-            }
-        } catch (Exception e) {
-            logger.error("Error while updating transfer status...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public String addWorkflowNodeDetails(WorkflowNodeDetails nodeDetails, String expId) throws RegistryException {
-        try {
-            nodeDetails.setNodeInstanceId(getNodeInstanceID(nodeDetails.getNodeName()));
-            for (TaskDetails taskDetails : nodeDetails.getTaskDetailsList()) {
-                taskDetails.setTaskId(getTaskId(nodeDetails.getNodeName()));
-                for (DataTransferDetails dtd : taskDetails.getDataTransferDetailsList()) {
-                    dtd.setTransferId(getDataTransferID(taskDetails.getTaskId()));
-                }
-            }
-            experimentDao.createWFNode(expId, nodeDetails);
-            return nodeDetails.getNodeInstanceId();
-        } catch (Exception e) {
-            logger.error("Error while adding workflow node details...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void updateWorkflowNodeDetails(WorkflowNodeDetails nodeDetails, String nodeId) throws RegistryException {
-        try {
-            experimentDao.updateWFNode(nodeDetails);
-        } catch (Exception e) {
-            logger.error("Error while updating workflow node details...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public String addTaskDetails(TaskDetails taskDetails, String nodeId) throws RegistryException {
-        try {
-            experimentDao.createTaskDetail(nodeId, taskDetails);
-            return taskDetails.getTaskId();
-        } catch (Exception e) {
-            logger.error("Error while adding task details...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public String updateTaskDetails(TaskDetails taskDetails, String taskId) throws RegistryException {
-        try {
-            experimentDao.updateTaskDetail(taskDetails);
-            return taskDetails.getTaskId();
-        } catch (Exception e) {
-            logger.error("Error while updating task details...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void updateAppOutputs(List<OutputDataObjectType> appOutputs, String taskId) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
-            taskDetails.setApplicationOutputs(appOutputs);
-            experimentDao.updateTaskDetail(taskDetails);
-        } catch (Exception e) {
-            logger.error("Error while updating application outputs...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public String addJobDetails(JobDetails jobDetails, CompositeIdentifier ids) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
-            jobDetails.setJobId((String) ids.getSecondLevelIdentifier());
-            taskDetails.getJobDetailsList().add(jobDetails);
-            experimentDao.updateTaskDetail(taskDetails);
-            return (String) ids.getSecondLevelIdentifier();
-        } catch (Exception e) {
-            logger.error("Error while adding job details...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    // ids - taskId + jobid
-    public void updateJobDetails(JobDetails jobDetails, CompositeIdentifier ids) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
-            List<JobDetails> jobDetailsList = taskDetails.getJobDetailsList();
-            for (JobDetails exisitingJobDetail : taskDetails.getJobDetailsList()) {
-                if (exisitingJobDetail.getJobId().equals(jobDetails.getJobId())) {
-                    jobDetailsList.remove(exisitingJobDetail);
-                    jobDetailsList.add(jobDetails);
-                    taskDetails.setJobDetailsList(jobDetailsList);
-                    experimentDao.updateTaskDetail(taskDetails);
-                    return;
-                }
-            }
-        } catch (Exception e) {
-            logger.error("Error while updating job details...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public String addDataTransferDetails(DataTransferDetails transferDetails, String taskId) throws RegistryException {
-        try {
-            if (transferDetails.getTransferDescription() == null) {
-                throw new RegistryException("Data transfer description cannot be empty");
-            }
-            TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
-            taskDetails.getDataTransferDetailsList().add(transferDetails);
-            experimentDao.updateTaskDetail(taskDetails);
-            return taskId;
-        } catch (Exception e) {
-            logger.error("Error while adding transfer details...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public String updateDataTransferDetails(DataTransferDetails transferDetails, CompositeIdentifier ids) throws RegistryException {
-        try {
-            TaskDetails taskDetail = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
-            for (DataTransferDetails dtd : taskDetail.getDataTransferDetailsList()) {
-                if (dtd.getTransferId().equals(ids.getSecondLevelIdentifier())) {
-                    taskDetail.getDataTransferDetailsList().remove(dtd);
-                    taskDetail.getDataTransferDetailsList().add(transferDetails);
-                    experimentDao.updateTaskDetail(taskDetail);
-                    return (String) ids.getSecondLevelIdentifier();
-                }
-            }
-            return null;
-        } catch (Exception e) {
-            logger.error("Error while updating transfer details...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    /**
-     * @param scheduling computational resource object
-     * @param ids        contains expId and taskId, if it is an experiment, task id can be null
-     * @return scheduling id
-     */
-    public String addComputationalResourceScheduling(ComputationalResourceScheduling scheduling, CompositeIdentifier ids) throws RegistryException {
-        try {
-            if (ids.getSecondLevelIdentifier() == null) {
-                Experiment experiment = experimentDao.getExperiment((String) ids.getTopLevelIdentifier());
-                experiment.getUserConfigurationData().setComputationalResourceScheduling(scheduling);
-                experimentDao.updateExperiment(experiment);
-                return (String) ids.getTopLevelIdentifier();
-            } else {
-                TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getSecondLevelIdentifier());
-                taskDetails.setTaskScheduling(scheduling);
-                experimentDao.updateTaskDetail(taskDetails);
-                return (String) ids.getSecondLevelIdentifier();
-            }
-        } catch (Exception e) {
-            logger.error("Error while adding scheduling parameters...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    /**
-     * @param dataHandling advanced input data handling object
-     * @param ids          contains expId and taskId
-     * @return data handling id
-     */
-    public String addInputDataHandling(AdvancedInputDataHandling dataHandling, CompositeIdentifier ids) throws RegistryException {
-        try {
-            if (ids.getSecondLevelIdentifier() == null) {
-                Experiment experiment = experimentDao.getExperiment((String) ids.getTopLevelIdentifier());
-                experiment.getUserConfigurationData().setAdvanceInputDataHandling(dataHandling);
-                experimentDao.updateExperiment(experiment);
-                return (String) ids.getTopLevelIdentifier();
-            } else {
-                TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getSecondLevelIdentifier());
-                taskDetails.setAdvancedInputDataHandling(dataHandling);
-                experimentDao.updateTaskDetail(taskDetails);
-                return (String) ids.getSecondLevelIdentifier();
-            }
-        } catch (Exception e) {
-            logger.error("Error while adding input data handling...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    /**
-     * @param dataHandling advanced output data handling object
-     * @param ids          contains expId and taskId
-     * @return data handling id
-     */
-    public String addOutputDataHandling(AdvancedOutputDataHandling dataHandling, CompositeIdentifier ids) throws RegistryException {
-        try {
-            if (ids.getSecondLevelIdentifier() == null) {
-                Experiment experiment = experimentDao.getExperiment((String) ids.getTopLevelIdentifier());
-                experiment.getUserConfigurationData().setAdvanceOutputDataHandling(dataHandling);
-                experimentDao.updateExperiment(experiment);
-                return (String) ids.getTopLevelIdentifier();
-            } else {
-                TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getSecondLevelIdentifier());
-                taskDetails.setAdvancedOutputDataHandling(dataHandling);
-                experimentDao.updateTaskDetail(taskDetails);
-                return (String) ids.getSecondLevelIdentifier();
-            }
-        } catch (Exception e) {
-            logger.error("Error while adding output data handling...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public String addQosParams(QualityOfServiceParams qosParams, String expId) throws RegistryException {
-        try {
-            Experiment experiment = experimentDao.getExperiment(expId);
-            experiment.getUserConfigurationData().setQosParams(qosParams);
-            experimentDao.updateExperiment(experiment);
-            return expId;
-        } catch (Exception e) {
-            logger.error("Error while adding QOS params...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public String addErrorDetails(ErrorDetails error, Object id) throws RegistryException {
-        try {
-            // FIXME : for .12 we only saveExperiment task related errors
-            if(id instanceof String){
-                TaskDetails taskDetails = experimentDao.getTaskDetail((String) id);
-                taskDetails.getErrors().add(error);
-                experimentDao.updateTaskDetail(taskDetails);
-                return (String) id;
-            } else if (id instanceof CompositeIdentifier) {
-                CompositeIdentifier cid = (CompositeIdentifier) id;
-                TaskDetails taskDetails = experimentDao.getTaskDetail((String) cid.getTopLevelIdentifier());
-                for(JobDetails jobDetails: taskDetails.getJobDetailsList()){
-                    if(jobDetails.getJobId().equals(cid.getSecondLevelIdentifier())){
-                        jobDetails.getErrors().add(error);
-                        experimentDao.updateTaskDetail(taskDetails);
-                        return (String) cid.getSecondLevelIdentifier();
-                    }
-                }
-            } else {
-                logger.error("Unsupported data type...");
-            }
-        } catch (Exception e) {
-            logger.error("Unable to add error details...", e);
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public String getNodeInstanceID(String nodeName) {
-        String node = nodeName.replaceAll("\\s", "");
-        return node + "_" + UUID.randomUUID();
-    }
-
-    public String getExperimentId(String experimentName) {
-        String exp = experimentName.replaceAll("\\s", "");
-        return exp + "_" + UUID.randomUUID();
-    }
-
-    public String getTaskId(String nodeName) {
-        String node = nodeName.replaceAll("\\s", "");
-        return node + "_" + UUID.randomUUID();
-    }
-
-    public String getDataTransferID(String taskId) {
-        String task = taskId.replaceAll("\\s", "");
-        return task + "_" + UUID.randomUUID();
-    }
-
-    public void updateExperimentField(String expID, String fieldName, Object value) throws RegistryException {
-        try {
-            Experiment experiment = experimentDao.getExperiment(expID);
-            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_NAME)) {
-                experiment.setName((String) value);
-                experimentDao.updateExperiment(experiment);
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
-                experiment.setUserName((String) value);
-                experimentDao.updateExperiment(experiment);
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_DESC)) {
-                experiment.setDescription((String) value);
-                experimentDao.updateExperiment(experiment);
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_ID)) {
-                experiment.setApplicationId((String) value);
-                experimentDao.updateExperiment(experiment);
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_VERSION)) {
-                experiment.setApplicationVersion((String) value);
-                experimentDao.updateExperiment(experiment);
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_TEMPLATE_ID)) {
-                experiment.setWorkflowTemplateId((String) value);
-                experimentDao.updateExperiment(experiment);
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_TEMPLATE_VERSION)) {
-                experiment.setWorkflowTemplateVersion((String) value);
-                experimentDao.updateExperiment(experiment);
-            } else {
-                logger.error("Unsupported field type for Experiment");
-            }
-        } catch (Exception e) {
-            logger.error("Error while updating fields in experiment...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void updateExpConfigDataField(String expID, String fieldName, Object value) throws RegistryException {
-        try {
-            Experiment experiment = experimentDao.getExperiment(expID);
-            if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.AIRAVATA_AUTO_SCHEDULE)) {
-                experiment.getUserConfigurationData().setAiravataAutoSchedule((Boolean) value);
-                experimentDao.updateExperiment(experiment);
-            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.OVERRIDE_MANUAL_PARAMS)) {
-                experiment.getUserConfigurationData().setOverrideManualScheduledParams((Boolean) value);
-                experimentDao.updateExperiment(experiment);
-            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.SHARE_EXP)) {
-                experiment.getUserConfigurationData().setShareExperimentPublicly((Boolean) value);
-                experimentDao.updateExperiment(experiment);
-            } else if (fieldName.equals(Constants.FieldConstants
-                    .ConfigurationDataConstants.COMPUTATIONAL_RESOURCE_SCHEDULING)) {
-                experiment.getUserConfigurationData()
-                        .setComputationalResourceScheduling((ComputationalResourceScheduling) value);
-                experimentDao.updateExperiment(experiment);
-            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_INPUT_HANDLING)) {
-                experiment.getUserConfigurationData()
-                        .setAdvanceInputDataHandling((AdvancedInputDataHandling) value);
-                experimentDao.updateExperiment(experiment);
-            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_OUTPUT_HANDLING)) {
-                experiment.getUserConfigurationData()
-                        .setAdvanceOutputDataHandling((AdvancedOutputDataHandling) value);
-                experimentDao.updateExperiment(experiment);
-            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.QOS_PARAMS)) {
-                experiment.getUserConfigurationData()
-                        .setQosParams((QualityOfServiceParams) value);
-                experimentDao.updateExperiment(experiment);
-            } else {
-                logger.error("Unsupported field type for Experiment config data");
-            }
-        } catch (Exception e) {
-            logger.error("Error while updating fields in experiment config...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void updateExperiment(Experiment experiment, String expId) throws RegistryException {
-        try {
-            if (!ResourceUtils.isUserExist(experiment.getUserName())) {
-                ResourceUtils.addUser(experiment.getUserName(), null);
-            }
-            if (!workerResource.isProjectExists(experiment.getProjectId())) {
-                logger.error("Project does not exist in the system..");
-                throw new Exception("Project does not exist in the system, Please create the project first...");
-            }
-            //making sure id is set
-            experiment.setExperimentId(expId);
-            experimentDao.updateExperiment(experiment);
-        } catch (Exception e) {
-            logger.error("Error while updating experiment...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void updateUserConfigData(UserConfigurationData configData, String expId) throws RegistryException {
-        try {
-            Experiment experiment = experimentDao.getExperiment(expId);
-            experiment.setUserConfigurationData(configData);
-            experimentDao.updateExperiment(experiment);
-            return;
-        } catch (Exception e) {
-            logger.error("Error while updating user config data...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    /**
-     * Method to getExperiment matching experiment list
-     *
-     * @param fieldName
-     * @param value
-     * @return
-     * @throws RegistryException
-     */
-    public List<Experiment> getExperimentList(String fieldName, Object value) throws RegistryException {
-        return getExperimentList(fieldName, value, -1, -1, null, null);
-    }
-
-    /**
-     * Method to getExperiment matching experiment list with pagination and ordering
-     *
-     * @param fieldName
-     * @param value
-     * @param limit
-     * @param offset
-     * @param orderByIdentifier
-     * @param resultOrderType
-     * @return
-     * @throws RegistryException
-     */
-    public List<Experiment> getExperimentList(String fieldName, Object value, int limit, int offset,
-                                              Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
-        List<Experiment> experiments = new ArrayList();
-        Map<String, String> filters = new HashMap();
-        try {
-            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
-                filters.put(fieldName, (String)value);
-                return experimentDao.searchExperiments(filters, limit, offset, orderByIdentifier, resultOrderType);
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.PROJECT_ID)) {
-                filters.put(fieldName, (String)value);
-                return experimentDao.searchExperiments(filters, limit, offset, orderByIdentifier, resultOrderType);
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
-                filters.put(fieldName, (String)value);
-                return experimentDao.searchExperiments(filters, limit, offset, orderByIdentifier, resultOrderType);
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_NODE_LIST)) {
-                if (value instanceof List<?>) {
-                    return getExperimentList(fieldName, ((List<?>) value).get(0));
-                } else if (value instanceof WorkflowNodeDetails) {
-                    List<Experiment> experimentList = new ArrayList();
-                    experimentList.add(experimentDao.getParentExperimentOfWFNode(
-                            ((WorkflowNodeDetails)value).getNodeInstanceId())
-                    );
-                } else {
-                    logger.error("Unsupported field value to retrieve workflow node detail list...");
-                }
-
-            } else {
-                logger.error("Unsupported field name to retrieve experiment list...");
-            }
-        } catch (Exception e) {
-            logger.error("Error while getting experiment list...", e);
-            throw new RegistryException(e);
-        }
-        return experiments;
-    }
-
-
-    public List<WorkflowNodeDetails> getWFNodeDetails(String fieldName, Object value) throws RegistryException {
-        try {
-            if (fieldName.equals(Constants.FieldConstants.WorkflowNodeConstants.EXPERIMENT_ID)) {
-                Experiment experiment = experimentDao.getExperiment((String) value);
-                return experiment.getWorkflowNodeDetailsList();
-            }
-            if (fieldName.equals(Constants.FieldConstants.WorkflowNodeConstants.TASK_LIST)) {
-                if (value instanceof List<?>) {
-                    return getWFNodeDetails(fieldName, ((List<?>) value).get(0));
-                } else if (value instanceof TaskDetails) {
-                    List<WorkflowNodeDetails> workflowNodeDetailsList = new ArrayList();
-                    workflowNodeDetailsList.add(experimentDao.getParentWFNodeOfTask(((TaskDetails)value).getTaskId()));
-                    return workflowNodeDetailsList;
-                } else {
-                    logger.error("Unsupported field value to retrieve workflow node detail list...");
-                }
-            } else {
-                logger.error("Unsupported field name to retrieve workflow detail list...");
-            }
-        } catch (Exception e) {
-            logger.error("Error while getting workfkow details...", e);
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public List<WorkflowNodeStatus> getWFNodeStatusList(String fieldName, Object value) throws RegistryException {
-        try {
-            if (fieldName.equals(Constants.FieldConstants.WorkflowNodeStatusConstants.EXPERIMENT_ID)) {
-                Experiment experiment = experimentDao.getExperiment((String) value);
-                List<WorkflowNodeStatus> workflowNodeStatuses = experiment.getWorkflowNodeDetailsList().stream().map(WorkflowNodeDetails::getWorkflowNodeStatus).collect(Collectors.toList());
-                return workflowNodeStatuses;
-            } else {
-                logger.error("Unsupported field name to retrieve workflow status list...");
-            }
-        } catch (Exception e) {
-            logger.error("Error while getting workflow status...", e);
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public List<TaskDetails> getTaskDetails(String fieldName, Object value) throws RegistryException {
-        try {
-            if (fieldName.equals(Constants.FieldConstants.TaskDetailConstants.NODE_ID)) {
-                WorkflowNodeDetails wfnd = experimentDao.getWFNode((String) value);
-                return wfnd.getTaskDetailsList();
-            } else {
-                logger.error("Unsupported field name to retrieve task detail list...");
-            }
-        } catch (Exception e) {
-            logger.error("Error while getting task details...", e);
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public List<JobDetails> getJobDetails(String fieldName, Object value) throws RegistryException {
-        try {
-            if (fieldName.equals(Constants.FieldConstants.JobDetaisConstants.TASK_ID)) {
-                TaskDetails taskDetails = experimentDao.getTaskDetail((String) value);
-                return taskDetails.getJobDetailsList();
-            } else {
-                logger.error("Unsupported field name to retrieve job details list...");
-            }
-        } catch (Exception e) {
-            logger.error("Error while job details...", e);
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public List<DataTransferDetails> getDataTransferDetails(String fieldName, Object value) throws RegistryException {
-        try {
-            if (fieldName.equals(Constants.FieldConstants.DataTransferDetailConstants.TASK_ID)) {
-                TaskDetails taskDetails = experimentDao.getTaskDetail((String) value);
-                return taskDetails.getDataTransferDetailsList();
-            } else {
-                logger.error("Unsupported field name to retrieve job details list...");
-            }
-        } catch (Exception e) {
-            logger.error("Error while getting data transfer details...", e);
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public List<ErrorDetails> getErrorDetails(String fieldName, Object value) throws RegistryException {
-        try {
-            if (fieldName.equals(Constants.FieldConstants.ErrorDetailsConstants.EXPERIMENT_ID)) {
-                Experiment experiment = experimentDao.getExperiment((String) value);
-                return experiment.getErrors();
-            } else if (fieldName.equals(Constants.FieldConstants.ErrorDetailsConstants.NODE_ID)) {
-                WorkflowNodeDetails wfnd = experimentDao.getWFNode((String) value);
-                wfnd.getErrors();
-            } else if (fieldName.equals(Constants.FieldConstants.ErrorDetailsConstants.TASK_ID)) {
-                TaskDetails taskDetails = experimentDao.getTaskDetail((String) value);
-                return taskDetails.getErrors();
-            } else if (fieldName.equals(Constants.FieldConstants.ErrorDetailsConstants.JOB_ID)) {
-                CompositeIdentifier cid = (CompositeIdentifier) value;
-                TaskDetails taskDetails = experimentDao.getTaskDetail((String) cid.getTopLevelIdentifier());
-                for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
-                    if (jobDetails.getJobId().equals(cid.getSecondLevelIdentifier())) {
-                        return jobDetails.getErrors();
-                    }
-                }
-            } else {
-                logger.error("Unsupported field name to retrieve job details list...");
-            }
-        } catch (Exception e) {
-            logger.error("Unable to get error details...", e);
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public Object getExperiment(String expId, String fieldName) throws RegistryException {
-        try {
-            Experiment experiment = experimentDao.getExperiment(expId);
-            if (fieldName == null) {
-                return experiment;
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
-                return experiment.getUserName();
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
-                return experiment.getGatewayExecutionId();
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_NAME)) {
-                return experiment.getName();
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_DESC)) {
-                return experiment.getDescription();
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_ID)) {
-                return experiment.getApplicationId();
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.PROJECT_ID)) {
-                return experiment.getProjectId();
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_VERSION)) {
-                return experiment.getApplicationVersion();
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_TEMPLATE_ID)) {
-                return experiment.getWorkflowTemplateId();
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_TEMPLATE_VERSION)) {
-                return experiment.getWorkflowTemplateVersion();
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_INPUTS)) {
-                return experiment.getExperimentInputs();
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_OUTPUTS)) {
-                return experiment.getExperimentOutputs();
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_STATUS)) {
-                return experiment.getExperimentStatus();
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_CONFIGURATION_DATA)) {
-                return experiment.getUserConfigurationData();
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_EXECUTION_ID)) {
-                return experiment.getWorkflowExecutionInstanceId();
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.STATE_CHANGE_LIST)) {
-                final List<WorkflowNodeStatus> statusList = new ArrayList();
-                        experiment.getWorkflowNodeDetailsList().stream()
-                        .forEach(wfnd->statusList.add(wfnd.getWorkflowNodeStatus()));
-                return statusList;
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_NODE_LIST)) {
-                return experiment.getWorkflowNodeDetailsList();
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.ERROR_DETAIL_LIST)) {
-                return experiment.getErrors();
-            } else {
-                logger.error("Unsupported field name for experiment basic data..");
-            }
-        } catch (Exception e) {
-            logger.error("Error while getting experiment info...", e);
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public Object getConfigData(String expId, String fieldName) throws RegistryException {
-        try {
-            UserConfigurationData configurationData = experimentDao.getExperiment(expId).getUserConfigurationData();
-            if (fieldName == null) {
-                return configurationData;
-            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.AIRAVATA_AUTO_SCHEDULE)) {
-                return configurationData.isAiravataAutoSchedule();
-            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.OVERRIDE_MANUAL_PARAMS)) {
-                return configurationData.isOverrideManualScheduledParams();
-            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.SHARE_EXP)) {
-                return configurationData.isShareExperimentPublicly();
-            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.COMPUTATIONAL_RESOURCE_SCHEDULING)) {
-                return configurationData.getComputationalResourceScheduling();
-            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_INPUT_HANDLING)) {
-                return configurationData.getAdvanceInputDataHandling();
-            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_OUTPUT_HANDLING)) {
-                return configurationData.getAdvanceOutputDataHandling();
-            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.QOS_PARAMS)) {
-                return configurationData.getQosParams();
-            } else {
-                logger.error("Unsupported field name for experiment configuration data..");
-            }
-        } catch (Exception e) {
-            logger.error("Error while getting config data..", e);
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public List<OutputDataObjectType> getExperimentOutputs(String expId) throws RegistryException {
-        try {
-            Experiment experiment = experimentDao.getExperiment(expId);
-            return experiment.getExperimentOutputs();
-        } catch (Exception e) {
-            logger.error("Error while getting experiment outputs...", e);
-        }
-        return null;
-    }
-
-    public ExperimentStatus getExperimentStatus(String expId) throws RegistryException {
-        try {
-            Experiment experiment = experimentDao.getExperiment(expId);
-            return experiment.getExperimentStatus();
-        } catch (Exception e) {
-            logger.error("Error while getting experiment status...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public ComputationalResourceScheduling getComputationalScheduling(RegistryModelType type, String id) throws RegistryException {
-        try {
-            ComputationSchedulingResource computationScheduling = null;
-            switch (type) {
-                case EXPERIMENT:
-                    Experiment experiment = experimentDao.getExperiment(id);
-                    return experiment.getUserConfigurationData().getComputationalResourceScheduling();
-                case TASK_DETAIL:
-                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
-                    return taskDetails.getTaskScheduling();
-            }
-            if (computationScheduling != null) {
-                return ThriftDataModelConversion.getComputationalResourceScheduling(computationScheduling);
-            }
-        } catch (Exception e) {
-            logger.error("Error while getting scheduling data..", e);
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public AdvancedInputDataHandling getInputDataHandling(RegistryModelType type, String id) throws RegistryException {
-        try {
-            AdvanceInputDataHandlingResource dataHandlingResource = null;
-            switch (type) {
-                case EXPERIMENT:
-                    Experiment experiment = experimentDao.getExperiment(id);
-                    return experiment.getUserConfigurationData().getAdvanceInputDataHandling();
-                case TASK_DETAIL:
-                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
-                    return taskDetails.getAdvancedInputDataHandling();
-            }
-            if (dataHandlingResource != null) {
-                return ThriftDataModelConversion.getAdvanceInputDataHandling(dataHandlingResource);
-            }
-        } catch (Exception e) {
-            logger.error("Error while getting input data handling..", e);
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public AdvancedOutputDataHandling getOutputDataHandling(RegistryModelType type, String id) throws RegistryException {
-        try {
-            AdvancedOutputDataHandlingResource dataHandlingResource = null;
-            switch (type) {
-                case EXPERIMENT:
-                    Experiment experiment = experimentDao.getExperiment(id);
-                    return experiment.getUserConfigurationData().getAdvanceOutputDataHandling();
-                case TASK_DETAIL:
-                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
-                    return taskDetails.getAdvancedOutputDataHandling();
-            }
-            if (dataHandlingResource != null) {
-                return ThriftDataModelConversion.getAdvanceOutputDataHandling(dataHandlingResource);
-            }
-        } catch (Exception e) {
-            logger.error("Error while getting output data handling...", e);
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public QualityOfServiceParams getQosParams(RegistryModelType type, String id) throws RegistryException {
-        try {
-            switch (type) {
-                case EXPERIMENT:
-                    Experiment experiment = experimentDao.getExperiment(id);
-                    return experiment.getUserConfigurationData().getQosParams();
-            }
-        } catch (Exception e) {
-            logger.error("Error while getting qos params..", e);
-            throw new RegistryException(e);
-        }
-        return null;
-    }
-
-    public WorkflowNodeDetails getWorkflowNodeDetails(String nodeId) throws RegistryException {
-        try {
-            return experimentDao.getWFNode(nodeId);
-        } catch (Exception e) {
-            logger.error("Error while getting workflow node details...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public WorkflowNodeStatus getWorkflowNodeStatus(String nodeId) throws RegistryException {
-        try {
-            WorkflowNodeDetails wfnd = experimentDao.getWFNode(nodeId);
-            return wfnd.getWorkflowNodeStatus();
-        } catch (Exception e) {
-            logger.error("Error while getting workflow node status..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public List<OutputDataObjectType> getNodeOutputs(String nodeId) throws RegistryException {
-        try {
-            WorkflowNodeDetails wfnd = experimentDao.getWFNode(nodeId);
-            return wfnd.getNodeOutputs();
-        } catch (Exception e) {
-            logger.error("Error while getting node outputs..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public TaskDetails getTaskDetails(String taskId) throws RegistryException {
-        try {
-            return experimentDao.getTaskDetail(taskId);
-        } catch (Exception e) {
-            logger.error("Error while getting task details..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public List<OutputDataObjectType> getApplicationOutputs(String taskId) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
-            return taskDetails.getApplicationOutputs();
-        } catch (Exception e) {
-            logger.error("Error while getting application outputs..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public TaskStatus getTaskStatus(String taskId) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
-            return taskDetails.getTaskStatus();
-        } catch (Exception e) {
-            logger.error("Error while getting experiment outputs..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    // ids contains task id + job id
-    public JobDetails getJobDetails(CompositeIdentifier ids) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
-            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
-                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
-                    return jobDetails;
-                }
-            }
-            return null;
-        } catch (Exception e) {
-            logger.error("Error while getting job details..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    // ids contains task id + job id
-    public JobStatus getJobStatus(CompositeIdentifier ids) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
-            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
-                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
-                    return jobDetails.getJobStatus();
-                }
-            }
-            return null;
-        } catch (Exception e) {
-            logger.error("Error while getting job status..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public ApplicationStatus getApplicationStatus(CompositeIdentifier ids) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
-            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
-                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
-                    return jobDetails.getApplicationStatus();
-                }
-            }
-            return null;
-        } catch (Exception e) {
-            logger.error("Error while getting application status..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public DataTransferDetails getDataTransferDetails(CompositeIdentifier cid) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String)cid.getTopLevelIdentifier());
-            for(DataTransferDetails dtd: taskDetails.getDataTransferDetailsList()){
-                if(dtd.getTransferId().equals(cid.getSecondLevelIdentifier())){
-                    return dtd;
-                }
-            }
-            return null;
-        } catch (Exception e) {
-            logger.error("Error while getting data transfer details..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public TransferStatus getDataTransferStatus(CompositeIdentifier cid) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String)cid.getTopLevelIdentifier());
-            for(DataTransferDetails dtd: taskDetails.getDataTransferDetailsList()){
-                if(dtd.getTransferId().equals(cid.getSecondLevelIdentifier())){
-                    return dtd.getTransferStatus();
-                }
-            }
-            return null;
-        } catch (Exception e) {
-            logger.error("Error while getting data transfer status..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public List<String> getExperimentIds(String fieldName, Object value) throws RegistryException {
-        List<String> expIDs = new ArrayList();
-        try {
-            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)
-                        || fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)
-                        || fieldName.equals(Constants.FieldConstants.ExperimentConstants.PROJECT_ID)) {
-                getExperimentList(fieldName, value).stream().forEach(ex->expIDs.add(ex.getExperimentId()));
-                return expIDs;
-            }
-        } catch (Exception e) {
-            logger.error("Error while retrieving experiment ids..", e);
-            throw new RegistryException(e);
-        }
-        return expIDs;
-    }
-
-    public List<String> getWorkflowNodeIds(String fieldName, Object value) throws RegistryException {
-        List<String> wfIds = new ArrayList();
-        List<WorkflowNodeDetails> wfNodeDetails = getWFNodeDetails(fieldName, value);
-        wfIds.addAll(wfNodeDetails.stream().map(WorkflowNodeDetails::getNodeInstanceId).collect(Collectors.toList()));
-        return wfIds;
-    }
-
-    public List<String> getTaskDetailIds(String fieldName, Object value) throws RegistryException {
-        List<String> taskDetailIds = new ArrayList();
-        List<TaskDetails> taskDetails = getTaskDetails(fieldName, value);
-        taskDetailIds.addAll(taskDetails.stream().map(TaskDetails::getTaskId).collect(Collectors.toList()));
-        return taskDetailIds;
-    }
-
-    public List<String> getJobDetailIds(String fieldName, Object value) throws RegistryException {
-        List<String> jobIds = new ArrayList<String>();
-        List<JobDetails> jobDetails = getJobDetails(fieldName, value);
-        jobIds.addAll(jobDetails.stream().map(JobDetails::getJobId).collect(Collectors.toList()));
-        return jobIds;
-    }
-
-    public List<String> getTransferDetailIds(String fieldName, Object value) throws RegistryException {
-        List<String> transferIds = new ArrayList<String>();
-        List<DataTransferDetails> dataTransferDetails = getDataTransferDetails(fieldName, value);
-        transferIds.addAll(dataTransferDetails.stream().map(DataTransferDetails::getTransferId).collect(Collectors.toList()));
-        return transferIds;
-    }
-
-    public void removeExperiment(String experimentId) throws RegistryException {
-        try {
-            Experiment experiment = new Experiment();
-            experiment.setExperimentId(experimentId);
-            experimentDao.deleteExperiment(experiment);
-        } catch (Exception e) {
-            logger.error("Error while removing experiment..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void removeExperimentConfigData(String experimentId) throws RegistryException {
-        try {
-            Experiment experiment = experimentDao.getExperiment(experimentId);
-            experiment.setUserConfigurationData(null);
-            experimentDao.updateExperiment(experiment);
-        } catch (Exception e) {
-            logger.error("Error while removing experiment config..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void removeWorkflowNode(String nodeId) throws RegistryException {
-        try {
-            WorkflowNodeDetails wfnd = new WorkflowNodeDetails();
-            wfnd.setNodeInstanceId(nodeId);
-            experimentDao.deleteWFNode(wfnd);
-        } catch (Exception e) {
-            logger.error("Error while removing workflow node..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void removeTaskDetails(String taskId) throws RegistryException {
-        try {
-            TaskDetails taskDetails = new TaskDetails();
-            taskDetails.setTaskId(taskId);
-            experimentDao.deleteTaskDetail(taskDetails);
-        } catch (Exception e) {
-            logger.error("Error while removing task details..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void removeJobDetails(CompositeIdentifier ids) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
-            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
-                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
-                    taskDetails.getJobDetailsList().remove(jobDetails);
-                    experimentDao.updateTaskDetail(taskDetails);
-                    return;
-                }
-            }
-        } catch (Exception e) {
-            logger.error("Error while removing job details..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void removeDataTransferDetails(CompositeIdentifier cid) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String)cid.getTopLevelIdentifier());
-            for(DataTransferDetails dtd: taskDetails.getDataTransferDetailsList()){
-                if(dtd.getTransferId().equals(cid.getSecondLevelIdentifier())){
-                    taskDetails.getDataTransferDetailsList().remove(dtd);
-                    experimentDao.updateTaskDetail(taskDetails);
-                }
-            }
-        } catch (Exception e) {
-            logger.error("Error while removing transfer details..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void removeComputationalScheduling(RegistryModelType dataType, String id) throws RegistryException {
-        try {
-            switch (dataType) {
-                case EXPERIMENT:
-                    Experiment experiment = experimentDao.getExperiment(id);
-                    experiment.getUserConfigurationData().setComputationalResourceScheduling(null);
-                    experimentDao.updateExperiment(experiment);
-                    return;
-                case TASK_DETAIL:
-                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
-                    taskDetails.setTaskScheduling(null);
-                    experimentDao.updateTaskDetail(taskDetails);
-                    break;
-                default:
-                    logger.error("Unsupported data type...");
-            }
-        } catch (Exception e) {
-            logger.error("Error while removing scheduling data..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void removeInputDataHandling(RegistryModelType dataType, String id) throws RegistryException {
-        try {
-            switch (dataType) {
-                case EXPERIMENT:
-                    Experiment experiment = experimentDao.getExperiment(id);
-                    experiment.getUserConfigurationData().setAdvanceInputDataHandling(null);
-                    experimentDao.updateExperiment(experiment);
-                    break;
-                case TASK_DETAIL:
-                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
-                    taskDetails.setAdvancedInputDataHandling(null);
-                    experimentDao.updateTaskDetail(taskDetails);
-                    break;
-                default:
-                    logger.error("Unsupported data type...");
-            }
-        } catch (Exception e) {
-            logger.error("Error while removing input data handling..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void removeOutputDataHandling(RegistryModelType dataType, String id) throws RegistryException {
-        try {
-            switch (dataType) {
-                case EXPERIMENT:
-                    Experiment experiment = experimentDao.getExperiment(id);
-                    experiment.getUserConfigurationData().setAdvanceOutputDataHandling(null);
-                    experimentDao.updateExperiment(experiment);
-                    break;
-                case TASK_DETAIL:
-                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
-                    taskDetails.setAdvancedOutputDataHandling(null);
-                    experimentDao.updateTaskDetail(taskDetails);
-                    break;
-                default:
-                    logger.error("Unsupported data type...");
-            }
-        } catch (Exception e) {
-            logger.error("Error while removing output data handling..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void removeQOSParams(RegistryModelType dataType, String id) throws RegistryException {
-        try {
-            switch (dataType) {
-                case EXPERIMENT:
-                    Experiment experiment = experimentDao.getExperiment(id);
-                    experiment.getUserConfigurationData().setQosParams(null);
-                    experimentDao.updateExperiment(experiment);
-                    break;
-                default:
-                    logger.error("Unsupported data type...");
-            }
-        } catch (Exception e) {
-            logger.error("Error while removing QOS params", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public boolean isExperimentExist(String expID) throws RegistryException {
-        try {
-            return experimentDao.getExperiment(expID) != null;
-        } catch (Exception e) {
-            logger.error("Error while retrieving experiment...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public boolean isExperimentConfigDataExist(String expID) throws RegistryException {
-        try {
-            return experimentDao.getExperiment(expID).getUserConfigurationData() != null;
-        } catch (Exception e) {
-            logger.error("Error while retrieving experiment...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public boolean isWFNodeExist(String nodeId) throws RegistryException {
-        try {
-            return experimentDao.getWFNode(nodeId) != null;
-        } catch (Exception e) {
-            logger.error("Error while retrieving workflow...", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public boolean isTaskDetailExist(String taskId) throws RegistryException {
-        try {
-            return experimentDao.getTaskDetail(taskId) != null;
-        } catch (Exception e) {
-            logger.error("Error while retrieving task.....", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public boolean isJobDetailExist(CompositeIdentifier ids) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
-            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
-                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
-                    return true;
-                }
-            }
-            return false;
-        } catch (Exception e) {
-            logger.error("Error while retrieving job details.....", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public boolean isTransferDetailExist(CompositeIdentifier cid) throws RegistryException {
-        try {
-            TaskDetails taskDetails = experimentDao.getTaskDetail((String) cid.getTopLevelIdentifier());
-            for (DataTransferDetails dtd : taskDetails.getDataTransferDetailsList()) {
-                if (dtd.getTransferId().equals(cid.getSecondLevelIdentifier())) {
-                    return true;
-                }
-            }
-            return false;
-        } catch (Exception e) {
-            logger.error("Error while retrieving transfer details.....", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public boolean isComputationalSchedulingExist(RegistryModelType dataType, String id) throws RegistryException {
-        try {
-            Experiment experiment;
-            switch (dataType) {
-                case EXPERIMENT:
-                    experiment = experimentDao.getExperiment(id);
-                    return experiment.getUserConfigurationData().getComputationalResourceScheduling() != null;
-                case TASK_DETAIL:
-                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
-                    return taskDetails.getTaskScheduling() != null;
-                default:
-                    logger.error("Unsupported data type...");
-            }
-        } catch (Exception e) {
-            logger.error("Error while retrieving scheduling data.....", e);
-            throw new RegistryException(e);
-        }
-        return false;
-    }
-
-    public boolean isInputDataHandlingExist(RegistryModelType dataType, String id) throws RegistryException {
-        try {
-            Experiment experiment;
-            switch (dataType) {
-                case EXPERIMENT:
-                    experiment = experimentDao.getExperiment(id);
-                    return experiment.getUserConfigurationData().getAdvanceInputDataHandling() != null;
-                case TASK_DETAIL:
-                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
-                    return taskDetails.getAdvancedInputDataHandling() != null;
-                default:
-                    logger.error("Unsupported data type...");
-            }
-        } catch (Exception e) {
-            logger.error("Error while retrieving input data handling.....", e);
-            throw new RegistryException(e);
-        }
-        return false;
-    }
-
-    public boolean isOutputDataHandlingExist(RegistryModelType dataType, String id) throws RegistryException {
-        try {
-            Experiment experiment;
-            switch (dataType) {
-                case EXPERIMENT:
-                    experiment = experimentDao.getExperiment(id);
-                    return experiment.getUserConfigurationData().getAdvanceOutputDataHandling() != null;
-                case TASK_DETAIL:
-                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
-                    return taskDetails.getAdvancedOutputDataHandling() != null;
-                default:
-                    logger.error("Unsupported data type...");
-            }
-        } catch (Exception e) {
-            logger.error("Error while retrieving output data handling..", e);
-            throw new RegistryException(e);
-        }
-        return false;
-    }
-
-    public boolean isQOSParamsExist(RegistryModelType dataType, String id) throws RegistryException {
-        try {
-            Experiment experiment;
-            switch (dataType) {
-                case EXPERIMENT:
-                    experiment = experimentDao.getExperiment(id);
-                    return experiment.getUserConfigurationData().getQosParams() != null;
-                default:
-                    logger.error("Unsupported data type...");
-            }
-        } catch (Exception e) {
-            logger.error("Error while retrieving qos params..", e);
-            throw new RegistryException(e);
-        }
-        return false;
-    }
-
-    public void updateScheduling(ComputationalResourceScheduling scheduling, String id, String type) throws RegistryException {
-        try {
-            if (type.equals(RegistryModelType.EXPERIMENT.toString())) {
-                Experiment experiment = experimentDao.getExperiment(id);
-                experiment.getUserConfigurationData().setComputationalResourceScheduling(scheduling);
-                experimentDao.updateExperiment(experiment);
-                return;
-            } else if (type.equals(RegistryModelType.TASK_DETAIL.toString())) {
-                TaskDetails taskDetails = experimentDao.getTaskDetail(id);
-                taskDetails.setTaskScheduling(scheduling);
-                experimentDao.updateTaskDetail(taskDetails);
-                return;
-            }
-        } catch (Exception e) {
-            logger.error("Error while updating scheduling..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void updateInputDataHandling(AdvancedInputDataHandling dataHandling, String id, String type) throws RegistryException {
-        try {
-            if (type.equals(RegistryModelType.EXPERIMENT.toString())) {
-                Experiment experiment = experimentDao.getExperiment(id);
-                experiment.getUserConfigurationData().setAdvanceInputDataHandling(dataHandling);
-                experimentDao.updateExperiment(experiment);
-                return;
-            } else if (type.equals(RegistryModelType.TASK_DETAIL.toString())) {
-                TaskDetails taskDetails = experimentDao.getTaskDetail(id);
-                taskDetails.setAdvancedInputDataHandling(dataHandling);
-                experimentDao.updateTaskDetail(taskDetails);
-                return;
-            }
-        } catch (Exception e) {
-            logger.error("Error while updating input data handling..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void updateOutputDataHandling(AdvancedOutputDataHandling dataHandling, String id, String type) throws RegistryException {
-        try {
-            if (type.equals(RegistryModelType.EXPERIMENT.toString())) {
-                Experiment experiment = experimentDao.getExperiment(id);
-                experiment.getUserConfigurationData().setAdvanceOutputDataHandling(dataHandling);
-                experimentDao.updateExperiment(experiment);
-                return;
-            } else if (type.equals(RegistryModelType.TASK_DETAIL.toString())) {
-                TaskDetails taskDetails = experimentDao.getTaskDetail(id);
-                taskDetails.setAdvancedOutputDataHandling(dataHandling);
-                experimentDao.updateTaskDetail(taskDetails);
-                return;
-            }
-        } catch (Exception e) {
-            logger.error("Error while updating output data handling", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void updateQOSParams(QualityOfServiceParams params, String id, String type) throws RegistryException {
-        try {
-            if (type.equals(RegistryModelType.EXPERIMENT.toString())) {
-                Experiment experiment = experimentDao.getExperiment(id);
-                experiment.getUserConfigurationData().setQosParams(params);
-                experimentDao.updateExperiment(experiment);
-            } else {
-                logger.error("Unsupported data type... " + type);
-            }
-        } catch (Exception e) {
-            logger.error("Error while updating QOS data..", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    /**
-     * To search the experiments of user with the given filter criteria and retrieve the results with
-     * pagination support. Results can be ordered based on an identifier (i.e column) either ASC or
-     * DESC.
-     *
-     * @param filters
-     * @param limit
-     * @param offset
-     * @param orderByIdentifier
-     * @param resultOrderType
-     * @return
-     * @throws RegistryException
-     */
-    public List<ExperimentSummary> searchExperiments(Map<String, String> filters, int limit,
-            int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
-        List<Experiment> experimentList = experimentDao.searchExperiments(
-                filters, limit, offset, orderByIdentifier, resultOrderType);
-        List<ExperimentSummary> experimentSummaries = new ArrayList();
-        experimentList.stream().forEach(experiment->{
-            ExperimentSummary expSummary = new ExperimentSummary();
-            expSummary.setExperimentId(experiment.getExperimentId());
-            expSummary.setProjectId(experiment.getProjectId());
-            expSummary.setName(experiment.getName());
-            expSummary.setDescription(experiment.getDescription());
-            expSummary.setUserName(experiment.getUserName());
-            expSummary.setCreationTime(experiment.getCreationTime());
-            expSummary.setApplicationId(experiment.getApplicationId());
-            expSummary.setExperimentStatus(experiment.getExperimentStatus());
-            expSummary.setErrors(experiment.getErrors());
-            experimentSummaries.add(expSummary);
-        });
-        return experimentSummaries;
-    }
-
-    private boolean isValidStatusTransition(ExperimentState oldState, ExperimentState nextState) {
-        if (nextState == null) {
-            return false;
-        }
-        switch (oldState) {
-            case CREATED:
-                return true;
-            case VALIDATED:
-                return nextState != ExperimentState.CREATED;
-            case SCHEDULED:
-                return nextState != ExperimentState.CREATED
-                        || nextState != ExperimentState.VALIDATED;
-            case LAUNCHED:
-                return nextState != ExperimentState.CREATED
-                        || nextState != ExperimentState.VALIDATED
-                        || nextState != ExperimentState.SCHEDULED;
-            case EXECUTING:
-                return nextState != ExperimentState.CREATED
-                        || nextState != ExperimentState.VALIDATED
-                        || nextState != ExperimentState.SCHEDULED
-                        || nextState != ExperimentState.LAUNCHED;
-
-            case CANCELING:
-                return nextState == ExperimentState.CANCELING
-                        || nextState == ExperimentState.CANCELED
-                        || nextState == ExperimentState.COMPLETED
-                        || nextState == ExperimentState.FAILED;
-            case CANCELED:
-                return nextState == ExperimentState.CANCELED;
-            case COMPLETED:
-                return nextState == ExperimentState.COMPLETED;
-            case FAILED:
-                return nextState == ExperimentState.FAILED;
-            //case SUSPENDED:  // We don't change state to SUSPEND
-            case UNKNOWN:
-                return true;
-            default:
-                return false;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/GatewayRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/GatewayRegistry.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/GatewayRegistry.java
deleted file mode 100644
index d38b5df..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/GatewayRegistry.java
+++ /dev/null
@@ -1,115 +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.persistance.registry.jpa.impl;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.model.workspace.Gateway;
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
-import org.apache.airavata.persistance.registry.jpa.utils.ThriftDataModelConversion;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class GatewayRegistry {
-
-    private final static Logger logger = LoggerFactory.getLogger(GatewayRegistry.class);
-    public GatewayResource getDefaultGateway () throws ApplicationSettingsException, RegistryException {
-        return (GatewayResource)ResourceUtils.getGateway(ServerSettings.getDefaultUserGateway());
-    }
-
-    public GatewayResource getExistingGateway (String gatewayName) throws RegistryException {
-        return (GatewayResource)ResourceUtils.getGateway(gatewayName);
-    }
-
-    public String addGateway (Gateway gateway) throws RegistryException{
-        try {
-            GatewayResource resource = (GatewayResource)ResourceUtils.createGateway(gateway.getGatewayId());
-            resource.setGatewayName(gateway.getGatewayName());
-            resource.setEmailAddress(gateway.getEmailAddress());
-            resource.setDomain(gateway.getDomain());
-            resource.save();
-            return gateway.getGatewayId();
-        }catch (RegistryException e){
-            logger.error("Error while saving gateway to registry", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public void updateGateway (String gatewayId, Gateway updatedGateway) throws RegistryException{
-        try {
-            GatewayResource existingGateway = (GatewayResource)ResourceUtils.getGateway(gatewayId);
-            existingGateway.setGatewayName(updatedGateway.getGatewayName());
-            existingGateway.setEmailAddress(updatedGateway.getEmailAddress());
-            existingGateway.setDomain(updatedGateway.getDomain());
-            existingGateway.save();
-        }catch (RegistryException e){
-            logger.error("Error while updating gateway to registry", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public Gateway getGateway (String gatewayId) throws RegistryException{
-        try {
-            GatewayResource resource = (GatewayResource)ResourceUtils.getGateway(gatewayId);
-            return ThriftDataModelConversion.getGateway(resource);
-        }catch (RegistryException e){
-            logger.error("Error while getting gateway", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public boolean isGatewayExist (String gatewayId) throws RegistryException{
-        try {
-            return ResourceUtils.isGatewayExist(gatewayId);
-        }catch (RegistryException e){
-            logger.error("Error while checking gateway exists", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public boolean removeGateway (String gatewayId) throws RegistryException{
-        try {
-            return ResourceUtils.removeGateway(gatewayId);
-        }catch (Exception e){
-            logger.error("Error while removing the gateway", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    public List<Gateway> getAllGateways () throws RegistryException {
-        List<Gateway> gatewayList = new ArrayList<Gateway>();
-        try {
-            List<Resource> allGateways = ResourceUtils.getAllGateways();
-            return ThriftDataModelConversion.getAllGateways(allGateways);
-        }catch (Exception e){
-            logger.error("Error while getting all the gateways", e);
-            throw new RegistryException(e);
-        }
-    }
-
-}


[13/44] airavata git commit: Adding mongo-registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
new file mode 100644
index 0000000..6e6d2ee
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
@@ -0,0 +1,361 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.utils.StatusType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+
+public class JobDetailResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(JobDetailResource.class);
+    private String jobId;
+    private TaskDetailResource taskDetailResource;
+    private String jobDescription;
+    private Timestamp creationTime;
+    private String computeResourceConsumed;
+    private String jobName;
+    private String workingDir;
+
+    public String getJobName() {
+        return jobName;
+    }
+
+    public void setJobName(String jobName) {
+        this.jobName = jobName;
+    }
+
+    public String getWorkingDir() {
+        return workingDir;
+    }
+
+    public void setWorkingDir(String workingDir) {
+        this.workingDir = workingDir;
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+
+    public TaskDetailResource getTaskDetailResource() {
+        return taskDetailResource;
+    }
+
+    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
+        this.taskDetailResource = taskDetailResource;
+    }
+
+    public String getJobDescription() {
+        return jobDescription;
+    }
+
+    public void setJobDescription(String jobDescription) {
+        this.jobDescription = jobDescription;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public String getComputeResourceConsumed() {
+        return computeResourceConsumed;
+    }
+
+    public void setComputeResourceConsumed(String computeResourceConsumed) {
+        this.computeResourceConsumed = computeResourceConsumed;
+    }
+
+    
+    public Resource create(ResourceType type) throws RegistryException {
+        switch (type){
+            case STATUS:
+                StatusResource statusResource = new StatusResource();
+                statusResource.setJobId(jobId);
+                return statusResource;
+            case ERROR_DETAIL:
+                ErrorDetailResource errorDetailResource = new ErrorDetailResource();
+                errorDetailResource.setJobId(jobId);
+                return errorDetailResource;
+            default:
+                logger.error("Unsupported resource type for job details data resource.", new UnsupportedOperationException());
+                throw new UnsupportedOperationException();
+        }
+    }
+
+    
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+            QueryGenerator generator;
+            switch (type) {
+                case STATUS:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(StatusConstants.JOB_ID, name);
+                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.JOB.toString());
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case ERROR_DETAIL:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(ErrorDetailConstants.JOB_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                default:
+                    logger.error("Unsupported resource type for job details resource.", new IllegalArgumentException());
+                    break;
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    
+    public Resource get(ResourceType type, Object name) throws RegistryException {
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            QueryGenerator generator;
+            Query q;
+            switch (type) {
+                case STATUS:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(StatusConstants.JOB_ID, name);
+                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.JOB.toString());
+                    q = generator.selectQuery(em);
+                    Status status = (Status) q.getSingleResult();
+                    StatusResource statusResource = (StatusResource) Utils.getResource(ResourceType.STATUS, status);
+                    em.getTransaction().commit();
+                    em.close();
+                    return statusResource;
+                case ERROR_DETAIL:
+                    generator = new QueryGenerator(ERROR_DETAIL);
+                    generator.setParameter(ErrorDetailConstants.JOB_ID, name);
+                    q = generator.selectQuery(em);
+                    ErrorDetail errorDetail = (ErrorDetail) q.getSingleResult();
+                    ErrorDetailResource errorDetailResource = (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
+                    em.getTransaction().commit();
+                    em.close();
+                    return errorDetailResource;
+                default:
+                    em.getTransaction().commit();
+                    em.close();
+                    logger.error("Unsupported resource type for job details resource.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Unsupported resource type for job details resource.");
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        List<Resource> resourceList = new ArrayList<Resource>();
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+            QueryGenerator generator;
+            List results;
+            switch (type) {
+                case STATUS:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(StatusConstants.JOB_ID, jobId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            Status status = (Status) result;
+                            StatusResource statusResource =
+                                    (StatusResource) Utils.getResource(ResourceType.STATUS, status);
+                            resourceList.add(statusResource);
+                        }
+                    }
+                    break;
+                case ERROR_DETAIL:
+                    generator = new QueryGenerator(ERROR_DETAIL);
+                    generator.setParameter(ErrorDetailConstants.JOB_ID, jobId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            ErrorDetail errorDetail = (ErrorDetail) result;
+                            ErrorDetailResource errorDetailResource =
+                                    (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
+                            resourceList.add(errorDetailResource);
+                        }
+                    }
+                    break;
+                default:
+                    em.getTransaction().commit();
+                    em.close();
+                    logger.error("Unsupported resource type for workflow node details resource.", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return resourceList;
+    }
+
+    
+    public void save()  throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            JobDetail existingJobDetail = em.find(JobDetail.class, new JobDetails_PK(jobId, taskDetailResource.getTaskId()));
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            JobDetail jobDetail = new JobDetail();
+            TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
+            jobDetail.setJobId(jobId);
+            jobDetail.setTask(taskDetail);
+            jobDetail.setTaskId(taskDetailResource.getTaskId());
+            jobDetail.setCreationTime(creationTime);
+            jobDetail.setJobName(jobName);
+            jobDetail.setWorkingDir(workingDir);
+            if (jobDescription != null) {
+                jobDetail.setJobDescription(jobDescription.toCharArray());
+            }
+            jobDetail.setComputeResourceConsumed(computeResourceConsumed);
+            if (existingJobDetail != null) {
+                existingJobDetail.setJobId(jobId);
+                existingJobDetail.setTask(taskDetail);
+                existingJobDetail.setTaskId(taskDetailResource.getTaskId());
+                existingJobDetail.setCreationTime(creationTime);
+                if (jobDescription != null) {
+                    existingJobDetail.setJobDescription(jobDescription.toCharArray());
+                }
+                existingJobDetail.setComputeResourceConsumed(computeResourceConsumed);
+                existingJobDetail.setJobName(jobName);
+                existingJobDetail.setWorkingDir(workingDir);
+                jobDetail = em.merge(existingJobDetail);
+            } else {
+                em.persist(jobDetail);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    public StatusResource getJobStatus() throws RegistryException{
+        List<Resource> resources = get(ResourceType.STATUS);
+        for (Resource resource : resources) {
+            StatusResource jobStatus = (StatusResource) resource;
+            if(jobStatus.getStatusType().equals(StatusType.JOB.toString())){
+                if (jobStatus.getState() == null || jobStatus.getState().equals("") ){
+                    jobStatus.setState("UNKNOWN");
+                }
+                return jobStatus;
+            }
+        }
+        return null;
+    }
+
+    public StatusResource getApplicationStatus() throws RegistryException{
+        List<Resource> resources = get(ResourceType.STATUS);
+        for (Resource resource : resources) {
+            StatusResource appStatus = (StatusResource) resource;
+            if(appStatus.getStatusType().equals(StatusType.APPLICATION.toString())){
+                if (appStatus.getState() == null || appStatus.getState().equals("") ){
+                    appStatus.setState("UNKNOWN");
+                }
+                return appStatus;
+            }
+        }
+        return null;
+    }
+
+    public List<ErrorDetailResource> getErrorDetails () throws RegistryException{
+        List<ErrorDetailResource> errorDetailResources = new ArrayList<ErrorDetailResource>();
+        List<Resource> resources = get(ResourceType.ERROR_DETAIL);
+        for(Resource resource : resources){
+            errorDetailResources.add((ErrorDetailResource)resource);
+        }
+        return errorDetailResources;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeInputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeInputResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeInputResource.java
new file mode 100644
index 0000000..4efb8a4
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeInputResource.java
@@ -0,0 +1,231 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import java.util.List;
+
+import javax.persistence.EntityManager;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.NodeInput;
+import org.apache.airavata.persistance.registry.jpa.model.NodeInput_PK;
+import org.apache.airavata.persistance.registry.jpa.model.WorkflowNodeDetail;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NodeInputResource extends AbstractResource {
+	private static final Logger logger = LoggerFactory.getLogger(NodeInputResource.class);
+
+    private WorkflowNodeDetailResource nodeDetailResource;
+    private String inputKey;
+    private String dataType;
+    private String metadata;
+    private String value;
+    private String appArgument;
+    private boolean standardInput;
+    private String userFriendlyDesc;
+    private int inputOrder;
+    private boolean isRequired;
+    private boolean requiredToCMD;
+    private boolean dataStaged;
+
+    public boolean getRequired() {
+        return isRequired;
+    }
+
+    public void setRequired(boolean required) {
+        this.isRequired = required;
+    }
+
+    public boolean getRequiredToCMD() {
+        return requiredToCMD;
+    }
+
+    public void setRequiredToCMD(boolean requiredToCMD) {
+        this.requiredToCMD = requiredToCMD;
+    }
+
+    public boolean isDataStaged() {
+        return dataStaged;
+    }
+
+    public void setDataStaged(boolean dataStaged) {
+        this.dataStaged = dataStaged;
+    }
+
+    public String getAppArgument() {
+        return appArgument;
+    }
+
+    public void setAppArgument(String appArgument) {
+        this.appArgument = appArgument;
+    }
+
+    public boolean isStandardInput() {
+        return standardInput;
+    }
+
+    public void setStandardInput(boolean standardInput) {
+        this.standardInput = standardInput;
+    }
+
+    public String getUserFriendlyDesc() {
+        return userFriendlyDesc;
+    }
+
+    public void setUserFriendlyDesc(String userFriendlyDesc) {
+        this.userFriendlyDesc = userFriendlyDesc;
+    }
+
+    public WorkflowNodeDetailResource getNodeDetailResource() {
+        return nodeDetailResource;
+    }
+
+    public void setNodeDetailResource(WorkflowNodeDetailResource nodeDetailResource) {
+        this.nodeDetailResource = nodeDetailResource;
+    }
+
+    public String getInputKey() {
+        return inputKey;
+    }
+
+    public void setInputKey(String inputKey) {
+        this.inputKey = inputKey;
+    }
+
+    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 getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public int getInputOrder() {
+        return inputOrder;
+    }
+
+    public void setInputOrder(int inputOrder) {
+        this.inputOrder = inputOrder;
+    }
+
+    public Resource create(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for node input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for node input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Resource get(ResourceType type, Object name) throws RegistryException {
+        logger.error("Unsupported resource type for node input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Resource> get(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for node input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            NodeInput existingInput = em.find(NodeInput.class, new NodeInput_PK(inputKey, nodeDetailResource.getNodeInstanceId()));
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            NodeInput nodeInput = new NodeInput();
+            WorkflowNodeDetail nodeDetail = em.find(WorkflowNodeDetail.class, nodeDetailResource.getNodeInstanceId());
+            nodeInput.setNodeDetails(nodeDetail);
+            nodeInput.setNodeId(nodeDetail.getNodeId());
+            nodeInput.setInputKey(inputKey);
+            nodeInput.setDataType(dataType);
+            nodeInput.setValue(value);
+            nodeInput.setMetadata(metadata);
+            nodeInput.setAppArgument(appArgument);
+            nodeInput.setStandardInput(standardInput);
+            nodeInput.setUserFriendlyDesc(userFriendlyDesc);
+            nodeInput.setInputOrder(inputOrder);
+            nodeInput.setRequiredToCMD(requiredToCMD);
+            nodeInput.setIsRequired(isRequired);
+            nodeInput.setDataStaged(dataStaged);
+
+            if (existingInput != null){
+                existingInput.setNodeDetails(nodeDetail);
+                existingInput.setNodeId(nodeDetail.getNodeId());
+                existingInput.setInputKey(inputKey);
+                existingInput.setDataType(dataType);
+                existingInput.setValue(value);
+                existingInput.setMetadata(metadata);
+                existingInput.setAppArgument(appArgument);
+                existingInput.setStandardInput(standardInput);
+                existingInput.setUserFriendlyDesc(userFriendlyDesc);
+                existingInput.setInputOrder(inputOrder);
+                existingInput.setRequiredToCMD(requiredToCMD);
+                existingInput.setIsRequired(isRequired);
+                existingInput.setDataStaged(dataStaged);
+                nodeInput = em.merge(existingInput);
+            }else {
+                em.persist(nodeInput);
+            }
+            em.getTransaction().commit();
+            em.close();
+        }catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java
new file mode 100644
index 0000000..ceb323b
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java
@@ -0,0 +1,211 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.persistance.registry.jpa.resources;
+
+import java.util.List;
+
+import javax.persistence.EntityManager;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.NodeOutput;
+import org.apache.airavata.persistance.registry.jpa.model.NodeOutput_PK;
+import org.apache.airavata.persistance.registry.jpa.model.WorkflowNodeDetail;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NodeOutputResource extends AbstractResource {
+	private static final Logger logger = LoggerFactory.getLogger(NodeOutputResource.class);
+	
+    private WorkflowNodeDetailResource nodeDetailResource;
+    private String outputKey;
+    private String dataType;
+    private String value;
+    private boolean isRequired;
+    private boolean dataMovement;
+    private String dataNameLocation;
+    private boolean requiredToCMD;
+    private String searchQuery;
+    private String appArgument;
+
+    public String getSearchQuery() {
+        return searchQuery;
+    }
+
+    public void setSearchQuery(String searchQuery) {
+        this.searchQuery = searchQuery;
+    }
+
+    public String getAppArgument() {
+        return appArgument;
+    }
+
+    public void setAppArgument(String appArgument) {
+        this.appArgument = appArgument;
+    }
+
+
+    public boolean getRequiredToCMD() {
+        return requiredToCMD;
+    }
+
+    public void setRequiredToCMD(boolean requiredToCMD) {
+        this.requiredToCMD = requiredToCMD;
+    }
+
+    public boolean getRequired() {
+        return isRequired;
+    }
+
+    public void setRequired(boolean required) {
+        this.isRequired = required;
+    }
+
+    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 WorkflowNodeDetailResource getNodeDetailResource() {
+        return nodeDetailResource;
+    }
+
+    public void setNodeDetailResource(WorkflowNodeDetailResource nodeDetailResource) {
+        this.nodeDetailResource = nodeDetailResource;
+    }
+
+    public String getOutputKey() {
+        return outputKey;
+    }
+
+    public void setOutputKey(String outputKey) {
+        this.outputKey = outputKey;
+    }
+
+    public String getDataType() {
+        return dataType;
+    }
+
+    public void setDataType(String dataType) {
+        this.dataType = dataType;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    
+    public Resource create(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for node output data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for node output data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Resource get(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for node output data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        logger.error("Unsupported resource type for node output data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            NodeOutput existingOutput = em.find(NodeOutput.class, new NodeOutput_PK(outputKey, nodeDetailResource.getNodeInstanceId()));
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            NodeOutput nodeOutput = new NodeOutput();
+            WorkflowNodeDetail nodeDetail = em.find(WorkflowNodeDetail.class, nodeDetailResource.getNodeInstanceId());
+            nodeOutput.setNode(nodeDetail);
+            nodeOutput.setNodeId(nodeDetail.getNodeId());
+            nodeOutput.setOutputKey(outputKey);
+            nodeOutput.setDataType(dataType);
+            nodeOutput.setValue(value);
+            nodeOutput.setRequired(isRequired);
+            nodeOutput.setRequiredToCMD(requiredToCMD);
+            nodeOutput.setDataMovement(dataMovement);
+            nodeOutput.setDataNameLocation(dataNameLocation);
+            nodeOutput.setApplicationArgument(appArgument);
+            nodeOutput.setSearchQuery(searchQuery);
+
+            if (existingOutput != null) {
+                existingOutput.setNode(nodeDetail);
+                existingOutput.setNodeId(nodeDetail.getNodeId());
+                existingOutput.setOutputKey(outputKey);
+                existingOutput.setDataType(dataType);
+                existingOutput.setValue(value);
+                existingOutput.setRequired(isRequired);
+                existingOutput.setRequiredToCMD(requiredToCMD);
+                existingOutput.setDataMovement(dataMovement);
+                existingOutput.setDataNameLocation(dataNameLocation);
+                existingOutput.setApplicationArgument(appArgument);
+                existingOutput.setSearchQuery(searchQuery);
+                nodeOutput = em.merge(existingOutput);
+            } else {
+                em.persist(nodeOutput);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NotificationEmailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NotificationEmailResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NotificationEmailResource.java
new file mode 100644
index 0000000..5ac864f
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NotificationEmailResource.java
@@ -0,0 +1,125 @@
+/*
+*
+* 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import java.util.List;
+
+public class NotificationEmailResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(NotificationEmailResource.class);
+
+    private int emailId = 0;
+    private ExperimentResource experimentResource;
+    private TaskDetailResource taskDetailResource;
+    private String emailAddress;
+
+
+    public String getEmailAddress() {
+        return emailAddress;
+    }
+
+    public void setEmailAddress(String emailAddress) {
+        this.emailAddress = emailAddress;
+    }
+
+    public ExperimentResource getExperimentResource() {
+        return experimentResource;
+    }
+
+    public void setExperimentResource(ExperimentResource experimentResource) {
+        this.experimentResource = experimentResource;
+    }
+
+    public TaskDetailResource getTaskDetailResource() {
+        return taskDetailResource;
+    }
+
+    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
+        this.taskDetailResource = taskDetailResource;
+    }
+
+    public Resource create(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    public Resource get(ResourceType type, Object name) throws RegistryException {
+        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    public List<Resource> get(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Notification_Email notification_email;
+            if (emailId != 0 ){
+                notification_email  = em.find(Notification_Email.class, emailId);
+                notification_email.setEmailId(emailId);
+            }else {
+                notification_email = new Notification_Email();
+            }
+            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
+            notification_email.setExperiment(experiment);
+            notification_email.setExperiment_id(experiment.getExpId());
+            if (taskDetailResource != null){
+                TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
+                notification_email.setTaskDetail(taskDetail);
+                notification_email.setTaskId(taskDetail.getTaskId());
+            }
+            notification_email.setEmailAddress(emailAddress);
+            em.persist(notification_email);
+            emailId = notification_email.getEmailId();
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java
new file mode 100644
index 0000000..9432067
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java
@@ -0,0 +1,531 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.ResultOrderType;
+import org.apache.airavata.registry.cpi.utils.Constants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ProjectResource extends AbstractResource {
+    private final static Logger logger = LoggerFactory.getLogger(ProjectResource.class);
+    private String name;
+    private String id;
+    private GatewayResource gateway;
+    private WorkerResource worker;
+    private String description;
+    private Timestamp creationTime;
+
+    /**
+     *
+     */
+    public ProjectResource() {
+    }
+
+    /**
+     *
+     * @param worker gateway worker
+     * @param gateway gateway
+     * @param projectId project name
+     */
+    public ProjectResource(WorkerResource worker, GatewayResource gateway, String projectId) {
+        this.setWorker(worker);
+        this.setGateway(gateway);
+        this.id = projectId;
+    }
+
+    /**
+     *
+     * @param type child resource type
+     * @return child resource
+     */
+    public Resource create(ResourceType type) throws RegistryException {
+        if (type == ResourceType.EXPERIMENT) {
+            ExperimentResource experimentResource = new ExperimentResource();
+            experimentResource.setGateway(getGateway());
+            experimentResource.setExecutionUser(worker.getUser());
+            experimentResource.setProject(this);
+            return experimentResource;
+        } else if (type == ResourceType.PROJECT_USER){
+            ProjectUserResource pr = new ProjectUserResource();
+            pr.setProjectId(id);
+            pr.setUserName(worker.getUser());
+            return pr;
+        }
+        else {
+            logger.error("Unsupported resource type for project resource.", new IllegalArgumentException());
+            throw new IllegalArgumentException("Unsupported resource type for project resource.");
+        }
+    }
+
+    /**
+     *
+     * @param type child resource type
+     * @param name child resource name
+     */
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            if (type == ResourceType.EXPERIMENT) {
+                QueryGenerator generator = new QueryGenerator(EXPERIMENT);
+                generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
+                Query q = generator.deleteQuery(em);
+                q.executeUpdate();
+            } else if (type == ResourceType.PROJECT_USER) {
+                QueryGenerator generator = new QueryGenerator(PROJECT_USER);
+                generator.setParameter(ProjectUserConstants.USERNAME, name);
+                generator.setParameter(ProjectUserConstants.PROJECT_ID, this.id);
+                Query q = generator.deleteQuery(em);
+                q.executeUpdate();
+            } else {
+                logger.error("Unsupported resource type for project resource.", new IllegalArgumentException());
+                throw new IllegalArgumentException("Unsupported resource type for project resource.");
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    /**
+     *
+     * @param type child resource type
+     * @param name child resource name
+     * @return child resource
+     */
+    public Resource get(ResourceType type, Object name) throws RegistryException {
+        EntityManager em = null;
+        try {
+            if (type == ResourceType.EXPERIMENT) {
+                em = ResourceUtils.getEntityManager();
+                em.getTransaction().begin();
+                QueryGenerator generator = new QueryGenerator(EXPERIMENT);
+                generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
+                Query q = generator.selectQuery(em);
+                Experiment experiment = (Experiment) q.getSingleResult();
+                ExperimentResource experimentResource = (ExperimentResource)
+                        Utils.getResource(ResourceType.EXPERIMENT, experiment);
+                em.getTransaction().commit();
+                em.close();
+                return experimentResource;
+            } else if (type == ResourceType.PROJECT_USER) {
+                em = ResourceUtils.getEntityManager();
+                em.getTransaction().begin();
+                QueryGenerator generator = new QueryGenerator(PROJECT_USER);
+                generator.setParameter(ProjectUserConstants.USERNAME, name);
+                generator.setParameter(ProjectUserConstants.PROJECT_ID, this.id);
+                Query q = generator.selectQuery(em);
+                ProjectUser prUser = (ProjectUser) q.getSingleResult();
+                ExperimentResource experimentResource = (ExperimentResource)
+                        Utils.getResource(ResourceType.PROJECT_USER, prUser);
+                em.getTransaction().commit();
+                em.close();
+                return experimentResource;
+            } else {
+                logger.error("Unsupported resource type for project resource.", new IllegalArgumentException());
+                throw new IllegalArgumentException("Unsupported resource type for project resource.");
+            }
+        } catch (Exception e) {
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    /**
+     *
+     * @param type child resource type
+     * @return list of child resources
+     */
+    @Override
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        List<Resource> resourceList = new ArrayList<Resource>();
+        EntityManager em = null;
+        try {
+            if (type == ResourceType.EXPERIMENT) {
+                em = ResourceUtils.getEntityManager();
+                em.getTransaction().begin();
+                QueryGenerator generator = new QueryGenerator(EXPERIMENT);
+                generator.setParameter(ExperimentConstants.PROJECT_ID, id);
+                Query q = generator.selectQuery(em);
+                List<?> results = q.getResultList();
+                if (results.size() != 0) {
+                    for (Object result : results) {
+                        Experiment experiment = (Experiment) result;
+                        ExperimentResource experimentResource = (ExperimentResource)
+                                Utils.getResource(ResourceType.EXPERIMENT, experiment);
+                        resourceList.add(experimentResource);
+                    }
+                }
+                em.getTransaction().commit();
+                em.close();
+            } else if (type == ResourceType.PROJECT_USER) {
+                em = ResourceUtils.getEntityManager();
+                em.getTransaction().begin();
+                QueryGenerator generator = new QueryGenerator(PROJECT_USER);
+                generator.setParameter(ProjectUserConstants.PROJECT_ID, id);
+                Query q = generator.selectQuery(em);
+                List<?> results = q.getResultList();
+                if (results.size() != 0) {
+                    for (Object result : results) {
+                        ProjectUser projectUser = (ProjectUser) result;
+                        ProjectUserResource pr = (ProjectUserResource)
+                                Utils.getResource(ResourceType.PROJECT_USER, projectUser);
+                        resourceList.add(pr);
+                    }
+                }
+                em.getTransaction().commit();
+                em.close();
+            } else {
+                logger.error("Unsupported resource type for project resource.", new IllegalArgumentException());
+                throw new IllegalArgumentException("Unsupported resource type for project resource.");
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return resourceList;
+    }
+
+    /**
+     * Get results with pagination and ordering
+     *
+     * @param type
+     * @param limit
+     * @param offset
+     * @param orderByIdentifier
+     * @return
+     * @throws RegistryException
+     */
+    public List<Resource> get(ResourceType type, int limit, int offset, Object orderByIdentifier,
+                              ResultOrderType resultOrderType) throws RegistryException{
+        List<Resource> resourceList = new ArrayList<Resource>();
+        EntityManager em = null;
+        try {
+            if (type == ResourceType.EXPERIMENT) {
+                em = ResourceUtils.getEntityManager();
+                em.getTransaction().begin();
+                QueryGenerator generator = new QueryGenerator(EXPERIMENT);
+                generator.setParameter(ExperimentConstants.PROJECT_ID, id);
+                Query q;
+                //ordering - supported only by CREATION_TIME
+                if(orderByIdentifier != null && resultOrderType != null
+                        && orderByIdentifier.equals(Constants.FieldConstants.ExperimentConstants.CREATION_TIME)) {
+                    q = generator.selectQuery(em, ExperimentConstants.CREATION_TIME, resultOrderType);
+                }else{
+                    q = generator.selectQuery(em);
+                }
+
+                //pagination
+                if(limit>0 && offset>=0){
+                    q.setFirstResult(offset);
+                    q.setMaxResults(limit);
+                }
+                List<?> results = q.getResultList();
+                if (results.size() != 0) {
+                    for (Object result : results) {
+                        Experiment experiment = (Experiment) result;
+                        ExperimentResource experimentResource = (ExperimentResource)
+                                Utils.getResource(ResourceType.EXPERIMENT, experiment);
+                        resourceList.add(experimentResource);
+                    }
+                }
+                em.getTransaction().commit();
+                em.close();
+            } else if (type == ResourceType.PROJECT_USER) {
+                em = ResourceUtils.getEntityManager();
+                em.getTransaction().begin();
+                QueryGenerator generator = new QueryGenerator(PROJECT_USER);
+                generator.setParameter(ProjectUserConstants.PROJECT_ID, id);
+                Query q;
+                //ordering - only supported only by CREATION_TIME
+                if(orderByIdentifier != null && resultOrderType != null
+                        && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {
+                    q = generator.selectQuery(em, ProjectConstants.CREATION_TIME, resultOrderType);
+                }else{
+                    q = generator.selectQuery(em);
+                }
+
+                //pagination
+                if(limit>0 && offset>=0){
+                    q.setFirstResult(offset);
+                    q.setMaxResults(limit);
+                }
+                List<?> results = q.getResultList();
+                if (results.size() != 0) {
+                    for (Object result : results) {
+                        ProjectUser projectUser = (ProjectUser) result;
+                        ProjectUserResource pr = (ProjectUserResource)
+                                Utils.getResource(ResourceType.PROJECT_USER, projectUser);
+                        resourceList.add(pr);
+                    }
+                }
+                em.getTransaction().commit();
+                em.close();
+            } else {
+                logger.error("Unsupported resource type for project resource.", new IllegalArgumentException());
+                throw new IllegalArgumentException("Unsupported resource type for project resource.");
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return resourceList;
+    }
+
+    /**
+     * saveExperiment project to the database
+     */
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            Project existingProject = em.find(Project.class, id);
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Project project = new Project();
+            project.setProject_id(id);
+            project.setProject_name(name);
+            Gateway modelGateway = em.find(Gateway.class, gateway.getGatewayId());
+            project.setGateway(modelGateway);
+            project.setGateway_id(modelGateway.getGateway_id());
+            Users user = em.find(Users.class, worker.getUser());
+            project.setUsers(user);
+            project.setUser_name(user.getUser_name());
+            project.setDescription(description);
+            project.setCreationTime(creationTime);
+
+            if (existingProject != null) {
+                existingProject.setProject_name(name);
+                existingProject.setGateway(modelGateway);
+                existingProject.setGateway_id(modelGateway.getGateway_id());
+                existingProject.setUsers(user);
+                existingProject.setUser_name(user.getUser_name());
+                existingProject.setDescription(description);
+                existingProject.setCreationTime(creationTime);
+                project = em.merge(existingProject);
+            } else {
+                em.persist(project);
+            }
+
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    /**
+     *
+     * @return project name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     *
+     * @param name  project name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     *
+     * @return gateway worker
+     */
+    public WorkerResource getWorker() {
+		return worker;
+	}
+
+    /**
+     *
+     * @param worker gateway worker
+     */
+    public void setWorker(WorkerResource worker) {
+		this.worker = worker;
+	}
+
+    /**
+     *
+     * @return gateway resource
+     */
+    public GatewayResource getGateway() {
+		return gateway;
+	}
+
+    /**
+     *
+     * @param gateway gateway resource
+     */
+    public void setGateway(GatewayResource gateway) {
+		this.gateway = gateway;
+	}
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    /**
+     *
+     * @param experimentId experiment ID
+     * @return whether the experiment exist
+     */
+    public boolean isExperimentExists(String experimentId) throws RegistryException{
+		return isExists(ResourceType.EXPERIMENT, experimentId);
+	}
+
+    /**
+     *
+     * @param experimentId experiment ID
+     * @return  experiment resource
+     */
+    public ExperimentResource createExperiment(String experimentId) throws RegistryException{
+		ExperimentResource experimentResource = (ExperimentResource)create(ResourceType.EXPERIMENT);
+		experimentResource.setExpID(experimentId);
+		return experimentResource;
+	}
+
+    /**
+     *
+     * @param experimentId experiment ID
+     * @return experiment resource
+     */
+	public ExperimentResource getExperiment(String experimentId) throws RegistryException{
+		return (ExperimentResource)get(ResourceType.EXPERIMENT,experimentId);
+	}
+
+    /**
+     *
+     * @return  list of experiments
+     */
+    public List<ExperimentResource> getExperiments() throws RegistryException{
+		List<Resource> list = get(ResourceType.EXPERIMENT);
+		List<ExperimentResource> result=new ArrayList<ExperimentResource>();
+		for (Resource resource : list) {
+			result.add((ExperimentResource) resource);
+		}
+		return result;
+	}
+
+    public List<ExperimentResource> getExperiments(int limit, int offset, Object orderByIdentifier,
+                                                   ResultOrderType resultOrderType) throws RegistryException{
+        List<Resource> list = get(ResourceType.EXPERIMENT, limit, offset, orderByIdentifier, resultOrderType);
+        List<ExperimentResource> result=new ArrayList<ExperimentResource>();
+        for (Resource resource : list) {
+            result.add((ExperimentResource) resource);
+        }
+        return result;
+    }
+
+    /**
+     *
+     * @param experimentId experiment ID
+     */
+    public void removeExperiment(String experimentId) throws RegistryException{
+		remove(ResourceType.EXPERIMENT, experimentId);
+	}
+
+    public List<ProjectUserResource> getProjectUserList () throws RegistryException{
+        List<Resource> resources = get(ResourceType.PROJECT_USER);
+        List<ProjectUserResource> projectUserResources = new ArrayList<ProjectUserResource>();
+        if (resources != null && !resources.isEmpty()){
+            for (Resource r : resources){
+                projectUserResources.add((ProjectUserResource)r);
+            }
+        }
+        return projectUserResources;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java
new file mode 100644
index 0000000..336a9ee
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java
@@ -0,0 +1,123 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import java.util.List;
+
+public class ProjectUserResource extends AbstractResource {
+    private String projectId;
+    private String userName;
+
+    private static final Logger logger = LoggerFactory.getLogger(ProjectUserResource.class);
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    
+    public Resource create(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for project resource data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for project resource data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Resource get(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for project resource data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        logger.error("Unsupported resource type for project resource data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            ProjectUser existingPrUser = em.find(ProjectUser.class, new ProjectUser_PK(projectId, userName));
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            ProjectUser prUser = new ProjectUser();
+            prUser.setProjectId(projectId);
+            prUser.setUserName(userName);
+            Users user = em.find(Users.class, userName);
+            prUser.setUser(user);
+            Project project = em.find(Project.class, projectId);
+            prUser.setProject(project);
+
+            if (existingPrUser != null) {
+                existingPrUser.setProjectId(projectId);
+                existingPrUser.setUserName(userName);
+                existingPrUser.setUser(user);
+                existingPrUser.setProject(project);
+                prUser = em.merge(existingPrUser);
+            } else {
+                em.persist(prUser);
+            }
+
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/QosParamResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/QosParamResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/QosParamResource.java
new file mode 100644
index 0000000..6f906cd
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/QosParamResource.java
@@ -0,0 +1,152 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.Experiment;
+import org.apache.airavata.persistance.registry.jpa.model.QosParam;
+import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.airavata.registry.cpi.RegistryException;
+
+import javax.persistence.EntityManager;
+import java.util.List;
+
+public class QosParamResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(QosParamResource.class);
+    private int  qosId;
+    private ExperimentResource experimentResource;
+    private TaskDetailResource taskDetailResource;
+    private String startExecutionAt;
+    private String executeBefore;
+    private int noOfRetries;
+
+    public int getQosId() {
+        return qosId;
+    }
+
+    public void setQosId(int qosId) {
+        this.qosId = qosId;
+    }
+
+    public ExperimentResource getExperimentResource() {
+        return experimentResource;
+    }
+
+    public void setExperimentResource(ExperimentResource experimentResource) {
+        this.experimentResource = experimentResource;
+    }
+
+    public TaskDetailResource getTaskDetailResource() {
+        return taskDetailResource;
+    }
+
+    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
+        this.taskDetailResource = taskDetailResource;
+    }
+
+    public String getStartExecutionAt() {
+        return startExecutionAt;
+    }
+
+    public void setStartExecutionAt(String startExecutionAt) {
+        this.startExecutionAt = startExecutionAt;
+    }
+
+    public String getExecuteBefore() {
+        return executeBefore;
+    }
+
+    public void setExecuteBefore(String executeBefore) {
+        this.executeBefore = executeBefore;
+    }
+
+    public int getNoOfRetries() {
+        return noOfRetries;
+    }
+
+    public void setNoOfRetries(int noOfRetries) {
+        this.noOfRetries = noOfRetries;
+    }
+
+    
+    public Resource create(ResourceType type) throws RegistryException{
+        logger.error("Unsupported resource type for qos params resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for qos params resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Resource get(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for qos params resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        logger.error("Unsupported resource type for qos params resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            QosParam qosParam = new QosParam();
+            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
+            if (taskDetailResource != null) {
+                TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
+                qosParam.setTaskId(taskDetailResource.getTaskId());
+                qosParam.setTask(taskDetail);
+            }
+            qosParam.setExpId(experimentResource.getExpID());
+            qosParam.setExperiment(experiment);
+            qosParam.setStartExecutionAt(startExecutionAt);
+            qosParam.setExecuteBefore(executeBefore);
+            qosParam.setNoOfRetries(noOfRetries);
+            em.persist(qosParam);
+            qosId = qosParam.getQosId();
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/StatusResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/StatusResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/StatusResource.java
new file mode 100644
index 0000000..169e1c7
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/StatusResource.java
@@ -0,0 +1,195 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.airavata.registry.cpi.RegistryException;
+
+import javax.persistence.EntityManager;
+import java.sql.Timestamp;
+import java.util.List;
+
+public class StatusResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(StatusResource.class);
+    private int statusId = 0;
+    private ExperimentResource experimentResource;
+    private WorkflowNodeDetailResource workflowNodeDetail;
+    private DataTransferDetailResource dataTransferDetail;
+    private TaskDetailResource taskDetailResource;
+    private String jobId;
+    private String state;
+    private Timestamp statusUpdateTime;
+    private String statusType;
+
+    public int getStatusId() {
+        return statusId;
+    }
+
+    public void setStatusId(int statusId) {
+        this.statusId = statusId;
+    }
+
+    public ExperimentResource getExperimentResource() {
+        return experimentResource;
+    }
+
+    public void setExperimentResource(ExperimentResource experimentResource) {
+        this.experimentResource = experimentResource;
+    }
+
+    public WorkflowNodeDetailResource getWorkflowNodeDetail() {
+        return workflowNodeDetail;
+    }
+
+    public void setWorkflowNodeDetail(WorkflowNodeDetailResource workflowNodeDetail) {
+        this.workflowNodeDetail = workflowNodeDetail;
+    }
+
+    public DataTransferDetailResource getDataTransferDetail() {
+        return dataTransferDetail;
+    }
+
+    public void setDataTransferDetail(DataTransferDetailResource dataTransferDetail) {
+        this.dataTransferDetail = dataTransferDetail;
+    }
+
+    public TaskDetailResource getTaskDetailResource() {
+        return taskDetailResource;
+    }
+
+    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
+        this.taskDetailResource = taskDetailResource;
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public Timestamp getStatusUpdateTime() {
+        return statusUpdateTime;
+    }
+
+    public void setStatusUpdateTime(Timestamp statusUpdateTime) {
+        this.statusUpdateTime = statusUpdateTime;
+    }
+
+    public String getStatusType() {
+        return statusType;
+    }
+
+    public void setStatusType(String statusType) {
+        this.statusType = statusType;
+    }
+
+    
+    public Resource create(ResourceType type) throws RegistryException{
+        logger.error("Unsupported resource type for status resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for status resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Resource get(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for status resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        logger.error("Unsupported resource type for status resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Status status;
+            if (statusId != 0) {
+                status = em.find(Status.class, statusId);
+                status.setStatusId(statusId);
+            } else {
+                status = new Status();
+            }
+            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
+            if (taskDetailResource != null) {
+                TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
+                status.setTask(taskDetail);
+                status.setTaskId(taskDetailResource.getTaskId());
+            }
+            if (workflowNodeDetail != null) {
+                WorkflowNodeDetail nodeDetail = em.find(WorkflowNodeDetail.class, workflowNodeDetail.getNodeInstanceId());
+                status.setNode(nodeDetail);
+                status.setNodeId(workflowNodeDetail.getNodeInstanceId());
+            }
+            if (dataTransferDetail != null) {
+                DataTransferDetail transferDetail = em.find(DataTransferDetail.class, dataTransferDetail.getTransferId());
+                status.setTransferDetail(transferDetail);
+                status.setTransferId(dataTransferDetail.getTransferId());
+            }
+            status.setExperiment(experiment);
+            status.setJobId(jobId);
+            status.setExpId(experimentResource.getExpID());
+            status.setState(state);
+            status.setStatusUpdateTime(statusUpdateTime);
+            status.setStatusType(statusType);
+            em.persist(status);
+            statusId = status.getStatusId();
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}


[27/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/ExperimentRepository.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/ExperimentRepository.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/ExperimentRepository.java
new file mode 100644
index 0000000..913d6ce
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/ExperimentRepository.java
@@ -0,0 +1,1566 @@
+/*
+ *
+ * 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.persistance.registry.mongo.repository;
+
+import org.apache.airavata.common.logger.AiravataLogger;
+import org.apache.airavata.common.logger.AiravataLoggerFactory;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.model.workspace.User;
+import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.persistance.registry.mongo.dao.ExperimentDao;
+import org.apache.airavata.registry.cpi.CompositeIdentifier;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.RegistryModelType;
+import org.apache.airavata.registry.cpi.ResultOrderType;
+import org.apache.airavata.registry.cpi.utils.Constants;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+public class ExperimentRepository {
+    private final static AiravataLogger logger = AiravataLoggerFactory.getLogger(ExperimentRepository.class);
+
+    private ExperimentDao experimentDao;
+    private ProjectRepository projectRepository;
+    private UserRepository userRepository;
+    private User user;
+    private Gateway gateway;
+
+    public ExperimentRepository(Gateway gateway, User user) throws RegistryException {
+        this.experimentDao = new ExperimentDao();
+        this.projectRepository = new ProjectRepository(gateway, user);
+        this.userRepository = new UserRepository();
+        if(userRepository.isUserExists(user.getUserName())){
+            userRepository.addUser(user);
+        }
+        this.gateway = gateway;
+        this.user = user;
+    }
+
+    public String addExperiment(Experiment experiment, String gatewayId) throws RegistryException {
+        try {
+            if (!userRepository.isUserExists(experiment.getUserName())) {
+                userRepository.addUser(new User(experiment.getUserName()));
+            }
+            if (projectRepository.isProjectExist(experiment.getProjectId())) {
+                logger.error("Project does not exist in the system..");
+                throw new Exception("Project does not exist in the system, Please" +
+                        " create the project first...");
+            }
+            //setting up unique ids
+            experiment.setExperimentId(getExperimentId(experiment.getName()));
+            for (WorkflowNodeDetails wfnd : experiment.getWorkflowNodeDetailsList()) {
+                wfnd.setNodeInstanceId(getNodeInstanceID(wfnd.getNodeName()));
+                for (TaskDetails taskDetails : wfnd.getTaskDetailsList()) {
+                    taskDetails.setTaskId(getTaskId(wfnd.getNodeName()));
+                    for (DataTransferDetails dtd : taskDetails.getDataTransferDetailsList()) {
+                        dtd.setTransferId(getDataTransferID(taskDetails.getTaskId()));
+                    }
+                }
+            }
+            experimentDao.createExperiment(experiment);
+        } catch (Exception e) {
+            logger.error("Error while saving experiment to registry", e);
+            throw new RegistryException(e);
+        }
+        return experiment.getExperimentId();
+    }
+
+    public String addUserConfigData(UserConfigurationData configurationData, String expId) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expId);
+            experiment.setUserConfigurationData(configurationData);
+            experimentDao.updateExperiment(experiment);
+            return expId;
+        } catch (Exception e) {
+            logger.error("Unable to save user config data", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addExpOutputs(List<OutputDataObjectType> exOutput, String expId) throws RegistryException {
+        return updateExpOutputs(exOutput, expId);
+    }
+
+    public String updateExpOutputs(List<OutputDataObjectType> exOutput, String expId) throws RegistryException {
+        try {
+            Experiment experiement = experimentDao.getExperiment(expId);
+            experiement.setExperimentOutputs(exOutput);
+            experimentDao.updateExperiment(experiement);
+            return expId;
+        } catch (Exception e) {
+            logger.error("Error while updating experiment outputs", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addNodeOutputs(List<OutputDataObjectType> wfOutputs, CompositeIdentifier ids) throws RegistryException {
+        return updateNodeOutputs(wfOutputs, (String) ids.getSecondLevelIdentifier());
+    }
+
+    public String updateNodeOutputs(List<OutputDataObjectType> wfOutputs, String nodeId) throws RegistryException {
+        try {
+            WorkflowNodeDetails wfnd = experimentDao.getWFNode(nodeId);
+            wfnd.setNodeOutputs(wfOutputs);
+            experimentDao.updateWFNode(wfnd);
+            return nodeId;
+        } catch (Exception e) {
+            logger.error("Error while updating node outputs...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addApplicationOutputs(List<OutputDataObjectType> appOutputs, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getThirdLevelIdentifier());
+            taskDetails.getApplicationOutputs().addAll(appOutputs);
+            experimentDao.updateTaskDetail(taskDetails);
+            return (String) ids.getSecondLevelIdentifier();
+        } catch (Exception e) {
+            logger.error("Error while adding application outputs...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String updateExperimentStatus(ExperimentStatus experimentStatus, String expId)
+            throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expId);
+            String currentState = (experiment.getExperimentStatus() == null)
+                    ? ExperimentState.UNKNOWN.name()
+                    : experiment.getExperimentStatus().getExperimentState().name();
+            if (isValidStatusTransition(ExperimentState.valueOf(currentState),
+                    experimentStatus.getExperimentState())) {
+                experiment.setExperimentStatus(experimentStatus);
+                experimentDao.updateExperiment(experiment);
+                logger.debugId(expId, "Updated experiment {} status to {}.",
+                        expId, experimentStatus.toString());
+                return experiment.getExperimentId();
+            }
+        } catch (Exception e) {
+            logger.errorId(expId, "Error while updating experiment status...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public String addWorkflowNodeStatus(WorkflowNodeStatus status, CompositeIdentifier ids) throws RegistryException {
+        return updateWorkflowNodeStatus(status, (String) ids.getSecondLevelIdentifier());
+    }
+
+    public String updateWorkflowNodeStatus(WorkflowNodeStatus status, String nodeId) throws RegistryException {
+        try {
+            WorkflowNodeDetails wfnd = experimentDao.getWFNode(nodeId);
+            wfnd.setWorkflowNodeStatus(status);
+            experimentDao.updateWFNode(wfnd);
+            return nodeId;
+        } catch (Exception e) {
+            logger.errorId(nodeId, "Error while updating workflow node status to " + status.toString() + "...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addTaskStatus(TaskStatus status, CompositeIdentifier ids) throws RegistryException {
+        return updateTaskStatus(status, (String) ids.getThirdLevelIdentifier());
+    }
+
+    public String updateTaskStatus(TaskStatus status, String taskId) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
+            taskDetails.setTaskStatus(status);
+            experimentDao.updateTaskDetail(taskDetails);
+            return taskId;
+        } catch (Exception e) {
+            logger.errorId(taskId, "Error while updating task status to " + status.toString() + "...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addJobStatus(JobStatus status, CompositeIdentifier ids) throws RegistryException {
+        return updateJobStatus(status, ids);
+    }
+
+    public String updateJobStatus(JobStatus status, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
+                    if (status.getJobState() == null) {
+                        status.setJobState(JobState.UNKNOWN);
+                    }
+                    jobDetails.setJobStatus(status);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    return (String) ids.getSecondLevelIdentifier();
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.errorId(ids.toString(), "Error while updating job status to " + status.toString() + " ...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addApplicationStatus(ApplicationStatus status, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
+                    jobDetails.setApplicationStatus(status);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    return (String) ids.getSecondLevelIdentifier();
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Unable to read airavata-server properties", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateApplicationStatus(ApplicationStatus status, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
+                    jobDetails.setApplicationStatus(status);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    return;
+                }
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating application status...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addTransferStatus(TransferStatus status, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (DataTransferDetails dataTransferDetails : taskDetails.getDataTransferDetailsList()) {
+                if (dataTransferDetails.getTransferId().equals(ids.getSecondLevelIdentifier())) {
+                    if (status.getTransferState() == null) {
+                        status.setTransferState(TransferState.UNKNOWN);
+                    }
+                    dataTransferDetails.setTransferStatus(status);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    return (String) ids.getSecondLevelIdentifier();
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Error while adding transfer status...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateTransferStatus(TransferStatus status, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (DataTransferDetails dataTransferDetails : taskDetails.getDataTransferDetailsList()) {
+                if (dataTransferDetails.getTransferId().equals(ids.getSecondLevelIdentifier())) {
+                    dataTransferDetails.setTransferStatus(status);
+                    experimentDao.updateTaskDetail(taskDetails);
+                }
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating transfer status...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addWorkflowNodeDetails(WorkflowNodeDetails nodeDetails, String expId) throws RegistryException {
+        try {
+            nodeDetails.setNodeInstanceId(getNodeInstanceID(nodeDetails.getNodeName()));
+            for (TaskDetails taskDetails : nodeDetails.getTaskDetailsList()) {
+                taskDetails.setTaskId(getTaskId(nodeDetails.getNodeName()));
+                for (DataTransferDetails dtd : taskDetails.getDataTransferDetailsList()) {
+                    dtd.setTransferId(getDataTransferID(taskDetails.getTaskId()));
+                }
+            }
+            experimentDao.createWFNode(expId, nodeDetails);
+            return nodeDetails.getNodeInstanceId();
+        } catch (Exception e) {
+            logger.error("Error while adding workflow node details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateWorkflowNodeDetails(WorkflowNodeDetails nodeDetails, String nodeId) throws RegistryException {
+        try {
+            experimentDao.updateWFNode(nodeDetails);
+        } catch (Exception e) {
+            logger.error("Error while updating workflow node details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addTaskDetails(TaskDetails taskDetails, String nodeId) throws RegistryException {
+        try {
+            experimentDao.createTaskDetail(nodeId, taskDetails);
+            return taskDetails.getTaskId();
+        } catch (Exception e) {
+            logger.error("Error while adding task details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String updateTaskDetails(TaskDetails taskDetails, String taskId) throws RegistryException {
+        try {
+            experimentDao.updateTaskDetail(taskDetails);
+            return taskDetails.getTaskId();
+        } catch (Exception e) {
+            logger.error("Error while updating task details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateAppOutputs(List<OutputDataObjectType> appOutputs, String taskId) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
+            taskDetails.setApplicationOutputs(appOutputs);
+            experimentDao.updateTaskDetail(taskDetails);
+        } catch (Exception e) {
+            logger.error("Error while updating application outputs...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addJobDetails(JobDetails jobDetails, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            jobDetails.setJobId((String) ids.getSecondLevelIdentifier());
+            taskDetails.getJobDetailsList().add(jobDetails);
+            experimentDao.updateTaskDetail(taskDetails);
+            return (String) ids.getSecondLevelIdentifier();
+        } catch (Exception e) {
+            logger.error("Error while adding job details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    // ids - taskId + jobid
+    public void updateJobDetails(JobDetails jobDetails, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            List<JobDetails> jobDetailsList = taskDetails.getJobDetailsList();
+            for (JobDetails exisitingJobDetail : taskDetails.getJobDetailsList()) {
+                if (exisitingJobDetail.getJobId().equals(jobDetails.getJobId())) {
+                    jobDetailsList.remove(exisitingJobDetail);
+                    jobDetailsList.add(jobDetails);
+                    taskDetails.setJobDetailsList(jobDetailsList);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    return;
+                }
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating job details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addDataTransferDetails(DataTransferDetails transferDetails, String taskId) throws RegistryException {
+        try {
+            if (transferDetails.getTransferDescription() == null) {
+                throw new RegistryException("Data transfer description cannot be empty");
+            }
+            TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
+            taskDetails.getDataTransferDetailsList().add(transferDetails);
+            experimentDao.updateTaskDetail(taskDetails);
+            return taskId;
+        } catch (Exception e) {
+            logger.error("Error while adding transfer details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String updateDataTransferDetails(DataTransferDetails transferDetails, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetail = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (DataTransferDetails dtd : taskDetail.getDataTransferDetailsList()) {
+                if (dtd.getTransferId().equals(ids.getSecondLevelIdentifier())) {
+                    taskDetail.getDataTransferDetailsList().remove(dtd);
+                    taskDetail.getDataTransferDetailsList().add(transferDetails);
+                    experimentDao.updateTaskDetail(taskDetail);
+                    return (String) ids.getSecondLevelIdentifier();
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Error while updating transfer details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addComputationalResourceScheduling(ComputationalResourceScheduling scheduling, CompositeIdentifier ids) throws RegistryException {
+        try {
+            if (ids.getSecondLevelIdentifier() == null) {
+                Experiment experiment = experimentDao.getExperiment((String) ids.getTopLevelIdentifier());
+                experiment.getUserConfigurationData().setComputationalResourceScheduling(scheduling);
+                experimentDao.updateExperiment(experiment);
+                return (String) ids.getTopLevelIdentifier();
+            } else {
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getSecondLevelIdentifier());
+                taskDetails.setTaskScheduling(scheduling);
+                experimentDao.updateTaskDetail(taskDetails);
+                return (String) ids.getSecondLevelIdentifier();
+            }
+        } catch (Exception e) {
+            logger.error("Error while adding scheduling parameters...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addInputDataHandling(AdvancedInputDataHandling dataHandling, CompositeIdentifier ids) throws RegistryException {
+        try {
+            if (ids.getSecondLevelIdentifier() == null) {
+                Experiment experiment = experimentDao.getExperiment((String) ids.getTopLevelIdentifier());
+                experiment.getUserConfigurationData().setAdvanceInputDataHandling(dataHandling);
+                experimentDao.updateExperiment(experiment);
+                return (String) ids.getTopLevelIdentifier();
+            } else {
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getSecondLevelIdentifier());
+                taskDetails.setAdvancedInputDataHandling(dataHandling);
+                experimentDao.updateTaskDetail(taskDetails);
+                return (String) ids.getSecondLevelIdentifier();
+            }
+        } catch (Exception e) {
+            logger.error("Error while adding input data handling...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addOutputDataHandling(AdvancedOutputDataHandling dataHandling, CompositeIdentifier ids) throws RegistryException {
+        try {
+            if (ids.getSecondLevelIdentifier() == null) {
+                Experiment experiment = experimentDao.getExperiment((String) ids.getTopLevelIdentifier());
+                experiment.getUserConfigurationData().setAdvanceOutputDataHandling(dataHandling);
+                experimentDao.updateExperiment(experiment);
+                return (String) ids.getTopLevelIdentifier();
+            } else {
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getSecondLevelIdentifier());
+                taskDetails.setAdvancedOutputDataHandling(dataHandling);
+                experimentDao.updateTaskDetail(taskDetails);
+                return (String) ids.getSecondLevelIdentifier();
+            }
+        } catch (Exception e) {
+            logger.error("Error while adding output data handling...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addQosParams(QualityOfServiceParams qosParams, String expId) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expId);
+            experiment.getUserConfigurationData().setQosParams(qosParams);
+            experimentDao.updateExperiment(experiment);
+            return expId;
+        } catch (Exception e) {
+            logger.error("Error while adding QOS params...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addErrorDetails(ErrorDetails error, Object id) throws RegistryException {
+        try {
+            // FIXME : for .12 we only saveExperiment task related errors
+            if(id instanceof String){
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) id);
+                taskDetails.getErrors().add(error);
+                experimentDao.updateTaskDetail(taskDetails);
+                return (String) id;
+            } else if (id instanceof CompositeIdentifier) {
+                CompositeIdentifier cid = (CompositeIdentifier) id;
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) cid.getTopLevelIdentifier());
+                for(JobDetails jobDetails: taskDetails.getJobDetailsList()){
+                    if(jobDetails.getJobId().equals(cid.getSecondLevelIdentifier())){
+                        jobDetails.getErrors().add(error);
+                        experimentDao.updateTaskDetail(taskDetails);
+                        return (String) cid.getSecondLevelIdentifier();
+                    }
+                }
+            } else {
+                logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Unable to add error details...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public String getNodeInstanceID(String nodeName) {
+        String node = nodeName.replaceAll("\\s", "");
+        return node + "_" + UUID.randomUUID();
+    }
+
+    public String getExperimentId(String experimentName) {
+        String exp = experimentName.replaceAll("\\s", "");
+        return exp + "_" + UUID.randomUUID();
+    }
+
+    public String getTaskId(String nodeName) {
+        String node = nodeName.replaceAll("\\s", "");
+        return node + "_" + UUID.randomUUID();
+    }
+
+    public String getDataTransferID(String taskId) {
+        String task = taskId.replaceAll("\\s", "");
+        return task + "_" + UUID.randomUUID();
+    }
+
+    public void updateExperimentField(String expID, String fieldName, Object value) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expID);
+            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_NAME)) {
+                experiment.setName((String) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
+                experiment.setUserName((String) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_DESC)) {
+                experiment.setDescription((String) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_ID)) {
+                experiment.setApplicationId((String) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_VERSION)) {
+                experiment.setApplicationVersion((String) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_TEMPLATE_ID)) {
+                experiment.setWorkflowTemplateId((String) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_TEMPLATE_VERSION)) {
+                experiment.setWorkflowTemplateVersion((String) value);
+                experimentDao.updateExperiment(experiment);
+            } else {
+                logger.error("Unsupported field type for Experiment");
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating fields in experiment...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateExpConfigDataField(String expID, String fieldName, Object value) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expID);
+            if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.AIRAVATA_AUTO_SCHEDULE)) {
+                experiment.getUserConfigurationData().setAiravataAutoSchedule((Boolean) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.OVERRIDE_MANUAL_PARAMS)) {
+                experiment.getUserConfigurationData().setOverrideManualScheduledParams((Boolean) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.SHARE_EXP)) {
+                experiment.getUserConfigurationData().setShareExperimentPublicly((Boolean) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants
+                    .ConfigurationDataConstants.COMPUTATIONAL_RESOURCE_SCHEDULING)) {
+                experiment.getUserConfigurationData()
+                        .setComputationalResourceScheduling((ComputationalResourceScheduling) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_INPUT_HANDLING)) {
+                experiment.getUserConfigurationData()
+                        .setAdvanceInputDataHandling((AdvancedInputDataHandling) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_OUTPUT_HANDLING)) {
+                experiment.getUserConfigurationData()
+                        .setAdvanceOutputDataHandling((AdvancedOutputDataHandling) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.QOS_PARAMS)) {
+                experiment.getUserConfigurationData()
+                        .setQosParams((QualityOfServiceParams) value);
+                experimentDao.updateExperiment(experiment);
+            } else {
+                logger.error("Unsupported field type for Experiment config data");
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating fields in experiment config...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateExperiment(Experiment experiment, String expId) throws RegistryException {
+        try {
+            if (!userRepository.isUserExists(experiment.getUserName())) {
+                userRepository.addUser(new User(experiment.getUserName()));
+            }
+            if (projectRepository.getProject(experiment.getProjectId()) != null) {
+                logger.error("Project does not exist in the system..");
+                throw new Exception("Project does not exist in the system, Please create the project first...");
+            }
+            //making sure id is set
+            experiment.setExperimentId(expId);
+            experimentDao.updateExperiment(experiment);
+        } catch (Exception e) {
+            logger.error("Error while updating experiment...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateUserConfigData(UserConfigurationData configData, String expId) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expId);
+            experiment.setUserConfigurationData(configData);
+            experimentDao.updateExperiment(experiment);
+            return;
+        } catch (Exception e) {
+            logger.error("Error while updating user config data...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public List<Experiment> getExperimentList(String fieldName, Object value) throws RegistryException {
+        return getExperimentList(fieldName, value, -1, -1, null, null);
+    }
+
+    public List<Experiment> getExperimentList(String fieldName, Object value, int limit, int offset,
+                                              Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+        List<Experiment> experiments = new ArrayList();
+        Map<String, String> filters = new HashMap();
+        try {
+            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
+                filters.put(fieldName, (String)value);
+                return experimentDao.searchExperiments(filters, limit, offset, orderByIdentifier, resultOrderType);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.PROJECT_ID)) {
+                filters.put(fieldName, (String)value);
+                return experimentDao.searchExperiments(filters, limit, offset, orderByIdentifier, resultOrderType);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
+                filters.put(fieldName, (String)value);
+                return experimentDao.searchExperiments(filters, limit, offset, orderByIdentifier, resultOrderType);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_NODE_LIST)) {
+                if (value instanceof List<?>) {
+                    return getExperimentList(fieldName, ((List<?>) value).get(0));
+                } else if (value instanceof WorkflowNodeDetails) {
+                    List<Experiment> experimentList = new ArrayList();
+                    experimentList.add(experimentDao.getParentExperimentOfWFNode(
+                            ((WorkflowNodeDetails)value).getNodeInstanceId())
+                    );
+                } else {
+                    logger.error("Unsupported field value to retrieve workflow node detail list...");
+                }
+            } else {
+                logger.error("Unsupported field name to retrieve experiment list...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting experiment list...", e);
+            throw new RegistryException(e);
+        }
+        return experiments;
+    }
+
+    public List<WorkflowNodeDetails> getWFNodeDetails(String fieldName, Object value) throws RegistryException {
+        try {
+            if (fieldName.equals(Constants.FieldConstants.WorkflowNodeConstants.EXPERIMENT_ID)) {
+                Experiment experiment = experimentDao.getExperiment((String) value);
+                return experiment.getWorkflowNodeDetailsList();
+            }
+            if (fieldName.equals(Constants.FieldConstants.WorkflowNodeConstants.TASK_LIST)) {
+                if (value instanceof List<?>) {
+                    return getWFNodeDetails(fieldName, ((List<?>) value).get(0));
+                } else if (value instanceof TaskDetails) {
+                    List<WorkflowNodeDetails> workflowNodeDetailsList = new ArrayList();
+                    workflowNodeDetailsList.add(experimentDao.getParentWFNodeOfTask(((TaskDetails)value).getTaskId()));
+                    return workflowNodeDetailsList;
+                } else {
+                    logger.error("Unsupported field value to retrieve workflow node detail list...");
+                }
+            } else {
+                logger.error("Unsupported field name to retrieve workflow detail list...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting workfkow details...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<WorkflowNodeStatus> getWFNodeStatusList(String fieldName, Object value) throws RegistryException {
+        try {
+            if (fieldName.equals(Constants.FieldConstants.WorkflowNodeStatusConstants.EXPERIMENT_ID)) {
+                Experiment experiment = experimentDao.getExperiment((String) value);
+                List<WorkflowNodeStatus> workflowNodeStatuses = experiment.getWorkflowNodeDetailsList().stream().map(WorkflowNodeDetails::getWorkflowNodeStatus).collect(Collectors.toList());
+                return workflowNodeStatuses;
+            } else {
+                logger.error("Unsupported field name to retrieve workflow status list...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting workflow status...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<TaskDetails> getTaskDetails(String fieldName, Object value) throws RegistryException {
+        try {
+            if (fieldName.equals(Constants.FieldConstants.TaskDetailConstants.NODE_ID)) {
+                WorkflowNodeDetails wfnd = experimentDao.getWFNode((String) value);
+                return wfnd.getTaskDetailsList();
+            } else {
+                logger.error("Unsupported field name to retrieve task detail list...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting task details...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<JobDetails> getJobDetails(String fieldName, Object value) throws RegistryException {
+        try {
+            if (fieldName.equals(Constants.FieldConstants.JobDetaisConstants.TASK_ID)) {
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) value);
+                return taskDetails.getJobDetailsList();
+            } else {
+                logger.error("Unsupported field name to retrieve job details list...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while job details...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<DataTransferDetails> getDataTransferDetails(String fieldName, Object value) throws RegistryException {
+        try {
+            if (fieldName.equals(Constants.FieldConstants.DataTransferDetailConstants.TASK_ID)) {
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) value);
+                return taskDetails.getDataTransferDetailsList();
+            } else {
+                logger.error("Unsupported field name to retrieve job details list...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting data transfer details...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<ErrorDetails> getErrorDetails(String fieldName, Object value) throws RegistryException {
+        try {
+            if (fieldName.equals(Constants.FieldConstants.ErrorDetailsConstants.EXPERIMENT_ID)) {
+                Experiment experiment = experimentDao.getExperiment((String) value);
+                return experiment.getErrors();
+            } else if (fieldName.equals(Constants.FieldConstants.ErrorDetailsConstants.NODE_ID)) {
+                WorkflowNodeDetails wfnd = experimentDao.getWFNode((String) value);
+                wfnd.getErrors();
+            } else if (fieldName.equals(Constants.FieldConstants.ErrorDetailsConstants.TASK_ID)) {
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) value);
+                return taskDetails.getErrors();
+            } else if (fieldName.equals(Constants.FieldConstants.ErrorDetailsConstants.JOB_ID)) {
+                CompositeIdentifier cid = (CompositeIdentifier) value;
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) cid.getTopLevelIdentifier());
+                for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                    if (jobDetails.getJobId().equals(cid.getSecondLevelIdentifier())) {
+                        return jobDetails.getErrors();
+                    }
+                }
+            } else {
+                logger.error("Unsupported field name to retrieve job details list...");
+            }
+        } catch (Exception e) {
+            logger.error("Unable to get error details...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public Object getExperiment(String expId, String fieldName) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expId);
+            if (fieldName == null) {
+                return experiment;
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
+                return experiment.getUserName();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
+                return experiment.getGatewayExecutionId();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_NAME)) {
+                return experiment.getName();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_DESC)) {
+                return experiment.getDescription();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_ID)) {
+                return experiment.getApplicationId();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.PROJECT_ID)) {
+                return experiment.getProjectId();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_VERSION)) {
+                return experiment.getApplicationVersion();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_TEMPLATE_ID)) {
+                return experiment.getWorkflowTemplateId();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_TEMPLATE_VERSION)) {
+                return experiment.getWorkflowTemplateVersion();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_INPUTS)) {
+                return experiment.getExperimentInputs();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_OUTPUTS)) {
+                return experiment.getExperimentOutputs();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_STATUS)) {
+                return experiment.getExperimentStatus();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_CONFIGURATION_DATA)) {
+                return experiment.getUserConfigurationData();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_EXECUTION_ID)) {
+                return experiment.getWorkflowExecutionInstanceId();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.STATE_CHANGE_LIST)) {
+                final List<WorkflowNodeStatus> statusList = new ArrayList();
+                        experiment.getWorkflowNodeDetailsList().stream()
+                        .forEach(wfnd->statusList.add(wfnd.getWorkflowNodeStatus()));
+                return statusList;
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_NODE_LIST)) {
+                return experiment.getWorkflowNodeDetailsList();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.ERROR_DETAIL_LIST)) {
+                return experiment.getErrors();
+            } else {
+                logger.error("Unsupported field name for experiment basic data..");
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting experiment info...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public Object getConfigData(String expId, String fieldName) throws RegistryException {
+        try {
+            UserConfigurationData configurationData = experimentDao.getExperiment(expId).getUserConfigurationData();
+            if (fieldName == null) {
+                return configurationData;
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.AIRAVATA_AUTO_SCHEDULE)) {
+                return configurationData.isAiravataAutoSchedule();
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.OVERRIDE_MANUAL_PARAMS)) {
+                return configurationData.isOverrideManualScheduledParams();
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.SHARE_EXP)) {
+                return configurationData.isShareExperimentPublicly();
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.COMPUTATIONAL_RESOURCE_SCHEDULING)) {
+                return configurationData.getComputationalResourceScheduling();
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_INPUT_HANDLING)) {
+                return configurationData.getAdvanceInputDataHandling();
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_OUTPUT_HANDLING)) {
+                return configurationData.getAdvanceOutputDataHandling();
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.QOS_PARAMS)) {
+                return configurationData.getQosParams();
+            } else {
+                logger.error("Unsupported field name for experiment configuration data..");
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting config data..", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<OutputDataObjectType> getExperimentOutputs(String expId) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expId);
+            return experiment.getExperimentOutputs();
+        } catch (Exception e) {
+            logger.error("Error while getting experiment outputs...", e);
+        }
+        return null;
+    }
+
+    public ExperimentStatus getExperimentStatus(String expId) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expId);
+            return experiment.getExperimentStatus();
+        } catch (Exception e) {
+            logger.error("Error while getting experiment status...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public ComputationalResourceScheduling getComputationalScheduling(RegistryModelType type, String id) throws RegistryException {
+        try {
+            switch (type) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getComputationalResourceScheduling();
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    return taskDetails.getTaskScheduling();
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting scheduling data..", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public AdvancedInputDataHandling getInputDataHandling(RegistryModelType type, String id) throws RegistryException {
+        try {
+            switch (type) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getAdvanceInputDataHandling();
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    return taskDetails.getAdvancedInputDataHandling();
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting input data handling..", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public AdvancedOutputDataHandling getOutputDataHandling(RegistryModelType type, String id) throws RegistryException {
+        try {
+            switch (type) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getAdvanceOutputDataHandling();
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    return taskDetails.getAdvancedOutputDataHandling();
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting output data handling...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public QualityOfServiceParams getQosParams(RegistryModelType type, String id) throws RegistryException {
+        try {
+            switch (type) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getQosParams();
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting qos params..", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public WorkflowNodeDetails getWorkflowNodeDetails(String nodeId) throws RegistryException {
+        try {
+            return experimentDao.getWFNode(nodeId);
+        } catch (Exception e) {
+            logger.error("Error while getting workflow node details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public WorkflowNodeStatus getWorkflowNodeStatus(String nodeId) throws RegistryException {
+        try {
+            WorkflowNodeDetails wfnd = experimentDao.getWFNode(nodeId);
+            return wfnd.getWorkflowNodeStatus();
+        } catch (Exception e) {
+            logger.error("Error while getting workflow node status..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public List<OutputDataObjectType> getNodeOutputs(String nodeId) throws RegistryException {
+        try {
+            WorkflowNodeDetails wfnd = experimentDao.getWFNode(nodeId);
+            return wfnd.getNodeOutputs();
+        } catch (Exception e) {
+            logger.error("Error while getting node outputs..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public TaskDetails getTaskDetails(String taskId) throws RegistryException {
+        try {
+            return experimentDao.getTaskDetail(taskId);
+        } catch (Exception e) {
+            logger.error("Error while getting task details..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public List<OutputDataObjectType> getApplicationOutputs(String taskId) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
+            return taskDetails.getApplicationOutputs();
+        } catch (Exception e) {
+            logger.error("Error while getting application outputs..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public TaskStatus getTaskStatus(String taskId) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
+            return taskDetails.getTaskStatus();
+        } catch (Exception e) {
+            logger.error("Error while getting experiment outputs..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    // ids contains task id + job id
+    public JobDetails getJobDetails(CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
+                    return jobDetails;
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Error while getting job details..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    // ids contains task id + job id
+    public JobStatus getJobStatus(CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
+                    return jobDetails.getJobStatus();
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Error while getting job status..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public ApplicationStatus getApplicationStatus(CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
+                    return jobDetails.getApplicationStatus();
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Error while getting application status..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public DataTransferDetails getDataTransferDetails(CompositeIdentifier cid) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String)cid.getTopLevelIdentifier());
+            for(DataTransferDetails dtd: taskDetails.getDataTransferDetailsList()){
+                if(dtd.getTransferId().equals(cid.getSecondLevelIdentifier())){
+                    return dtd;
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Error while getting data transfer details..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public TransferStatus getDataTransferStatus(CompositeIdentifier cid) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String)cid.getTopLevelIdentifier());
+            for(DataTransferDetails dtd: taskDetails.getDataTransferDetailsList()){
+                if(dtd.getTransferId().equals(cid.getSecondLevelIdentifier())){
+                    return dtd.getTransferStatus();
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Error while getting data transfer status..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public List<String> getExperimentIds(String fieldName, Object value) throws RegistryException {
+        List<String> expIDs = new ArrayList();
+        try {
+            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)
+                        || fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)
+                        || fieldName.equals(Constants.FieldConstants.ExperimentConstants.PROJECT_ID)) {
+                getExperimentList(fieldName, value).stream().forEach(ex->expIDs.add(ex.getExperimentId()));
+                return expIDs;
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving experiment ids..", e);
+            throw new RegistryException(e);
+        }
+        return expIDs;
+    }
+
+    public List<String> getWorkflowNodeIds(String fieldName, Object value) throws RegistryException {
+        List<String> wfIds = new ArrayList();
+        List<WorkflowNodeDetails> wfNodeDetails = getWFNodeDetails(fieldName, value);
+        wfIds.addAll(wfNodeDetails.stream().map(WorkflowNodeDetails::getNodeInstanceId).collect(Collectors.toList()));
+        return wfIds;
+    }
+
+    public List<String> getTaskDetailIds(String fieldName, Object value) throws RegistryException {
+        List<String> taskDetailIds = new ArrayList();
+        List<TaskDetails> taskDetails = getTaskDetails(fieldName, value);
+        taskDetailIds.addAll(taskDetails.stream().map(TaskDetails::getTaskId).collect(Collectors.toList()));
+        return taskDetailIds;
+    }
+
+    public List<String> getJobDetailIds(String fieldName, Object value) throws RegistryException {
+        List<String> jobIds = new ArrayList<String>();
+        List<JobDetails> jobDetails = getJobDetails(fieldName, value);
+        jobIds.addAll(jobDetails.stream().map(JobDetails::getJobId).collect(Collectors.toList()));
+        return jobIds;
+    }
+
+    public List<String> getTransferDetailIds(String fieldName, Object value) throws RegistryException {
+        List<String> transferIds = new ArrayList<String>();
+        List<DataTransferDetails> dataTransferDetails = getDataTransferDetails(fieldName, value);
+        transferIds.addAll(dataTransferDetails.stream().map(DataTransferDetails::getTransferId).collect(Collectors.toList()));
+        return transferIds;
+    }
+
+    public void removeExperiment(String experimentId) throws RegistryException {
+        try {
+            Experiment experiment = new Experiment();
+            experiment.setExperimentId(experimentId);
+            experimentDao.deleteExperiment(experiment);
+        } catch (Exception e) {
+            logger.error("Error while removing experiment..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeExperimentConfigData(String experimentId) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(experimentId);
+            experiment.setUserConfigurationData(null);
+            experimentDao.updateExperiment(experiment);
+        } catch (Exception e) {
+            logger.error("Error while removing experiment config..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeWorkflowNode(String nodeId) throws RegistryException {
+        try {
+            WorkflowNodeDetails wfnd = new WorkflowNodeDetails();
+            wfnd.setNodeInstanceId(nodeId);
+            experimentDao.deleteWFNode(wfnd);
+        } catch (Exception e) {
+            logger.error("Error while removing workflow node..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeTaskDetails(String taskId) throws RegistryException {
+        try {
+            TaskDetails taskDetails = new TaskDetails();
+            taskDetails.setTaskId(taskId);
+            experimentDao.deleteTaskDetail(taskDetails);
+        } catch (Exception e) {
+            logger.error("Error while removing task details..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeJobDetails(CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
+                    taskDetails.getJobDetailsList().remove(jobDetails);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    return;
+                }
+            }
+        } catch (Exception e) {
+            logger.error("Error while removing job details..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeDataTransferDetails(CompositeIdentifier cid) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String)cid.getTopLevelIdentifier());
+            for(DataTransferDetails dtd: taskDetails.getDataTransferDetailsList()){
+                if(dtd.getTransferId().equals(cid.getSecondLevelIdentifier())){
+                    taskDetails.getDataTransferDetailsList().remove(dtd);
+                    experimentDao.updateTaskDetail(taskDetails);
+                }
+            }
+        } catch (Exception e) {
+            logger.error("Error while removing transfer details..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeComputationalScheduling(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            switch (dataType) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    experiment.getUserConfigurationData().setComputationalResourceScheduling(null);
+                    experimentDao.updateExperiment(experiment);
+                    return;
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    taskDetails.setTaskScheduling(null);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    break;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while removing scheduling data..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeInputDataHandling(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            switch (dataType) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    experiment.getUserConfigurationData().setAdvanceInputDataHandling(null);
+                    experimentDao.updateExperiment(experiment);
+                    break;
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    taskDetails.setAdvancedInputDataHandling(null);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    break;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while removing input data handling..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeOutputDataHandling(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            switch (dataType) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    experiment.getUserConfigurationData().setAdvanceOutputDataHandling(null);
+                    experimentDao.updateExperiment(experiment);
+                    break;
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    taskDetails.setAdvancedOutputDataHandling(null);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    break;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while removing output data handling..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeQOSParams(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            switch (dataType) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    experiment.getUserConfigurationData().setQosParams(null);
+                    experimentDao.updateExperiment(experiment);
+                    break;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while removing QOS params", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isExperimentExist(String expID) throws RegistryException {
+        try {
+            return experimentDao.getExperiment(expID) != null;
+        } catch (Exception e) {
+            logger.error("Error while retrieving experiment...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isExperimentConfigDataExist(String expID) throws RegistryException {
+        try {
+            return experimentDao.getExperiment(expID).getUserConfigurationData() != null;
+        } catch (Exception e) {
+            logger.error("Error while retrieving experiment...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isWFNodeExist(String nodeId) throws RegistryException {
+        try {
+            return experimentDao.getWFNode(nodeId) != null;
+        } catch (Exception e) {
+            logger.error("Error while retrieving workflow...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isTaskDetailExist(String taskId) throws RegistryException {
+        try {
+            return experimentDao.getTaskDetail(taskId) != null;
+        } catch (Exception e) {
+            logger.error("Error while retrieving task.....", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isJobDetailExist(CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
+                    return true;
+                }
+            }
+            return false;
+        } catch (Exception e) {
+            logger.error("Error while retrieving job details.....", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isTransferDetailExist(CompositeIdentifier cid) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) cid.getTopLevelIdentifier());
+            for (DataTransferDetails dtd : taskDetails.getDataTransferDetailsList()) {
+                if (dtd.getTransferId().equals(cid.getSecondLevelIdentifier())) {
+                    return true;
+                }
+            }
+            return false;
+        } catch (Exception e) {
+            logger.error("Error while retrieving transfer details.....", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isComputationalSchedulingExist(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            Experiment experiment;
+            switch (dataType) {
+                case EXPERIMENT:
+                    experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getComputationalResourceScheduling() != null;
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    return taskDetails.getTaskScheduling() != null;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving scheduling data.....", e);
+            throw new RegistryException(e);
+        }
+        return false;
+    }
+
+    public boolean isInputDataHandlingExist(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            Experiment experiment;
+            switch (dataType) {
+                case EXPERIMENT:
+                    experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getAdvanceInputDataHandling() != null;
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    return taskDetails.getAdvancedInputDataHandling() != null;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving input data handling.....", e);
+            throw new RegistryException(e);
+        }
+        return false;
+    }
+
+    public boolean isOutputDataHandlingExist(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            Experiment experiment;
+            switch (dataType) {
+                case EXPERIMENT:
+                    experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getAdvanceOutputDataHandling() != null;
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    return taskDetails.getAdvancedOutputDataHandling() != null;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving output data handling..", e);
+            throw new RegistryException(e);
+        }
+        return false;
+    }
+
+    public boolean isQOSParamsExist(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            Experiment experiment;
+            switch (dataType) {
+                case EXPERIMENT:
+                    experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getQosParams() != null;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving qos params..", e);
+            throw new RegistryException(e);
+        }
+        return false;
+    }
+
+    public void updateScheduling(ComputationalResourceScheduling scheduling, String id, String type) throws RegistryException {
+        try {
+            if (type.equals(RegistryModelType.EXPERIMENT.toString())) {
+                Experiment experiment = experimentDao.getExperiment(id);
+                experiment.getUserConfigurationData().setComputationalResourceScheduling(scheduling);
+                experimentDao.updateExperiment(experiment);
+                return;
+            } else if (type.equals(RegistryModelType.TASK_DETAIL.toString())) {
+                TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                taskDetails.setTaskScheduling(scheduling);
+                experimentDao.updateTaskDetail(taskDetails);
+                return;
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating scheduling..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateInputDataHandling(AdvancedInputDataHandling dataHandling, String id, String type) throws RegistryException {
+        try {
+            if (type.equals(RegistryModelType.EXPERIMENT.toString())) {
+                Experiment experiment = experimentDao.getExperiment(id);
+                experiment.getUserConfigurationData().setAdvanceInputDataHandling(dataHandling);
+                experimentDao.updateExperiment(experiment);
+                return;
+            } else if (type.equals(RegistryModelType.TASK_DETAIL.toString())) {
+                TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                taskDetails.setAdvancedInputDataHandling(dataHandling);
+                experimentDao.updateTaskDetail(taskDetails);
+                return;
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating input data handling..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateOutputDataHandling(AdvancedOutputDataHandling dataHandling, String id, String type) throws RegistryException {
+        try {
+            if (type.equals(RegistryModelType.EXPERIMENT.toString())) {
+                Experiment experiment = experimentDao.getExperiment(id);
+                experiment.getUserConfigurationData().setAdvanceOutputDataHandling(dataHandling);
+                experimentDao.updateExperiment(experiment);
+                return;
+            } else if (type.equals(RegistryModelType.TASK_DETAIL.toString())) {
+                TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                taskDetails.setAdvancedOutputDataHandling(dataHandling);
+                experimentDao.updateTaskDetail(taskDetails);
+                return;
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating output data handling", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateQOSParams(QualityOfServiceParams params, String id, String type) throws RegistryException {
+        try {
+            if (type.equals(RegistryModelType.EXPERIMENT.toString())) {
+                Experiment experiment = experimentDao.getExperiment(id);
+                experiment.getUserConfigurationData().setQosParams(params);
+                experimentDao.updateExperiment(experiment);
+            } else {
+                logger.error("Unsupported data type... " + type);
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating QOS data..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public List<ExperimentSummary> searchExperiments(Map<String, String> filters, int limit,
+            int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+        List<Experiment> experimentList = experimentDao.searchExperiments(
+                filters, limit, offset, orderByIdentifier, resultOrderType);
+        List<ExperimentSummary> experimentSummaries = new ArrayList();
+        experimentList.stream().forEach(experiment->{
+            ExperimentSummary expSummary = new ExperimentSummary();
+            expSummary.setExperimentId(experiment.getExperimentId());
+            expSummary.setProjectId(experiment.getProjectId());
+            expSummary.setName(experiment.getName());
+            expSummary.setDescription(experiment.getDescription());
+            expSummary.setUserName(experiment.getUserName());
+            expSummary.setCreationTime(experiment.getCreationTime());
+            expSummary.setApplicationId(experiment.getApplicationId());
+            expSummary.setExperimentStatus(experiment.getExperimentStatus());
+            expSummary.setErrors(experiment.getErrors());
+            experimentSummaries.add(expSummary);
+        });
+        return experimentSummaries;
+    }
+
+    private boolean isValidStatusTransition(ExperimentState oldState, ExperimentState nextState) {
+        if (nextState == null) {
+            return false;
+        }
+        switch (oldState) {
+            case CREATED:
+                return true;
+            case VALIDATED:
+                return nextState != ExperimentState.CREATED;
+            case SCHEDULED:
+                return nextState != ExperimentState.CREATED
+                        || nextState != ExperimentState.VALIDATED;
+            case LAUNCHED:
+                return nextState != ExperimentState.CREATED
+                        || nextState != ExperimentState.VALIDATED
+                        || nextState != ExperimentState.SCHEDULED;
+            case EXECUTING:
+                return nextState != ExperimentState.CREATED
+                        || nextState != ExperimentState.VALIDATED
+                        || nextState != ExperimentState.SCHEDULED
+                        || nextState != ExperimentState.LAUNCHED;
+
+            case CANCELING:
+                return nextState == ExperimentState.CANCELING
+                        || nextState == ExperimentState.CANCELED
+                        || nextState == ExperimentState.COMPLETED
+                        || nextState == ExperimentState.FAILED;
+            case CANCELED:
+                return nextState == ExperimentState.CANCELED;
+            case COMPLETED:
+                return nextState == ExperimentState.COMPLETED;
+            case FAILED:
+                return nextState == ExperimentState.FAILED;
+            //case SUSPENDED:  // We don't change state to SUSPEND
+            case UNKNOWN:
+                return true;
+            default:
+                return false;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/GatewayRepository.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/GatewayRepository.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/GatewayRepository.java
new file mode 100644
index 0000000..5dc4ce9
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/repository/GatewayRepository.java
@@ -0,0 +1,120 @@
+/*
+ *
+ * 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.persistance.registry.mongo.repository;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.persistance.registry.mongo.dao.GatewayDao;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+
+public class GatewayRepository {
+
+    private final static Logger logger = LoggerFactory.getLogger(GatewayRepository.class);
+
+    private GatewayDao gatewayDao;
+
+    public GatewayRepository(){
+        this.gatewayDao = new GatewayDao();
+    }
+
+    public Gateway getDefaultGateway () throws ApplicationSettingsException, RegistryException {
+        return gatewayDao.getGatewayByName(ServerSettings.getDefaultUserGateway());
+    }
+
+    public Gateway getExistingGateway (String gatewayName) throws RegistryException {
+        return gatewayDao.getGatewayByName(gatewayName);
+    }
+
+    public String addGateway(Gateway gateway) throws RegistryException{
+        try {
+            gatewayDao.createGateway(gateway);
+            return gateway.getGatewayId();
+        }catch (RegistryException e){
+            logger.error("Error while saving gateway to registry", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateGateway (String gatewayId, Gateway updatedGateway) throws RegistryException{
+        try {
+            updatedGateway.setGatewayId(gatewayId);
+            gatewayDao.updateGateway(updatedGateway);
+        }catch (RegistryException e){
+            logger.error("Error while updating gateway to registry", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public Gateway getGateway (String gatewayId) throws RegistryException{
+        try {
+            return gatewayDao.getGateway(gatewayId);
+        }catch (RegistryException e){
+            logger.error("Error while getting gateway", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isGatewayExists (String gatewayId) throws RegistryException{
+        try {
+            return gatewayDao.getGateway(gatewayId) != null;
+        }catch (RegistryException e){
+            logger.error("Error while getting gateway", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isGatewayExist (String gatewayId) throws RegistryException{
+        try {
+            return gatewayDao.getGateway(gatewayId) != null;
+        }catch (RegistryException e){
+            logger.error("Error while checking gateway exists", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean removeGateway (String gatewayId) throws RegistryException{
+        try {
+            Gateway gateway = new Gateway();
+            gateway.setGatewayId(gatewayId);
+            gatewayDao.deleteGateway(gateway);
+            return true;
+        }catch (Exception e){
+            logger.error("Error while removing the gateway", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public List<Gateway> getAllGateways () throws RegistryException {
+        try {
+            return gatewayDao.getAllGateways();
+        }catch (Exception e){
+            logger.error("Error while getting all the gateways", e);
+            throw new RegistryException(e);
+        }
+    }
+
+}


[06/44] airavata git commit: Changing the thrift model variable names to lower camel case

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/workspace/experiment/ttypes.py
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/workspace/experiment/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/workspace/experiment/ttypes.py
index 3ffe2b2..18bb67b 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/workspace/experiment/ttypes.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/workspace/experiment/ttypes.py
@@ -774,7 +774,7 @@ class ComputationalResourceScheduling:
 
   Attributes:
    - resourceHostId
-   - totalCPUCount
+   - totalCpuCount
    - nodeCount
    - numberOfThreads
    - queueName
@@ -788,7 +788,7 @@ class ComputationalResourceScheduling:
   thrift_spec = (
     None, # 0
     (1, TType.STRING, 'resourceHostId', None, None, ), # 1
-    (2, TType.I32, 'totalCPUCount', None, None, ), # 2
+    (2, TType.I32, 'totalCpuCount', None, None, ), # 2
     (3, TType.I32, 'nodeCount', None, None, ), # 3
     (4, TType.I32, 'numberOfThreads', None, None, ), # 4
     (5, TType.STRING, 'queueName', None, None, ), # 5
@@ -799,9 +799,9 @@ class ComputationalResourceScheduling:
     (10, TType.STRING, 'chassisName', None, None, ), # 10
   )
 
-  def __init__(self, resourceHostId=None, totalCPUCount=None, nodeCount=None, numberOfThreads=None, queueName=None, wallTimeLimit=None, jobStartTime=None, totalPhysicalMemory=None, computationalProjectAccount=None, chassisName=None,):
+  def __init__(self, resourceHostId=None, totalCpuCount=None, nodeCount=None, numberOfThreads=None, queueName=None, wallTimeLimit=None, jobStartTime=None, totalPhysicalMemory=None, computationalProjectAccount=None, chassisName=None,):
     self.resourceHostId = resourceHostId
-    self.totalCPUCount = totalCPUCount
+    self.totalCpuCount = totalCpuCount
     self.nodeCount = nodeCount
     self.numberOfThreads = numberOfThreads
     self.queueName = queueName
@@ -827,7 +827,7 @@ class ComputationalResourceScheduling:
           iprot.skip(ftype)
       elif fid == 2:
         if ftype == TType.I32:
-          self.totalCPUCount = iprot.readI32();
+          self.totalCpuCount = iprot.readI32();
         else:
           iprot.skip(ftype)
       elif fid == 3:
@@ -884,9 +884,9 @@ class ComputationalResourceScheduling:
       oprot.writeFieldBegin('resourceHostId', TType.STRING, 1)
       oprot.writeString(self.resourceHostId)
       oprot.writeFieldEnd()
-    if self.totalCPUCount is not None:
-      oprot.writeFieldBegin('totalCPUCount', TType.I32, 2)
-      oprot.writeI32(self.totalCPUCount)
+    if self.totalCpuCount is not None:
+      oprot.writeFieldBegin('totalCpuCount', TType.I32, 2)
+      oprot.writeI32(self.totalCpuCount)
       oprot.writeFieldEnd()
     if self.nodeCount is not None:
       oprot.writeFieldBegin('nodeCount', TType.I32, 3)
@@ -1227,7 +1227,7 @@ class UserConfigurationData:
    - advanceOutputDataHandling
    - qosParams
    - throttleResources
-   - userDN
+   - userDn
    - generateCert
   """
 
@@ -1241,11 +1241,11 @@ class UserConfigurationData:
     (6, TType.STRUCT, 'advanceOutputDataHandling', (AdvancedOutputDataHandling, AdvancedOutputDataHandling.thrift_spec), None, ), # 6
     (7, TType.STRUCT, 'qosParams', (QualityOfServiceParams, QualityOfServiceParams.thrift_spec), None, ), # 7
     (8, TType.BOOL, 'throttleResources', None, False, ), # 8
-    (9, TType.STRING, 'userDN', None, None, ), # 9
+    (9, TType.STRING, 'userDn', None, None, ), # 9
     (10, TType.BOOL, 'generateCert', None, False, ), # 10
   )
 
-  def __init__(self, airavataAutoSchedule=thrift_spec[1][4], overrideManualScheduledParams=thrift_spec[2][4], shareExperimentPublicly=thrift_spec[3][4], computationalResourceScheduling=None, advanceInputDataHandling=None, advanceOutputDataHandling=None, qosParams=None, throttleResources=thrift_spec[8][4], userDN=None, generateCert=thrift_spec[10][4],):
+  def __init__(self, airavataAutoSchedule=thrift_spec[1][4], overrideManualScheduledParams=thrift_spec[2][4], shareExperimentPublicly=thrift_spec[3][4], computationalResourceScheduling=None, advanceInputDataHandling=None, advanceOutputDataHandling=None, qosParams=None, throttleResources=thrift_spec[8][4], userDn=None, generateCert=thrift_spec[10][4],):
     self.airavataAutoSchedule = airavataAutoSchedule
     self.overrideManualScheduledParams = overrideManualScheduledParams
     self.shareExperimentPublicly = shareExperimentPublicly
@@ -1254,7 +1254,7 @@ class UserConfigurationData:
     self.advanceOutputDataHandling = advanceOutputDataHandling
     self.qosParams = qosParams
     self.throttleResources = throttleResources
-    self.userDN = userDN
+    self.userDn = userDn
     self.generateCert = generateCert
 
   def read(self, iprot):
@@ -1312,7 +1312,7 @@ class UserConfigurationData:
           iprot.skip(ftype)
       elif fid == 9:
         if ftype == TType.STRING:
-          self.userDN = iprot.readString();
+          self.userDn = iprot.readString();
         else:
           iprot.skip(ftype)
       elif fid == 10:
@@ -1362,9 +1362,9 @@ class UserConfigurationData:
       oprot.writeFieldBegin('throttleResources', TType.BOOL, 8)
       oprot.writeBool(self.throttleResources)
       oprot.writeFieldEnd()
-    if self.userDN is not None:
-      oprot.writeFieldBegin('userDN', TType.STRING, 9)
-      oprot.writeString(self.userDN)
+    if self.userDn is not None:
+      oprot.writeFieldBegin('userDn', TType.STRING, 9)
+      oprot.writeString(self.userDn)
       oprot.writeFieldEnd()
     if self.generateCert is not None:
       oprot.writeFieldBegin('generateCert', TType.BOOL, 10)
@@ -1395,7 +1395,7 @@ class UserConfigurationData:
 class ErrorDetails:
   """
   Attributes:
-   - errorID
+   - errorId
    - creationTime
    - actualErrorMessage
    - userFriendlyMessage
@@ -1408,7 +1408,7 @@ class ErrorDetails:
 
   thrift_spec = (
     None, # 0
-    (1, TType.STRING, 'errorID', None, "DO_NOT_SET_AT_CLIENTS", ), # 1
+    (1, TType.STRING, 'errorId', None, "DO_NOT_SET_AT_CLIENTS", ), # 1
     (2, TType.I64, 'creationTime', None, None, ), # 2
     (3, TType.STRING, 'actualErrorMessage', None, None, ), # 3
     (4, TType.STRING, 'userFriendlyMessage', None, None, ), # 4
@@ -1419,8 +1419,8 @@ class ErrorDetails:
     (9, TType.LIST, 'rootCauseErrorIdList', (TType.STRING,None), None, ), # 9
   )
 
-  def __init__(self, errorID=thrift_spec[1][4], creationTime=None, actualErrorMessage=None, userFriendlyMessage=None, errorCategory=None, transientOrPersistent=thrift_spec[6][4], correctiveAction=None, actionableGroup=None, rootCauseErrorIdList=None,):
-    self.errorID = errorID
+  def __init__(self, errorId=thrift_spec[1][4], creationTime=None, actualErrorMessage=None, userFriendlyMessage=None, errorCategory=None, transientOrPersistent=thrift_spec[6][4], correctiveAction=None, actionableGroup=None, rootCauseErrorIdList=None,):
+    self.errorId = errorId
     self.creationTime = creationTime
     self.actualErrorMessage = actualErrorMessage
     self.userFriendlyMessage = userFriendlyMessage
@@ -1441,7 +1441,7 @@ class ErrorDetails:
         break
       if fid == 1:
         if ftype == TType.STRING:
-          self.errorID = iprot.readString();
+          self.errorId = iprot.readString();
         else:
           iprot.skip(ftype)
       elif fid == 2:
@@ -1499,9 +1499,9 @@ class ErrorDetails:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
     oprot.writeStructBegin('ErrorDetails')
-    if self.errorID is not None:
-      oprot.writeFieldBegin('errorID', TType.STRING, 1)
-      oprot.writeString(self.errorID)
+    if self.errorId is not None:
+      oprot.writeFieldBegin('errorId', TType.STRING, 1)
+      oprot.writeString(self.errorId)
       oprot.writeFieldEnd()
     if self.creationTime is not None:
       oprot.writeFieldBegin('creationTime', TType.I64, 2)
@@ -1542,8 +1542,8 @@ class ErrorDetails:
     oprot.writeStructEnd()
 
   def validate(self):
-    if self.errorID is None:
-      raise TProtocol.TProtocolException(message='Required field errorID is unset!')
+    if self.errorId is None:
+      raise TProtocol.TProtocolException(message='Required field errorId is unset!')
     return
 
 
@@ -1561,7 +1561,7 @@ class ErrorDetails:
 class JobDetails:
   """
   Attributes:
-   - jobID
+   - jobId
    - jobDescription
    - creationTime
    - jobStatus
@@ -1574,7 +1574,7 @@ class JobDetails:
 
   thrift_spec = (
     None, # 0
-    (1, TType.STRING, 'jobID', None, "DO_NOT_SET_AT_CLIENTS", ), # 1
+    (1, TType.STRING, 'jobId', None, "DO_NOT_SET_AT_CLIENTS", ), # 1
     (2, TType.STRING, 'jobDescription', None, None, ), # 2
     (3, TType.I64, 'creationTime', None, None, ), # 3
     (4, TType.STRUCT, 'jobStatus', (JobStatus, JobStatus.thrift_spec), None, ), # 4
@@ -1585,8 +1585,8 @@ class JobDetails:
     (9, TType.STRING, 'workingDir', None, None, ), # 9
   )
 
-  def __init__(self, jobID=thrift_spec[1][4], jobDescription=None, creationTime=None, jobStatus=None, applicationStatus=None, errors=None, computeResourceConsumed=None, jobName=None, workingDir=None,):
-    self.jobID = jobID
+  def __init__(self, jobId=thrift_spec[1][4], jobDescription=None, creationTime=None, jobStatus=None, applicationStatus=None, errors=None, computeResourceConsumed=None, jobName=None, workingDir=None,):
+    self.jobId = jobId
     self.jobDescription = jobDescription
     self.creationTime = creationTime
     self.jobStatus = jobStatus
@@ -1607,7 +1607,7 @@ class JobDetails:
         break
       if fid == 1:
         if ftype == TType.STRING:
-          self.jobID = iprot.readString();
+          self.jobId = iprot.readString();
         else:
           iprot.skip(ftype)
       elif fid == 2:
@@ -1668,9 +1668,9 @@ class JobDetails:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
     oprot.writeStructBegin('JobDetails')
-    if self.jobID is not None:
-      oprot.writeFieldBegin('jobID', TType.STRING, 1)
-      oprot.writeString(self.jobID)
+    if self.jobId is not None:
+      oprot.writeFieldBegin('jobId', TType.STRING, 1)
+      oprot.writeString(self.jobId)
       oprot.writeFieldEnd()
     if self.jobDescription is not None:
       oprot.writeFieldBegin('jobDescription', TType.STRING, 2)
@@ -1711,8 +1711,8 @@ class JobDetails:
     oprot.writeStructEnd()
 
   def validate(self):
-    if self.jobID is None:
-      raise TProtocol.TProtocolException(message='Required field jobID is unset!')
+    if self.jobId is None:
+      raise TProtocol.TProtocolException(message='Required field jobId is unset!')
     if self.jobDescription is None:
       raise TProtocol.TProtocolException(message='Required field jobDescription is unset!')
     return
@@ -1732,7 +1732,7 @@ class JobDetails:
 class DataTransferDetails:
   """
   Attributes:
-   - transferID
+   - transferId
    - creationTime
    - transferDescription
    - transferStatus
@@ -1740,14 +1740,14 @@ class DataTransferDetails:
 
   thrift_spec = (
     None, # 0
-    (1, TType.STRING, 'transferID', None, "DO_NOT_SET_AT_CLIENTS", ), # 1
+    (1, TType.STRING, 'transferId', None, "DO_NOT_SET_AT_CLIENTS", ), # 1
     (2, TType.I64, 'creationTime', None, None, ), # 2
     (3, TType.STRING, 'transferDescription', None, None, ), # 3
     (4, TType.STRUCT, 'transferStatus', (TransferStatus, TransferStatus.thrift_spec), None, ), # 4
   )
 
-  def __init__(self, transferID=thrift_spec[1][4], creationTime=None, transferDescription=None, transferStatus=None,):
-    self.transferID = transferID
+  def __init__(self, transferId=thrift_spec[1][4], creationTime=None, transferDescription=None, transferStatus=None,):
+    self.transferId = transferId
     self.creationTime = creationTime
     self.transferDescription = transferDescription
     self.transferStatus = transferStatus
@@ -1763,7 +1763,7 @@ class DataTransferDetails:
         break
       if fid == 1:
         if ftype == TType.STRING:
-          self.transferID = iprot.readString();
+          self.transferId = iprot.readString();
         else:
           iprot.skip(ftype)
       elif fid == 2:
@@ -1792,9 +1792,9 @@ class DataTransferDetails:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
     oprot.writeStructBegin('DataTransferDetails')
-    if self.transferID is not None:
-      oprot.writeFieldBegin('transferID', TType.STRING, 1)
-      oprot.writeString(self.transferID)
+    if self.transferId is not None:
+      oprot.writeFieldBegin('transferId', TType.STRING, 1)
+      oprot.writeString(self.transferId)
       oprot.writeFieldEnd()
     if self.creationTime is not None:
       oprot.writeFieldBegin('creationTime', TType.I64, 2)
@@ -1812,8 +1812,8 @@ class DataTransferDetails:
     oprot.writeStructEnd()
 
   def validate(self):
-    if self.transferID is None:
-      raise TProtocol.TProtocolException(message='Required field transferID is unset!')
+    if self.transferId is None:
+      raise TProtocol.TProtocolException(message='Required field transferId is unset!')
     if self.transferDescription is None:
       raise TProtocol.TProtocolException(message='Required field transferDescription is unset!')
     return
@@ -1838,7 +1838,7 @@ class TaskDetails:
 
 
   Attributes:
-   - taskID
+   - taskId
    - creationTime
    - applicationId
    - applicationVersion
@@ -1858,7 +1858,7 @@ class TaskDetails:
 
   thrift_spec = (
     None, # 0
-    (1, TType.STRING, 'taskID', None, "DO_NOT_SET_AT_CLIENTS", ), # 1
+    (1, TType.STRING, 'taskId', None, "DO_NOT_SET_AT_CLIENTS", ), # 1
     (2, TType.I64, 'creationTime', None, None, ), # 2
     (3, TType.STRING, 'applicationId', None, None, ), # 3
     (4, TType.STRING, 'applicationVersion', None, None, ), # 4
@@ -1876,8 +1876,8 @@ class TaskDetails:
     (16, TType.LIST, 'emailAddresses', (TType.STRING,None), None, ), # 16
   )
 
-  def __init__(self, taskID=thrift_spec[1][4], creationTime=None, applicationId=None, applicationVersion=None, applicationDeploymentId=None, applicationInputs=None, applicationOutputs=None, taskScheduling=None, advancedInputDataHandling=None, advancedOutputDataHandling=None, taskStatus=None, jobDetailsList=None, dataTransferDetailsList=None, errors=None, enableEmailNotification=None, emailAddresses=None,):
-    self.taskID = taskID
+  def __init__(self, taskId=thrift_spec[1][4], creationTime=None, applicationId=None, applicationVersion=None, applicationDeploymentId=None, applicationInputs=None, applicationOutputs=None, taskScheduling=None, advancedInputDataHandling=None, advancedOutputDataHandling=None, taskStatus=None, jobDetailsList=None, dataTransferDetailsList=None, errors=None, enableEmailNotification=None, emailAddresses=None,):
+    self.taskId = taskId
     self.creationTime = creationTime
     self.applicationId = applicationId
     self.applicationVersion = applicationVersion
@@ -1905,7 +1905,7 @@ class TaskDetails:
         break
       if fid == 1:
         if ftype == TType.STRING:
-          self.taskID = iprot.readString();
+          self.taskId = iprot.readString();
         else:
           iprot.skip(ftype)
       elif fid == 2:
@@ -2032,9 +2032,9 @@ class TaskDetails:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
     oprot.writeStructBegin('TaskDetails')
-    if self.taskID is not None:
-      oprot.writeFieldBegin('taskID', TType.STRING, 1)
-      oprot.writeString(self.taskID)
+    if self.taskId is not None:
+      oprot.writeFieldBegin('taskId', TType.STRING, 1)
+      oprot.writeString(self.taskId)
       oprot.writeFieldEnd()
     if self.creationTime is not None:
       oprot.writeFieldBegin('creationTime', TType.I64, 2)
@@ -2118,8 +2118,8 @@ class TaskDetails:
     oprot.writeStructEnd()
 
   def validate(self):
-    if self.taskID is None:
-      raise TProtocol.TProtocolException(message='Required field taskID is unset!')
+    if self.taskId is None:
+      raise TProtocol.TProtocolException(message='Required field taskId is unset!')
     return
 
 
@@ -2531,8 +2531,8 @@ class Experiment:
      The verbose description of the experiment. This is an optional parameter.
 
   Attributes:
-   - experimentID
-   - projectID
+   - experimentId
+   - projectId
    - creationTime
    - userName
    - name
@@ -2556,8 +2556,8 @@ class Experiment:
 
   thrift_spec = (
     None, # 0
-    (1, TType.STRING, 'experimentID', None, "DO_NOT_SET_AT_CLIENTS", ), # 1
-    (2, TType.STRING, 'projectID', None, "DEFAULT", ), # 2
+    (1, TType.STRING, 'experimentId', None, "DO_NOT_SET_AT_CLIENTS", ), # 1
+    (2, TType.STRING, 'projectId', None, "DEFAULT", ), # 2
     (3, TType.I64, 'creationTime', None, None, ), # 3
     (4, TType.STRING, 'userName', None, None, ), # 4
     (5, TType.STRING, 'name', None, None, ), # 5
@@ -2579,9 +2579,9 @@ class Experiment:
     (21, TType.LIST, 'errors', (TType.STRUCT,(ErrorDetails, ErrorDetails.thrift_spec)), None, ), # 21
   )
 
-  def __init__(self, experimentID=thrift_spec[1][4], projectID=thrift_spec[2][4], creationTime=None, userName=None, name=None, description=None, applicationId=None, applicationVersion=None, workflowTemplateId=None, workflowTemplateVersion=None, gatewayExecutionId=None, enableEmailNotification=None, emailAddresses=None, userConfigurationData=None, workflowExecutionInstanceId=None, experimentInputs=None, experimentOutputs=None, experimentStatus=None, stateChangeList=None, workflowNodeDetailsList=None, errors=None,):
-    self.experimentID = experimentID
-    self.projectID = projectID
+  def __init__(self, experimentId=thrift_spec[1][4], projectId=thrift_spec[2][4], creationTime=None, userName=None, name=None, description=None, applicationId=None, applicationVersion=None, workflowTemplateId=None, workflowTemplateVersion=None, gatewayExecutionId=None, enableEmailNotification=None, emailAddresses=None, userConfigurationData=None, workflowExecutionInstanceId=None, experimentInputs=None, experimentOutputs=None, experimentStatus=None, stateChangeList=None, workflowNodeDetailsList=None, errors=None,):
+    self.experimentId = experimentId
+    self.projectId = projectId
     self.creationTime = creationTime
     self.userName = userName
     self.name = name
@@ -2613,12 +2613,12 @@ class Experiment:
         break
       if fid == 1:
         if ftype == TType.STRING:
-          self.experimentID = iprot.readString();
+          self.experimentId = iprot.readString();
         else:
           iprot.skip(ftype)
       elif fid == 2:
         if ftype == TType.STRING:
-          self.projectID = iprot.readString();
+          self.projectId = iprot.readString();
         else:
           iprot.skip(ftype)
       elif fid == 3:
@@ -2763,13 +2763,13 @@ class Experiment:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
     oprot.writeStructBegin('Experiment')
-    if self.experimentID is not None:
-      oprot.writeFieldBegin('experimentID', TType.STRING, 1)
-      oprot.writeString(self.experimentID)
+    if self.experimentId is not None:
+      oprot.writeFieldBegin('experimentId', TType.STRING, 1)
+      oprot.writeString(self.experimentId)
       oprot.writeFieldEnd()
-    if self.projectID is not None:
-      oprot.writeFieldBegin('projectID', TType.STRING, 2)
-      oprot.writeString(self.projectID)
+    if self.projectId is not None:
+      oprot.writeFieldBegin('projectId', TType.STRING, 2)
+      oprot.writeString(self.projectId)
       oprot.writeFieldEnd()
     if self.creationTime is not None:
       oprot.writeFieldBegin('creationTime', TType.I64, 3)
@@ -2869,10 +2869,10 @@ class Experiment:
     oprot.writeStructEnd()
 
   def validate(self):
-    if self.experimentID is None:
-      raise TProtocol.TProtocolException(message='Required field experimentID is unset!')
-    if self.projectID is None:
-      raise TProtocol.TProtocolException(message='Required field projectID is unset!')
+    if self.experimentId is None:
+      raise TProtocol.TProtocolException(message='Required field experimentId is unset!')
+    if self.projectId is None:
+      raise TProtocol.TProtocolException(message='Required field projectId is unset!')
     if self.userName is None:
       raise TProtocol.TProtocolException(message='Required field userName is unset!')
     if self.name is None:
@@ -2894,8 +2894,8 @@ class Experiment:
 class ExperimentSummary:
   """
   Attributes:
-   - experimentID
-   - projectID
+   - experimentId
+   - projectId
    - creationTime
    - userName
    - name
@@ -2907,8 +2907,8 @@ class ExperimentSummary:
 
   thrift_spec = (
     None, # 0
-    (1, TType.STRING, 'experimentID', None, None, ), # 1
-    (2, TType.STRING, 'projectID', None, None, ), # 2
+    (1, TType.STRING, 'experimentId', None, None, ), # 1
+    (2, TType.STRING, 'projectId', None, None, ), # 2
     (3, TType.I64, 'creationTime', None, None, ), # 3
     (4, TType.STRING, 'userName', None, None, ), # 4
     (5, TType.STRING, 'name', None, None, ), # 5
@@ -2918,9 +2918,9 @@ class ExperimentSummary:
     (9, TType.LIST, 'errors', (TType.STRUCT,(ErrorDetails, ErrorDetails.thrift_spec)), None, ), # 9
   )
 
-  def __init__(self, experimentID=None, projectID=None, creationTime=None, userName=None, name=None, description=None, applicationId=None, experimentStatus=None, errors=None,):
-    self.experimentID = experimentID
-    self.projectID = projectID
+  def __init__(self, experimentId=None, projectId=None, creationTime=None, userName=None, name=None, description=None, applicationId=None, experimentStatus=None, errors=None,):
+    self.experimentId = experimentId
+    self.projectId = projectId
     self.creationTime = creationTime
     self.userName = userName
     self.name = name
@@ -2940,12 +2940,12 @@ class ExperimentSummary:
         break
       if fid == 1:
         if ftype == TType.STRING:
-          self.experimentID = iprot.readString();
+          self.experimentId = iprot.readString();
         else:
           iprot.skip(ftype)
       elif fid == 2:
         if ftype == TType.STRING:
-          self.projectID = iprot.readString();
+          self.projectId = iprot.readString();
         else:
           iprot.skip(ftype)
       elif fid == 3:
@@ -3000,13 +3000,13 @@ class ExperimentSummary:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
     oprot.writeStructBegin('ExperimentSummary')
-    if self.experimentID is not None:
-      oprot.writeFieldBegin('experimentID', TType.STRING, 1)
-      oprot.writeString(self.experimentID)
+    if self.experimentId is not None:
+      oprot.writeFieldBegin('experimentId', TType.STRING, 1)
+      oprot.writeString(self.experimentId)
       oprot.writeFieldEnd()
-    if self.projectID is not None:
-      oprot.writeFieldBegin('projectID', TType.STRING, 2)
-      oprot.writeString(self.projectID)
+    if self.projectId is not None:
+      oprot.writeFieldBegin('projectId', TType.STRING, 2)
+      oprot.writeString(self.projectId)
       oprot.writeFieldEnd()
     if self.creationTime is not None:
       oprot.writeFieldBegin('creationTime', TType.I64, 3)
@@ -3043,10 +3043,10 @@ class ExperimentSummary:
     oprot.writeStructEnd()
 
   def validate(self):
-    if self.experimentID is None:
-      raise TProtocol.TProtocolException(message='Required field experimentID is unset!')
-    if self.projectID is None:
-      raise TProtocol.TProtocolException(message='Required field projectID is unset!')
+    if self.experimentId is None:
+      raise TProtocol.TProtocolException(message='Required field experimentId is unset!')
+    if self.projectId is None:
+      raise TProtocol.TProtocolException(message='Required field projectId is unset!')
     if self.userName is None:
       raise TProtocol.TProtocolException(message='Required field userName is unset!')
     if self.name is None:

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/workspace/ttypes.py
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/workspace/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/workspace/ttypes.py
index 25d2fb0..97dbe6c 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/workspace/ttypes.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/workspace/ttypes.py
@@ -96,7 +96,7 @@ class Group:
 class Project:
   """
   Attributes:
-   - projectID
+   - projectId
    - owner
    - name
    - description
@@ -107,7 +107,7 @@ class Project:
 
   thrift_spec = (
     None, # 0
-    (1, TType.STRING, 'projectID', None, "DEFAULT", ), # 1
+    (1, TType.STRING, 'projectId', None, "DEFAULT", ), # 1
     (2, TType.STRING, 'owner', None, None, ), # 2
     (3, TType.STRING, 'name', None, None, ), # 3
     (4, TType.STRING, 'description', None, None, ), # 4
@@ -116,8 +116,8 @@ class Project:
     (7, TType.LIST, 'sharedGroups', (TType.STRING,None), None, ), # 7
   )
 
-  def __init__(self, projectID=thrift_spec[1][4], owner=None, name=None, description=None, creationTime=None, sharedUsers=None, sharedGroups=None,):
-    self.projectID = projectID
+  def __init__(self, projectId=thrift_spec[1][4], owner=None, name=None, description=None, creationTime=None, sharedUsers=None, sharedGroups=None,):
+    self.projectId = projectId
     self.owner = owner
     self.name = name
     self.description = description
@@ -136,7 +136,7 @@ class Project:
         break
       if fid == 1:
         if ftype == TType.STRING:
-          self.projectID = iprot.readString();
+          self.projectId = iprot.readString();
         else:
           iprot.skip(ftype)
       elif fid == 2:
@@ -189,9 +189,9 @@ class Project:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
     oprot.writeStructBegin('Project')
-    if self.projectID is not None:
-      oprot.writeFieldBegin('projectID', TType.STRING, 1)
-      oprot.writeString(self.projectID)
+    if self.projectId is not None:
+      oprot.writeFieldBegin('projectId', TType.STRING, 1)
+      oprot.writeString(self.projectId)
       oprot.writeFieldEnd()
     if self.owner is not None:
       oprot.writeFieldBegin('owner', TType.STRING, 2)
@@ -227,8 +227,8 @@ class Project:
     oprot.writeStructEnd()
 
   def validate(self):
-    if self.projectID is None:
-      raise TProtocol.TProtocolException(message='Required field projectID is unset!')
+    if self.projectId is None:
+      raise TProtocol.TProtocolException(message='Required field projectId is unset!')
     if self.owner is None:
       raise TProtocol.TProtocolException(message='Required field owner is unset!')
     if self.name is None:

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CancelExperiments.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CancelExperiments.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CancelExperiments.java
index 8d41295..bd8fc37 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CancelExperiments.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CancelExperiments.java
@@ -49,7 +49,7 @@ public class CancelExperiments {
             String expeId = "echoExperiment_31c132fd-87ea-4781-803c-ae5f04a79baf";
             terminateExperiment(client,expeId);
 
-//            System.out.println("retrieved exp id : " + experiment.getExperimentID());
+//            System.out.println("retrieved exp id : " + experiment.getExperimentId());
         } catch (Exception e) {
             logger.error("Error while connecting with server", e.getMessage());
             e.printStackTrace();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchBES.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchBES.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchBES.java
index 44ebfc7..ec5a3f9 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchBES.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchBES.java
@@ -147,7 +147,7 @@ public class CreateLaunchBES {
             Thread.sleep(10000);
             for (String exId : experimentIds) {
                 Experiment experiment = airavataClient.getExperiment(exId);
-                System.out.println(experiment.getExperimentID() + " " + experiment.getExperimentStatus().getExperimentState().name());
+                System.out.println(experiment.getExperimentId() + " " + experiment.getExperimentStatus().getExperimentState().name());
             }
 
 
@@ -252,7 +252,7 @@ public class CreateLaunchBES {
                         userConfigurationData.setComputationalResourceScheduling(scheduling);
                         
                         userConfigurationData.setGenerateCert(false);
-                        userConfigurationData.setUserDN("");
+                        userConfigurationData.setUserDn("");
 
                         // set output directory 
                         AdvancedOutputDataHandling dataHandling = new AdvancedOutputDataHandling();
@@ -324,7 +324,7 @@ public class CreateLaunchBES {
                         userConfigurationData.setComputationalResourceScheduling(scheduling);
                         
                         userConfigurationData.setGenerateCert(true);
-                        userConfigurationData.setUserDN("CN=m.memon, O=Ultrascan Gateway, C=DE");
+                        userConfigurationData.setUserDn("CN=m.memon, O=Ultrascan Gateway, C=DE");
 
                         // set output directory 
                         AdvancedOutputDataHandling dataHandling = new AdvancedOutputDataHandling();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index ed85238..a616613 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -209,7 +209,7 @@ public class CreateLaunchExperiment {
                             &&!experiment.getExperimentStatus().getExperimentState().equals(ExperimentState.CANCELED)){
                         allNotFinished = true;
                     }
-                    System.out.println(experiment.getExperimentID() + " " + experiment.getExperimentStatus().getExperimentState().name());
+                    System.out.println(experiment.getExperimentId() + " " + experiment.getExperimentStatus().getExperimentState().name());
                 }
                 System.out.println("----------------------------------------------------");
                 Thread.sleep(10000);
@@ -348,7 +348,7 @@ public class CreateLaunchExperiment {
                         userConfigurationData.setComputationalResourceScheduling(scheduling);
                         
                         userConfigurationData.setGenerateCert(false);
-                        userConfigurationData.setUserDN("");
+                        userConfigurationData.setUserDn("");
 
                         // set output directory 
                         AdvancedOutputDataHandling dataHandling = new AdvancedOutputDataHandling();
@@ -405,7 +405,7 @@ public class CreateLaunchExperiment {
                         userConfigurationData.setComputationalResourceScheduling(scheduling);
                         
                         userConfigurationData.setGenerateCert(false);
-                        userConfigurationData.setUserDN("");
+                        userConfigurationData.setUserDn("");
 
                         // set output directory 
                         AdvancedOutputDataHandling dataHandling = new AdvancedOutputDataHandling();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java
index bf82ed3..5b6e411 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperimentUS3.java
@@ -103,7 +103,7 @@ public class CreateLaunchExperimentUS3 {
 //            airavata.terminateExperiment(expId);
      
 //            Experiment experiment = airavata.getExperiment(expId);
-//            System.out.println("retrieved exp id : " + experiment.getExperimentID());
+//            System.out.println("retrieved exp id : " + experiment.getExperimentId());
         } catch (Exception e) {
             logger.error("Error while connecting with server", e.getMessage());
             e.printStackTrace();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/TestCreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/TestCreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/TestCreateLaunchExperiment.java
index 8cfbd65..0dc422c 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/TestCreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/TestCreateLaunchExperiment.java
@@ -57,14 +57,14 @@ public class TestCreateLaunchExperiment {
 
             List<JobDetails> jobDetailsList = getJobDetails(airavata, "echoExperiment_14a83cee-5611-4e37-b90c-4444d28359b6");
             for (JobDetails job : jobDetailsList){
-//                System.out.println(experimentSummary.getExperimentID());
+//                System.out.println(experimentSummary.getExperimentId());
                 System.out.println("job description : " + job.getJobDescription());
 //                System.out.println(experimentSummary.getExperimentStatus().getExperimentState().toString());
             }
 
             List<DataTransferDetails> dataTransferDetails = getDataTransferDetails(airavata, "echoExperiment_6c32f45d-7755-4d1f-9915-69b9a6972770");
             for (DataTransferDetails dt : dataTransferDetails){
-//                System.out.println(experimentSummary.getExperimentID());
+//                System.out.println(experimentSummary.getExperimentId());
                 System.out.println("data transfer description "  + dt.getTransferDescription());
 //                System.out.println(experimentSummary.getExperimentStatus().getExperimentState().toString());
             }
@@ -82,7 +82,7 @@ public class TestCreateLaunchExperiment {
 //            List<Experiment> experiments = getExperimentsForUser(airavata, "admin");
 //            System.out.println("Experiment count : " + experiments.size());
 //            for (Experiment ex : experiments){
-//                System.out.println(ex.getExperimentID());
+//                System.out.println(ex.getExperimentId());
 //            }
 
         } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Project.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Project.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Project.java
index 230ec0a..0e8d077 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Project.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Project.java
@@ -52,7 +52,7 @@ import org.slf4j.LoggerFactory;
 @SuppressWarnings("all") public class Project implements org.apache.thrift.TBase<Project, Project._Fields>, java.io.Serializable, Cloneable, Comparable<Project> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Project");
 
-  private static final org.apache.thrift.protocol.TField PROJECT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("projectID", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PROJECT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("projectId", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
   private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)4);
@@ -66,7 +66,7 @@ import org.slf4j.LoggerFactory;
     schemes.put(TupleScheme.class, new ProjectTupleSchemeFactory());
   }
 
-  private String projectID; // required
+  private String projectId; // required
   private String owner; // required
   private String name; // required
   private String description; // optional
@@ -76,7 +76,7 @@ import org.slf4j.LoggerFactory;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    PROJECT_ID((short)1, "projectID"),
+    PROJECT_ID((short)1, "projectId"),
     OWNER((short)2, "owner"),
     NAME((short)3, "name"),
     DESCRIPTION((short)4, "description"),
@@ -157,7 +157,7 @@ import org.slf4j.LoggerFactory;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.PROJECT_ID, new org.apache.thrift.meta_data.FieldMetaData("projectID", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+    tmpMap.put(_Fields.PROJECT_ID, new org.apache.thrift.meta_data.FieldMetaData("projectId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
@@ -178,17 +178,17 @@ import org.slf4j.LoggerFactory;
   }
 
   public Project() {
-    this.projectID = "DEFAULT";
+    this.projectId = "DEFAULT";
 
   }
 
   public Project(
-    String projectID,
+    String projectId,
     String owner,
     String name)
   {
     this();
-    this.projectID = projectID;
+    this.projectId = projectId;
     this.owner = owner;
     this.name = name;
   }
@@ -198,8 +198,8 @@ import org.slf4j.LoggerFactory;
    */
   public Project(Project other) {
     __isset_bitfield = other.__isset_bitfield;
-    if (other.isSetProjectID()) {
-      this.projectID = other.projectID;
+    if (other.isSetProjectId()) {
+      this.projectId = other.projectId;
     }
     if (other.isSetOwner()) {
       this.owner = other.owner;
@@ -227,7 +227,7 @@ import org.slf4j.LoggerFactory;
 
   @Override
   public void clear() {
-    this.projectID = "DEFAULT";
+    this.projectId = "DEFAULT";
 
     this.owner = null;
     this.name = null;
@@ -238,26 +238,26 @@ import org.slf4j.LoggerFactory;
     this.sharedGroups = null;
   }
 
-  public String getProjectID() {
-    return this.projectID;
+  public String getProjectId() {
+    return this.projectId;
   }
 
-  public void setProjectID(String projectID) {
-    this.projectID = projectID;
+  public void setProjectId(String projectId) {
+    this.projectId = projectId;
   }
 
-  public void unsetProjectID() {
-    this.projectID = null;
+  public void unsetProjectId() {
+    this.projectId = null;
   }
 
-  /** Returns true if field projectID is set (has been assigned a value) and false otherwise */
-  public boolean isSetProjectID() {
-    return this.projectID != null;
+  /** Returns true if field projectId is set (has been assigned a value) and false otherwise */
+  public boolean isSetProjectId() {
+    return this.projectId != null;
   }
 
-  public void setProjectIDIsSet(boolean value) {
+  public void setProjectIdIsSet(boolean value) {
     if (!value) {
-      this.projectID = null;
+      this.projectId = null;
     }
   }
 
@@ -432,9 +432,9 @@ import org.slf4j.LoggerFactory;
     switch (field) {
     case PROJECT_ID:
       if (value == null) {
-        unsetProjectID();
+        unsetProjectId();
       } else {
-        setProjectID((String)value);
+        setProjectId((String)value);
       }
       break;
 
@@ -492,7 +492,7 @@ import org.slf4j.LoggerFactory;
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case PROJECT_ID:
-      return getProjectID();
+      return getProjectId();
 
     case OWNER:
       return getOwner();
@@ -524,7 +524,7 @@ import org.slf4j.LoggerFactory;
 
     switch (field) {
     case PROJECT_ID:
-      return isSetProjectID();
+      return isSetProjectId();
     case OWNER:
       return isSetOwner();
     case NAME:
@@ -554,12 +554,12 @@ import org.slf4j.LoggerFactory;
     if (that == null)
       return false;
 
-    boolean this_present_projectID = true && this.isSetProjectID();
-    boolean that_present_projectID = true && that.isSetProjectID();
-    if (this_present_projectID || that_present_projectID) {
-      if (!(this_present_projectID && that_present_projectID))
+    boolean this_present_projectId = true && this.isSetProjectId();
+    boolean that_present_projectId = true && that.isSetProjectId();
+    if (this_present_projectId || that_present_projectId) {
+      if (!(this_present_projectId && that_present_projectId))
         return false;
-      if (!this.projectID.equals(that.projectID))
+      if (!this.projectId.equals(that.projectId))
         return false;
     }
 
@@ -633,12 +633,12 @@ import org.slf4j.LoggerFactory;
 
     int lastComparison = 0;
 
-    lastComparison = Boolean.valueOf(isSetProjectID()).compareTo(other.isSetProjectID());
+    lastComparison = Boolean.valueOf(isSetProjectId()).compareTo(other.isSetProjectId());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetProjectID()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projectID, other.projectID);
+    if (isSetProjectId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projectId, other.projectId);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -723,11 +723,11 @@ import org.slf4j.LoggerFactory;
     StringBuilder sb = new StringBuilder("Project(");
     boolean first = true;
 
-    sb.append("projectID:");
-    if (this.projectID == null) {
+    sb.append("projectId:");
+    if (this.projectId == null) {
       sb.append("null");
     } else {
-      sb.append(this.projectID);
+      sb.append(this.projectId);
     }
     first = false;
     if (!first) sb.append(", ");
@@ -788,8 +788,8 @@ import org.slf4j.LoggerFactory;
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
-    if (!isSetProjectID()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'projectID' is unset! Struct:" + toString());
+    if (!isSetProjectId()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'projectId' is unset! Struct:" + toString());
     }
 
     if (!isSetOwner()) {
@@ -841,8 +841,8 @@ import org.slf4j.LoggerFactory;
         switch (schemeField.id) {
           case 1: // PROJECT_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.projectID = iprot.readString();
-              struct.setProjectIDIsSet(true);
+              struct.projectId = iprot.readString();
+              struct.setProjectIdIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -928,9 +928,9 @@ import org.slf4j.LoggerFactory;
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.projectID != null) {
+      if (struct.projectId != null) {
         oprot.writeFieldBegin(PROJECT_ID_FIELD_DESC);
-        oprot.writeString(struct.projectID);
+        oprot.writeString(struct.projectId);
         oprot.writeFieldEnd();
       }
       if (struct.owner != null) {
@@ -1000,7 +1000,7 @@ import org.slf4j.LoggerFactory;
     @Override
     public void write(org.apache.thrift.protocol.TProtocol prot, Project struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
-      oprot.writeString(struct.projectID);
+      oprot.writeString(struct.projectId);
       oprot.writeString(struct.owner);
       oprot.writeString(struct.name);
       BitSet optionals = new BitSet();
@@ -1046,8 +1046,8 @@ import org.slf4j.LoggerFactory;
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, Project struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      struct.projectID = iprot.readString();
-      struct.setProjectIDIsSet(true);
+      struct.projectId = iprot.readString();
+      struct.setProjectIdIsSet(true);
       struct.owner = iprot.readString();
       struct.setOwnerIsSet(true);
       struct.name = iprot.readString();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ComputationalResourceScheduling.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ComputationalResourceScheduling.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ComputationalResourceScheduling.java
index 51ef625..b4a7e4e 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ComputationalResourceScheduling.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ComputationalResourceScheduling.java
@@ -57,7 +57,7 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComputationalResourceScheduling");
 
   private static final org.apache.thrift.protocol.TField RESOURCE_HOST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceHostId", org.apache.thrift.protocol.TType.STRING, (short)1);
-  private static final org.apache.thrift.protocol.TField TOTAL_CPUCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("totalCPUCount", org.apache.thrift.protocol.TType.I32, (short)2);
+  private static final org.apache.thrift.protocol.TField TOTAL_CPU_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("totalCpuCount", org.apache.thrift.protocol.TType.I32, (short)2);
   private static final org.apache.thrift.protocol.TField NODE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeCount", org.apache.thrift.protocol.TType.I32, (short)3);
   private static final org.apache.thrift.protocol.TField NUMBER_OF_THREADS_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfThreads", org.apache.thrift.protocol.TType.I32, (short)4);
   private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queueName", org.apache.thrift.protocol.TType.STRING, (short)5);
@@ -74,7 +74,7 @@ import org.slf4j.LoggerFactory;
   }
 
   private String resourceHostId; // optional
-  private int totalCPUCount; // optional
+  private int totalCpuCount; // optional
   private int nodeCount; // optional
   private int numberOfThreads; // optional
   private String queueName; // optional
@@ -87,7 +87,7 @@ import org.slf4j.LoggerFactory;
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     RESOURCE_HOST_ID((short)1, "resourceHostId"),
-    TOTAL_CPUCOUNT((short)2, "totalCPUCount"),
+    TOTAL_CPU_COUNT((short)2, "totalCpuCount"),
     NODE_COUNT((short)3, "nodeCount"),
     NUMBER_OF_THREADS((short)4, "numberOfThreads"),
     QUEUE_NAME((short)5, "queueName"),
@@ -112,8 +112,8 @@ import org.slf4j.LoggerFactory;
       switch(fieldId) {
         case 1: // RESOURCE_HOST_ID
           return RESOURCE_HOST_ID;
-        case 2: // TOTAL_CPUCOUNT
-          return TOTAL_CPUCOUNT;
+        case 2: // TOTAL_CPU_COUNT
+          return TOTAL_CPU_COUNT;
         case 3: // NODE_COUNT
           return NODE_COUNT;
         case 4: // NUMBER_OF_THREADS
@@ -177,13 +177,13 @@ import org.slf4j.LoggerFactory;
   private static final int __JOBSTARTTIME_ISSET_ID = 4;
   private static final int __TOTALPHYSICALMEMORY_ISSET_ID = 5;
   private byte __isset_bitfield = 0;
-  private _Fields optionals[] = {_Fields.RESOURCE_HOST_ID,_Fields.TOTAL_CPUCOUNT,_Fields.NODE_COUNT,_Fields.NUMBER_OF_THREADS,_Fields.QUEUE_NAME,_Fields.WALL_TIME_LIMIT,_Fields.JOB_START_TIME,_Fields.TOTAL_PHYSICAL_MEMORY,_Fields.COMPUTATIONAL_PROJECT_ACCOUNT,_Fields.CHASSIS_NAME};
+  private _Fields optionals[] = {_Fields.RESOURCE_HOST_ID,_Fields.TOTAL_CPU_COUNT,_Fields.NODE_COUNT,_Fields.NUMBER_OF_THREADS,_Fields.QUEUE_NAME,_Fields.WALL_TIME_LIMIT,_Fields.JOB_START_TIME,_Fields.TOTAL_PHYSICAL_MEMORY,_Fields.COMPUTATIONAL_PROJECT_ACCOUNT,_Fields.CHASSIS_NAME};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
     tmpMap.put(_Fields.RESOURCE_HOST_ID, new org.apache.thrift.meta_data.FieldMetaData("resourceHostId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(_Fields.TOTAL_CPUCOUNT, new org.apache.thrift.meta_data.FieldMetaData("totalCPUCount", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+    tmpMap.put(_Fields.TOTAL_CPU_COUNT, new org.apache.thrift.meta_data.FieldMetaData("totalCpuCount", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
     tmpMap.put(_Fields.NODE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("nodeCount", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
@@ -216,7 +216,7 @@ import org.slf4j.LoggerFactory;
     if (other.isSetResourceHostId()) {
       this.resourceHostId = other.resourceHostId;
     }
-    this.totalCPUCount = other.totalCPUCount;
+    this.totalCpuCount = other.totalCpuCount;
     this.nodeCount = other.nodeCount;
     this.numberOfThreads = other.numberOfThreads;
     if (other.isSetQueueName()) {
@@ -240,8 +240,8 @@ import org.slf4j.LoggerFactory;
   @Override
   public void clear() {
     this.resourceHostId = null;
-    setTotalCPUCountIsSet(false);
-    this.totalCPUCount = 0;
+    setTotalCpuCountIsSet(false);
+    this.totalCpuCount = 0;
     setNodeCountIsSet(false);
     this.nodeCount = 0;
     setNumberOfThreadsIsSet(false);
@@ -280,25 +280,25 @@ import org.slf4j.LoggerFactory;
     }
   }
 
-  public int getTotalCPUCount() {
-    return this.totalCPUCount;
+  public int getTotalCpuCount() {
+    return this.totalCpuCount;
   }
 
-  public void setTotalCPUCount(int totalCPUCount) {
-    this.totalCPUCount = totalCPUCount;
-    setTotalCPUCountIsSet(true);
+  public void setTotalCpuCount(int totalCpuCount) {
+    this.totalCpuCount = totalCpuCount;
+    setTotalCpuCountIsSet(true);
   }
 
-  public void unsetTotalCPUCount() {
+  public void unsetTotalCpuCount() {
     __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTALCPUCOUNT_ISSET_ID);
   }
 
-  /** Returns true if field totalCPUCount is set (has been assigned a value) and false otherwise */
-  public boolean isSetTotalCPUCount() {
+  /** Returns true if field totalCpuCount is set (has been assigned a value) and false otherwise */
+  public boolean isSetTotalCpuCount() {
     return EncodingUtils.testBit(__isset_bitfield, __TOTALCPUCOUNT_ISSET_ID);
   }
 
-  public void setTotalCPUCountIsSet(boolean value) {
+  public void setTotalCpuCountIsSet(boolean value) {
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTALCPUCOUNT_ISSET_ID, value);
   }
 
@@ -491,11 +491,11 @@ import org.slf4j.LoggerFactory;
       }
       break;
 
-    case TOTAL_CPUCOUNT:
+    case TOTAL_CPU_COUNT:
       if (value == null) {
-        unsetTotalCPUCount();
+        unsetTotalCpuCount();
       } else {
-        setTotalCPUCount((Integer)value);
+        setTotalCpuCount((Integer)value);
       }
       break;
 
@@ -571,8 +571,8 @@ import org.slf4j.LoggerFactory;
     case RESOURCE_HOST_ID:
       return getResourceHostId();
 
-    case TOTAL_CPUCOUNT:
-      return Integer.valueOf(getTotalCPUCount());
+    case TOTAL_CPU_COUNT:
+      return Integer.valueOf(getTotalCpuCount());
 
     case NODE_COUNT:
       return Integer.valueOf(getNodeCount());
@@ -611,8 +611,8 @@ import org.slf4j.LoggerFactory;
     switch (field) {
     case RESOURCE_HOST_ID:
       return isSetResourceHostId();
-    case TOTAL_CPUCOUNT:
-      return isSetTotalCPUCount();
+    case TOTAL_CPU_COUNT:
+      return isSetTotalCpuCount();
     case NODE_COUNT:
       return isSetNodeCount();
     case NUMBER_OF_THREADS:
@@ -655,12 +655,12 @@ import org.slf4j.LoggerFactory;
         return false;
     }
 
-    boolean this_present_totalCPUCount = true && this.isSetTotalCPUCount();
-    boolean that_present_totalCPUCount = true && that.isSetTotalCPUCount();
-    if (this_present_totalCPUCount || that_present_totalCPUCount) {
-      if (!(this_present_totalCPUCount && that_present_totalCPUCount))
+    boolean this_present_totalCpuCount = true && this.isSetTotalCpuCount();
+    boolean that_present_totalCpuCount = true && that.isSetTotalCpuCount();
+    if (this_present_totalCpuCount || that_present_totalCpuCount) {
+      if (!(this_present_totalCpuCount && that_present_totalCpuCount))
         return false;
-      if (this.totalCPUCount != that.totalCPUCount)
+      if (this.totalCpuCount != that.totalCpuCount)
         return false;
     }
 
@@ -762,12 +762,12 @@ import org.slf4j.LoggerFactory;
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetTotalCPUCount()).compareTo(other.isSetTotalCPUCount());
+    lastComparison = Boolean.valueOf(isSetTotalCpuCount()).compareTo(other.isSetTotalCpuCount());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetTotalCPUCount()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalCPUCount, other.totalCPUCount);
+    if (isSetTotalCpuCount()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalCpuCount, other.totalCpuCount);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -881,10 +881,10 @@ import org.slf4j.LoggerFactory;
       }
       first = false;
     }
-    if (isSetTotalCPUCount()) {
+    if (isSetTotalCpuCount()) {
       if (!first) sb.append(", ");
-      sb.append("totalCPUCount:");
-      sb.append(this.totalCPUCount);
+      sb.append("totalCpuCount:");
+      sb.append(this.totalCpuCount);
       first = false;
     }
     if (isSetNodeCount()) {
@@ -1000,10 +1000,10 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 2: // TOTAL_CPUCOUNT
+          case 2: // TOTAL_CPU_COUNT
             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-              struct.totalCPUCount = iprot.readI32();
-              struct.setTotalCPUCountIsSet(true);
+              struct.totalCpuCount = iprot.readI32();
+              struct.setTotalCpuCountIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -1092,9 +1092,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldEnd();
         }
       }
-      if (struct.isSetTotalCPUCount()) {
-        oprot.writeFieldBegin(TOTAL_CPUCOUNT_FIELD_DESC);
-        oprot.writeI32(struct.totalCPUCount);
+      if (struct.isSetTotalCpuCount()) {
+        oprot.writeFieldBegin(TOTAL_CPU_COUNT_FIELD_DESC);
+        oprot.writeI32(struct.totalCpuCount);
         oprot.writeFieldEnd();
       }
       if (struct.isSetNodeCount()) {
@@ -1164,7 +1164,7 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetResourceHostId()) {
         optionals.set(0);
       }
-      if (struct.isSetTotalCPUCount()) {
+      if (struct.isSetTotalCpuCount()) {
         optionals.set(1);
       }
       if (struct.isSetNodeCount()) {
@@ -1195,8 +1195,8 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetResourceHostId()) {
         oprot.writeString(struct.resourceHostId);
       }
-      if (struct.isSetTotalCPUCount()) {
-        oprot.writeI32(struct.totalCPUCount);
+      if (struct.isSetTotalCpuCount()) {
+        oprot.writeI32(struct.totalCpuCount);
       }
       if (struct.isSetNodeCount()) {
         oprot.writeI32(struct.nodeCount);
@@ -1233,8 +1233,8 @@ import org.slf4j.LoggerFactory;
         struct.setResourceHostIdIsSet(true);
       }
       if (incoming.get(1)) {
-        struct.totalCPUCount = iprot.readI32();
-        struct.setTotalCPUCountIsSet(true);
+        struct.totalCpuCount = iprot.readI32();
+        struct.setTotalCpuCountIsSet(true);
       }
       if (incoming.get(2)) {
         struct.nodeCount = iprot.readI32();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/DataTransferDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/DataTransferDetails.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/DataTransferDetails.java
index 94751c7..ebc2d0e 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/DataTransferDetails.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/DataTransferDetails.java
@@ -23,36 +23,19 @@
  */
 package org.apache.airavata.model.workspace.experiment;
 
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-
 import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+
+import java.util.*;
 
 @SuppressWarnings("all") public class DataTransferDetails implements org.apache.thrift.TBase<DataTransferDetails, DataTransferDetails._Fields>, java.io.Serializable, Cloneable, Comparable<DataTransferDetails> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataTransferDetails");
 
-  private static final org.apache.thrift.protocol.TField TRANSFER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transferID", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField TRANSFER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transferId", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)2);
   private static final org.apache.thrift.protocol.TField TRANSFER_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("transferDescription", org.apache.thrift.protocol.TType.STRING, (short)3);
   private static final org.apache.thrift.protocol.TField TRANSFER_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("transferStatus", org.apache.thrift.protocol.TType.STRUCT, (short)4);
@@ -63,14 +46,14 @@ import org.slf4j.LoggerFactory;
     schemes.put(TupleScheme.class, new DataTransferDetailsTupleSchemeFactory());
   }
 
-  private String transferID; // required
+  private String transferId; // required
   private long creationTime; // optional
   private String transferDescription; // required
   private TransferStatus transferStatus; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    TRANSFER_ID((short)1, "transferID"),
+    TRANSFER_ID((short)1, "transferId"),
     CREATION_TIME((short)2, "creationTime"),
     TRANSFER_DESCRIPTION((short)3, "transferDescription"),
     TRANSFER_STATUS((short)4, "transferStatus");
@@ -142,7 +125,7 @@ import org.slf4j.LoggerFactory;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.TRANSFER_ID, new org.apache.thrift.meta_data.FieldMetaData("transferID", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+    tmpMap.put(_Fields.TRANSFER_ID, new org.apache.thrift.meta_data.FieldMetaData("transferId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
@@ -155,16 +138,16 @@ import org.slf4j.LoggerFactory;
   }
 
   public DataTransferDetails() {
-    this.transferID = "DO_NOT_SET_AT_CLIENTS";
+    this.transferId = "DO_NOT_SET_AT_CLIENTS";
 
   }
 
   public DataTransferDetails(
-    String transferID,
+    String transferId,
     String transferDescription)
   {
     this();
-    this.transferID = transferID;
+    this.transferId = transferId;
     this.transferDescription = transferDescription;
   }
 
@@ -173,8 +156,8 @@ import org.slf4j.LoggerFactory;
    */
   public DataTransferDetails(DataTransferDetails other) {
     __isset_bitfield = other.__isset_bitfield;
-    if (other.isSetTransferID()) {
-      this.transferID = other.transferID;
+    if (other.isSetTransferId()) {
+      this.transferId = other.transferId;
     }
     this.creationTime = other.creationTime;
     if (other.isSetTransferDescription()) {
@@ -191,7 +174,7 @@ import org.slf4j.LoggerFactory;
 
   @Override
   public void clear() {
-    this.transferID = "DO_NOT_SET_AT_CLIENTS";
+    this.transferId = "DO_NOT_SET_AT_CLIENTS";
 
     setCreationTimeIsSet(false);
     this.creationTime = 0;
@@ -199,26 +182,26 @@ import org.slf4j.LoggerFactory;
     this.transferStatus = null;
   }
 
-  public String getTransferID() {
-    return this.transferID;
+  public String getTransferId() {
+    return this.transferId;
   }
 
-  public void setTransferID(String transferID) {
-    this.transferID = transferID;
+  public void setTransferId(String transferId) {
+    this.transferId = transferId;
   }
 
-  public void unsetTransferID() {
-    this.transferID = null;
+  public void unsetTransferId() {
+    this.transferId = null;
   }
 
-  /** Returns true if field transferID is set (has been assigned a value) and false otherwise */
-  public boolean isSetTransferID() {
-    return this.transferID != null;
+  /** Returns true if field transferId is set (has been assigned a value) and false otherwise */
+  public boolean isSetTransferId() {
+    return this.transferId != null;
   }
 
-  public void setTransferIDIsSet(boolean value) {
+  public void setTransferIdIsSet(boolean value) {
     if (!value) {
-      this.transferID = null;
+      this.transferId = null;
     }
   }
 
@@ -294,9 +277,9 @@ import org.slf4j.LoggerFactory;
     switch (field) {
     case TRANSFER_ID:
       if (value == null) {
-        unsetTransferID();
+        unsetTransferId();
       } else {
-        setTransferID((String)value);
+        setTransferId((String)value);
       }
       break;
 
@@ -330,7 +313,7 @@ import org.slf4j.LoggerFactory;
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case TRANSFER_ID:
-      return getTransferID();
+      return getTransferId();
 
     case CREATION_TIME:
       return Long.valueOf(getCreationTime());
@@ -353,7 +336,7 @@ import org.slf4j.LoggerFactory;
 
     switch (field) {
     case TRANSFER_ID:
-      return isSetTransferID();
+      return isSetTransferId();
     case CREATION_TIME:
       return isSetCreationTime();
     case TRANSFER_DESCRIPTION:
@@ -377,12 +360,12 @@ import org.slf4j.LoggerFactory;
     if (that == null)
       return false;
 
-    boolean this_present_transferID = true && this.isSetTransferID();
-    boolean that_present_transferID = true && that.isSetTransferID();
-    if (this_present_transferID || that_present_transferID) {
-      if (!(this_present_transferID && that_present_transferID))
+    boolean this_present_transferId = true && this.isSetTransferId();
+    boolean that_present_transferId = true && that.isSetTransferId();
+    if (this_present_transferId || that_present_transferId) {
+      if (!(this_present_transferId && that_present_transferId))
         return false;
-      if (!this.transferID.equals(that.transferID))
+      if (!this.transferId.equals(that.transferId))
         return false;
     }
 
@@ -429,12 +412,12 @@ import org.slf4j.LoggerFactory;
 
     int lastComparison = 0;
 
-    lastComparison = Boolean.valueOf(isSetTransferID()).compareTo(other.isSetTransferID());
+    lastComparison = Boolean.valueOf(isSetTransferId()).compareTo(other.isSetTransferId());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetTransferID()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferID, other.transferID);
+    if (isSetTransferId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferId, other.transferId);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -489,11 +472,11 @@ import org.slf4j.LoggerFactory;
     StringBuilder sb = new StringBuilder("DataTransferDetails(");
     boolean first = true;
 
-    sb.append("transferID:");
-    if (this.transferID == null) {
+    sb.append("transferId:");
+    if (this.transferId == null) {
       sb.append("null");
     } else {
-      sb.append(this.transferID);
+      sb.append(this.transferId);
     }
     first = false;
     if (isSetCreationTime()) {
@@ -526,8 +509,8 @@ import org.slf4j.LoggerFactory;
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
-    if (!isSetTransferID()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'transferID' is unset! Struct:" + toString());
+    if (!isSetTransferId()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'transferId' is unset! Struct:" + toString());
     }
 
     if (!isSetTransferDescription()) {
@@ -578,8 +561,8 @@ import org.slf4j.LoggerFactory;
         switch (schemeField.id) {
           case 1: // TRANSFER_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.transferID = iprot.readString();
-              struct.setTransferIDIsSet(true);
+              struct.transferId = iprot.readString();
+              struct.setTransferIdIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -622,9 +605,9 @@ import org.slf4j.LoggerFactory;
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.transferID != null) {
+      if (struct.transferId != null) {
         oprot.writeFieldBegin(TRANSFER_ID_FIELD_DESC);
-        oprot.writeString(struct.transferID);
+        oprot.writeString(struct.transferId);
         oprot.writeFieldEnd();
       }
       if (struct.isSetCreationTime()) {
@@ -661,7 +644,7 @@ import org.slf4j.LoggerFactory;
     @Override
     public void write(org.apache.thrift.protocol.TProtocol prot, DataTransferDetails struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
-      oprot.writeString(struct.transferID);
+      oprot.writeString(struct.transferId);
       oprot.writeString(struct.transferDescription);
       BitSet optionals = new BitSet();
       if (struct.isSetCreationTime()) {
@@ -682,8 +665,8 @@ import org.slf4j.LoggerFactory;
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, DataTransferDetails struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      struct.transferID = iprot.readString();
-      struct.setTransferIDIsSet(true);
+      struct.transferId = iprot.readString();
+      struct.setTransferIdIsSet(true);
       struct.transferDescription = iprot.readString();
       struct.setTransferDescriptionIsSet(true);
       BitSet incoming = iprot.readBitSet(2);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ErrorDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ErrorDetails.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ErrorDetails.java
index ce1f74a..f9918ff 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ErrorDetails.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ErrorDetails.java
@@ -52,7 +52,7 @@ import org.slf4j.LoggerFactory;
 @SuppressWarnings("all") public class ErrorDetails implements org.apache.thrift.TBase<ErrorDetails, ErrorDetails._Fields>, java.io.Serializable, Cloneable, Comparable<ErrorDetails> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ErrorDetails");
 
-  private static final org.apache.thrift.protocol.TField ERROR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("errorID", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField ERROR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("errorId", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)2);
   private static final org.apache.thrift.protocol.TField ACTUAL_ERROR_MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("actualErrorMessage", org.apache.thrift.protocol.TType.STRING, (short)3);
   private static final org.apache.thrift.protocol.TField USER_FRIENDLY_MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("userFriendlyMessage", org.apache.thrift.protocol.TType.STRING, (short)4);
@@ -68,7 +68,7 @@ import org.slf4j.LoggerFactory;
     schemes.put(TupleScheme.class, new ErrorDetailsTupleSchemeFactory());
   }
 
-  private String errorID; // required
+  private String errorId; // required
   private long creationTime; // optional
   private String actualErrorMessage; // optional
   private String userFriendlyMessage; // optional
@@ -80,7 +80,7 @@ import org.slf4j.LoggerFactory;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    ERROR_ID((short)1, "errorID"),
+    ERROR_ID((short)1, "errorId"),
     CREATION_TIME((short)2, "creationTime"),
     ACTUAL_ERROR_MESSAGE((short)3, "actualErrorMessage"),
     USER_FRIENDLY_MESSAGE((short)4, "userFriendlyMessage"),
@@ -180,7 +180,7 @@ import org.slf4j.LoggerFactory;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.ERROR_ID, new org.apache.thrift.meta_data.FieldMetaData("errorID", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+    tmpMap.put(_Fields.ERROR_ID, new org.apache.thrift.meta_data.FieldMetaData("errorId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
@@ -204,17 +204,17 @@ import org.slf4j.LoggerFactory;
   }
 
   public ErrorDetails() {
-    this.errorID = "DO_NOT_SET_AT_CLIENTS";
+    this.errorId = "DO_NOT_SET_AT_CLIENTS";
 
     this.transientOrPersistent = false;
 
   }
 
   public ErrorDetails(
-    String errorID)
+    String errorId)
   {
     this();
-    this.errorID = errorID;
+    this.errorId = errorId;
   }
 
   /**
@@ -222,8 +222,8 @@ import org.slf4j.LoggerFactory;
    */
   public ErrorDetails(ErrorDetails other) {
     __isset_bitfield = other.__isset_bitfield;
-    if (other.isSetErrorID()) {
-      this.errorID = other.errorID;
+    if (other.isSetErrorId()) {
+      this.errorId = other.errorId;
     }
     this.creationTime = other.creationTime;
     if (other.isSetActualErrorMessage()) {
@@ -254,7 +254,7 @@ import org.slf4j.LoggerFactory;
 
   @Override
   public void clear() {
-    this.errorID = "DO_NOT_SET_AT_CLIENTS";
+    this.errorId = "DO_NOT_SET_AT_CLIENTS";
 
     setCreationTimeIsSet(false);
     this.creationTime = 0;
@@ -268,26 +268,26 @@ import org.slf4j.LoggerFactory;
     this.rootCauseErrorIdList = null;
   }
 
-  public String getErrorID() {
-    return this.errorID;
+  public String getErrorId() {
+    return this.errorId;
   }
 
-  public void setErrorID(String errorID) {
-    this.errorID = errorID;
+  public void setErrorId(String errorId) {
+    this.errorId = errorId;
   }
 
-  public void unsetErrorID() {
-    this.errorID = null;
+  public void unsetErrorId() {
+    this.errorId = null;
   }
 
-  /** Returns true if field errorID is set (has been assigned a value) and false otherwise */
-  public boolean isSetErrorID() {
-    return this.errorID != null;
+  /** Returns true if field errorId is set (has been assigned a value) and false otherwise */
+  public boolean isSetErrorId() {
+    return this.errorId != null;
   }
 
-  public void setErrorIDIsSet(boolean value) {
+  public void setErrorIdIsSet(boolean value) {
     if (!value) {
-      this.errorID = null;
+      this.errorId = null;
     }
   }
 
@@ -516,9 +516,9 @@ import org.slf4j.LoggerFactory;
     switch (field) {
     case ERROR_ID:
       if (value == null) {
-        unsetErrorID();
+        unsetErrorId();
       } else {
-        setErrorID((String)value);
+        setErrorId((String)value);
       }
       break;
 
@@ -592,7 +592,7 @@ import org.slf4j.LoggerFactory;
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case ERROR_ID:
-      return getErrorID();
+      return getErrorId();
 
     case CREATION_TIME:
       return Long.valueOf(getCreationTime());
@@ -630,7 +630,7 @@ import org.slf4j.LoggerFactory;
 
     switch (field) {
     case ERROR_ID:
-      return isSetErrorID();
+      return isSetErrorId();
     case CREATION_TIME:
       return isSetCreationTime();
     case ACTUAL_ERROR_MESSAGE:
@@ -664,12 +664,12 @@ import org.slf4j.LoggerFactory;
     if (that == null)
       return false;
 
-    boolean this_present_errorID = true && this.isSetErrorID();
-    boolean that_present_errorID = true && that.isSetErrorID();
-    if (this_present_errorID || that_present_errorID) {
-      if (!(this_present_errorID && that_present_errorID))
+    boolean this_present_errorId = true && this.isSetErrorId();
+    boolean that_present_errorId = true && that.isSetErrorId();
+    if (this_present_errorId || that_present_errorId) {
+      if (!(this_present_errorId && that_present_errorId))
         return false;
-      if (!this.errorID.equals(that.errorID))
+      if (!this.errorId.equals(that.errorId))
         return false;
     }
 
@@ -761,12 +761,12 @@ import org.slf4j.LoggerFactory;
 
     int lastComparison = 0;
 
-    lastComparison = Boolean.valueOf(isSetErrorID()).compareTo(other.isSetErrorID());
+    lastComparison = Boolean.valueOf(isSetErrorId()).compareTo(other.isSetErrorId());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetErrorID()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorID, other.errorID);
+    if (isSetErrorId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorId, other.errorId);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -871,11 +871,11 @@ import org.slf4j.LoggerFactory;
     StringBuilder sb = new StringBuilder("ErrorDetails(");
     boolean first = true;
 
-    sb.append("errorID:");
-    if (this.errorID == null) {
+    sb.append("errorId:");
+    if (this.errorId == null) {
       sb.append("null");
     } else {
-      sb.append(this.errorID);
+      sb.append(this.errorId);
     }
     first = false;
     if (isSetCreationTime()) {
@@ -956,8 +956,8 @@ import org.slf4j.LoggerFactory;
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
-    if (!isSetErrorID()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'errorID' is unset! Struct:" + toString());
+    if (!isSetErrorId()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'errorId' is unset! Struct:" + toString());
     }
 
     // check for sub-struct validity
@@ -1001,8 +1001,8 @@ import org.slf4j.LoggerFactory;
         switch (schemeField.id) {
           case 1: // ERROR_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.errorID = iprot.readString();
-              struct.setErrorIDIsSet(true);
+              struct.errorId = iprot.readString();
+              struct.setErrorIdIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -1094,9 +1094,9 @@ import org.slf4j.LoggerFactory;
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.errorID != null) {
+      if (struct.errorId != null) {
         oprot.writeFieldBegin(ERROR_ID_FIELD_DESC);
-        oprot.writeString(struct.errorID);
+        oprot.writeString(struct.errorId);
         oprot.writeFieldEnd();
       }
       if (struct.isSetCreationTime()) {
@@ -1175,7 +1175,7 @@ import org.slf4j.LoggerFactory;
     @Override
     public void write(org.apache.thrift.protocol.TProtocol prot, ErrorDetails struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
-      oprot.writeString(struct.errorID);
+      oprot.writeString(struct.errorId);
       BitSet optionals = new BitSet();
       if (struct.isSetCreationTime()) {
         optionals.set(0);
@@ -1237,8 +1237,8 @@ import org.slf4j.LoggerFactory;
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, ErrorDetails struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      struct.errorID = iprot.readString();
-      struct.setErrorIDIsSet(true);
+      struct.errorId = iprot.readString();
+      struct.setErrorIdIsSet(true);
       BitSet incoming = iprot.readBitSet(8);
       if (incoming.get(0)) {
         struct.creationTime = iprot.readI64();


[44/44] airavata git commit: Removing test code

Posted by sc...@apache.org.
Removing test code


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

Branch: refs/heads/mongo-registry
Commit: 8bd562af4dd0435fb142a1104d660e97293bafbc
Parents: 8217630
Author: Supun Nakandala <sc...@apache.org>
Authored: Sun Jun 7 22:28:43 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Sun Jun 7 22:28:43 2015 +0530

----------------------------------------------------------------------
 .../persistance/registry/mongo/Test.java        | 79 --------------------
 .../registry/mongo/dao/ExperimentDao.java       | 10 +--
 2 files changed, 5 insertions(+), 84 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8bd562af/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/Test.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/Test.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/Test.java
deleted file mode 100644
index cb935e1..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/Test.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.mongo;
-
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.persistance.registry.mongo.impl.RegistryFactory;
-import org.apache.airavata.persistance.registry.mongo.dao.ExperimentDao;
-import org.apache.airavata.persistance.registry.mongo.utils.MongoUtil;
-import org.apache.airavata.registry.cpi.Registry;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.RegistryModelType;
-import org.junit.Assert;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
-
-public class Test {
-    private final static Logger logger = LoggerFactory.getLogger(Test.class);
-
-    public static void main(String[] args) throws RegistryException, IOException {
-        Registry registry = RegistryFactory.getDefaultRegistry();
-//        String experiemtnId = "SLM-Espresso-Stampede_45667ea8-aae3-4a8e-807d-a16312035c35";
-//        long time1 = System.currentTimeMillis();
-//        Experiment experiement = (Experiment) registry.getExperiment(RegistryModelType.EXPERIMENT, experiemtnId);
-//        long time2 = System.currentTimeMillis();
-//        System.out.println(time2-time1);
-//
-//        ExperimentDao experimentDao = new ExperimentDao();
-//        experimentDao.createExperiment(experiement);
-//        time1 = System.currentTimeMillis();
-//        Experiment persistedExperiment = experimentDao.getExperiment(experiement.getExperimentId());
-//        time2 = System.currentTimeMillis();
-//        System.out.println(time2-time1);
-//
-//        Assert.assertEquals(experiement, persistedExperiment);
-
-        MongoUtil.dropAiravataRegistry();
-
-        ExperimentDao experimentDao = new ExperimentDao();
-        BufferedReader reader = new BufferedReader(new FileReader("/home/supun/Downloads/EXPERIMENT.csv"));
-        String temp = reader.readLine();
-        int i = 1;
-        while(temp != null && !temp.isEmpty()){
-            try{
-                Experiment experiement = (Experiment) registry.get(RegistryModelType.EXPERIMENT, temp.trim());
-                experimentDao.createExperiment(experiement);
-                Experiment persistedExperiment = experimentDao.getExperiment(experiement.getExperimentId());
-                Assert.assertEquals(experiement, persistedExperiment);
-                System.out.println(i+" :"+experiement.getExperimentId());
-                i++;
-            }catch (Exception e){
-                System.out.println(temp);
-                e.printStackTrace();
-            }
-            temp = reader.readLine();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8bd562af/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/ExperimentDao.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/ExperimentDao.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/ExperimentDao.java
index 5e7e43d..bde24d6 100644
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/ExperimentDao.java
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/ExperimentDao.java
@@ -75,11 +75,11 @@ public class ExperimentDao{
         collection.createIndex(new BasicDBObject(WORKFLOW_NODE_ID, 1));
         collection.createIndex(new BasicDBObject(TASK_ID, 1));
 
-//        //Defining a full-text index on experiment name and experiment description
-//        BasicDBObject object = new BasicDBObject();
-//        object.put(EXPERIMENT_NAME, "text");
-//        object.put(EXPERIMENT_DESCRIPTION, "text");
-//        collection.createIndex (object);
+        //Defining a full-text index on experiment name and experiment description
+        BasicDBObject object = new BasicDBObject();
+        object.put(EXPERIMENT_NAME, "text");
+        object.put(EXPERIMENT_DESCRIPTION, "text");
+        collection.createIndex (object);
     }
 
     public List<Experiment> getAllExperiments() throws RegistryException{


[05/44] airavata git commit: Changing the thrift model variable names to lower camel case

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/Experiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/Experiment.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/Experiment.java
index 60d6b32..d96b31e 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/Experiment.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/Experiment.java
@@ -23,31 +23,14 @@
  */
 package org.apache.airavata.model.workspace.experiment;
 
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-
 import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+
+import java.util.*;
 
 /**
  * A structure holding the experiment metadata and its child models.
@@ -68,8 +51,8 @@ import org.slf4j.LoggerFactory;
 @SuppressWarnings("all") public class Experiment implements org.apache.thrift.TBase<Experiment, Experiment._Fields>, java.io.Serializable, Cloneable, Comparable<Experiment> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Experiment");
 
-  private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentID", org.apache.thrift.protocol.TType.STRING, (short)1);
-  private static final org.apache.thrift.protocol.TField PROJECT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("projectID", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PROJECT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("projectId", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)3);
   private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)4);
   private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)5);
@@ -96,8 +79,8 @@ import org.slf4j.LoggerFactory;
     schemes.put(TupleScheme.class, new ExperimentTupleSchemeFactory());
   }
 
-  private String experimentID; // required
-  private String projectID; // required
+  private String experimentId; // required
+  private String projectId; // required
   private long creationTime; // optional
   private String userName; // required
   private String name; // required
@@ -120,8 +103,8 @@ import org.slf4j.LoggerFactory;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    EXPERIMENT_ID((short)1, "experimentID"),
-    PROJECT_ID((short)2, "projectID"),
+    EXPERIMENT_ID((short)1, "experimentId"),
+    PROJECT_ID((short)2, "projectId"),
     CREATION_TIME((short)3, "creationTime"),
     USER_NAME((short)4, "userName"),
     NAME((short)5, "name"),
@@ -244,9 +227,9 @@ import org.slf4j.LoggerFactory;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentID", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+    tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(_Fields.PROJECT_ID, new org.apache.thrift.meta_data.FieldMetaData("projectID", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+    tmpMap.put(_Fields.PROJECT_ID, new org.apache.thrift.meta_data.FieldMetaData("projectId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
@@ -297,21 +280,21 @@ import org.slf4j.LoggerFactory;
   }
 
   public Experiment() {
-    this.experimentID = "DO_NOT_SET_AT_CLIENTS";
+    this.experimentId = "DO_NOT_SET_AT_CLIENTS";
 
-    this.projectID = "DEFAULT";
+    this.projectId = "DEFAULT";
 
   }
 
   public Experiment(
-    String experimentID,
-    String projectID,
+    String experimentId,
+    String projectId,
     String userName,
     String name)
   {
     this();
-    this.experimentID = experimentID;
-    this.projectID = projectID;
+    this.experimentId = experimentId;
+    this.projectId = projectId;
     this.userName = userName;
     this.name = name;
   }
@@ -321,11 +304,11 @@ import org.slf4j.LoggerFactory;
    */
   public Experiment(Experiment other) {
     __isset_bitfield = other.__isset_bitfield;
-    if (other.isSetExperimentID()) {
-      this.experimentID = other.experimentID;
+    if (other.isSetExperimentId()) {
+      this.experimentId = other.experimentId;
     }
-    if (other.isSetProjectID()) {
-      this.projectID = other.projectID;
+    if (other.isSetProjectId()) {
+      this.projectId = other.projectId;
     }
     this.creationTime = other.creationTime;
     if (other.isSetUserName()) {
@@ -409,9 +392,9 @@ import org.slf4j.LoggerFactory;
 
   @Override
   public void clear() {
-    this.experimentID = "DO_NOT_SET_AT_CLIENTS";
+    this.experimentId = "DO_NOT_SET_AT_CLIENTS";
 
-    this.projectID = "DEFAULT";
+    this.projectId = "DEFAULT";
 
     setCreationTimeIsSet(false);
     this.creationTime = 0;
@@ -436,49 +419,49 @@ import org.slf4j.LoggerFactory;
     this.errors = null;
   }
 
-  public String getExperimentID() {
-    return this.experimentID;
+  public String getExperimentId() {
+    return this.experimentId;
   }
 
-  public void setExperimentID(String experimentID) {
-    this.experimentID = experimentID;
+  public void setExperimentId(String experimentId) {
+    this.experimentId = experimentId;
   }
 
-  public void unsetExperimentID() {
-    this.experimentID = null;
+  public void unsetExperimentId() {
+    this.experimentId = null;
   }
 
-  /** Returns true if field experimentID is set (has been assigned a value) and false otherwise */
-  public boolean isSetExperimentID() {
-    return this.experimentID != null;
+  /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
+  public boolean isSetExperimentId() {
+    return this.experimentId != null;
   }
 
-  public void setExperimentIDIsSet(boolean value) {
+  public void setExperimentIdIsSet(boolean value) {
     if (!value) {
-      this.experimentID = null;
+      this.experimentId = null;
     }
   }
 
-  public String getProjectID() {
-    return this.projectID;
+  public String getProjectId() {
+    return this.projectId;
   }
 
-  public void setProjectID(String projectID) {
-    this.projectID = projectID;
+  public void setProjectId(String projectId) {
+    this.projectId = projectId;
   }
 
-  public void unsetProjectID() {
-    this.projectID = null;
+  public void unsetProjectId() {
+    this.projectId = null;
   }
 
-  /** Returns true if field projectID is set (has been assigned a value) and false otherwise */
-  public boolean isSetProjectID() {
-    return this.projectID != null;
+  /** Returns true if field projectId is set (has been assigned a value) and false otherwise */
+  public boolean isSetProjectId() {
+    return this.projectId != null;
   }
 
-  public void setProjectIDIsSet(boolean value) {
+  public void setProjectIdIsSet(boolean value) {
     if (!value) {
-      this.projectID = null;
+      this.projectId = null;
     }
   }
 
@@ -1011,17 +994,17 @@ import org.slf4j.LoggerFactory;
     switch (field) {
     case EXPERIMENT_ID:
       if (value == null) {
-        unsetExperimentID();
+        unsetExperimentId();
       } else {
-        setExperimentID((String)value);
+        setExperimentId((String)value);
       }
       break;
 
     case PROJECT_ID:
       if (value == null) {
-        unsetProjectID();
+        unsetProjectId();
       } else {
-        setProjectID((String)value);
+        setProjectId((String)value);
       }
       break;
 
@@ -1183,10 +1166,10 @@ import org.slf4j.LoggerFactory;
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case EXPERIMENT_ID:
-      return getExperimentID();
+      return getExperimentId();
 
     case PROJECT_ID:
-      return getProjectID();
+      return getProjectId();
 
     case CREATION_TIME:
       return Long.valueOf(getCreationTime());
@@ -1257,9 +1240,9 @@ import org.slf4j.LoggerFactory;
 
     switch (field) {
     case EXPERIMENT_ID:
-      return isSetExperimentID();
+      return isSetExperimentId();
     case PROJECT_ID:
-      return isSetProjectID();
+      return isSetProjectId();
     case CREATION_TIME:
       return isSetCreationTime();
     case USER_NAME:
@@ -1315,21 +1298,21 @@ import org.slf4j.LoggerFactory;
     if (that == null)
       return false;
 
-    boolean this_present_experimentID = true && this.isSetExperimentID();
-    boolean that_present_experimentID = true && that.isSetExperimentID();
-    if (this_present_experimentID || that_present_experimentID) {
-      if (!(this_present_experimentID && that_present_experimentID))
+    boolean this_present_experimentId = true && this.isSetExperimentId();
+    boolean that_present_experimentId = true && that.isSetExperimentId();
+    if (this_present_experimentId || that_present_experimentId) {
+      if (!(this_present_experimentId && that_present_experimentId))
         return false;
-      if (!this.experimentID.equals(that.experimentID))
+      if (!this.experimentId.equals(that.experimentId))
         return false;
     }
 
-    boolean this_present_projectID = true && this.isSetProjectID();
-    boolean that_present_projectID = true && that.isSetProjectID();
-    if (this_present_projectID || that_present_projectID) {
-      if (!(this_present_projectID && that_present_projectID))
+    boolean this_present_projectId = true && this.isSetProjectId();
+    boolean that_present_projectId = true && that.isSetProjectId();
+    if (this_present_projectId || that_present_projectId) {
+      if (!(this_present_projectId && that_present_projectId))
         return false;
-      if (!this.projectID.equals(that.projectID))
+      if (!this.projectId.equals(that.projectId))
         return false;
     }
 
@@ -1520,22 +1503,22 @@ import org.slf4j.LoggerFactory;
 
     int lastComparison = 0;
 
-    lastComparison = Boolean.valueOf(isSetExperimentID()).compareTo(other.isSetExperimentID());
+    lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetExperimentID()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentID, other.experimentID);
+    if (isSetExperimentId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetProjectID()).compareTo(other.isSetProjectID());
+    lastComparison = Boolean.valueOf(isSetProjectId()).compareTo(other.isSetProjectId());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetProjectID()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projectID, other.projectID);
+    if (isSetProjectId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projectId, other.projectId);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -1750,19 +1733,19 @@ import org.slf4j.LoggerFactory;
     StringBuilder sb = new StringBuilder("Experiment(");
     boolean first = true;
 
-    sb.append("experimentID:");
-    if (this.experimentID == null) {
+    sb.append("experimentId:");
+    if (this.experimentId == null) {
       sb.append("null");
     } else {
-      sb.append(this.experimentID);
+      sb.append(this.experimentId);
     }
     first = false;
     if (!first) sb.append(", ");
-    sb.append("projectID:");
-    if (this.projectID == null) {
+    sb.append("projectId:");
+    if (this.projectId == null) {
       sb.append("null");
     } else {
-      sb.append(this.projectID);
+      sb.append(this.projectId);
     }
     first = false;
     if (isSetCreationTime()) {
@@ -1949,12 +1932,12 @@ import org.slf4j.LoggerFactory;
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
-    if (!isSetExperimentID()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentID' is unset! Struct:" + toString());
+    if (!isSetExperimentId()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' is unset! Struct:" + toString());
     }
 
-    if (!isSetProjectID()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'projectID' is unset! Struct:" + toString());
+    if (!isSetProjectId()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'projectId' is unset! Struct:" + toString());
     }
 
     if (!isSetUserName()) {
@@ -2012,16 +1995,16 @@ import org.slf4j.LoggerFactory;
         switch (schemeField.id) {
           case 1: // EXPERIMENT_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.experimentID = iprot.readString();
-              struct.setExperimentIDIsSet(true);
+              struct.experimentId = iprot.readString();
+              struct.setExperimentIdIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
           case 2: // PROJECT_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.projectID = iprot.readString();
-              struct.setProjectIDIsSet(true);
+              struct.projectId = iprot.readString();
+              struct.setProjectIdIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -2258,14 +2241,14 @@ import org.slf4j.LoggerFactory;
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.experimentID != null) {
+      if (struct.experimentId != null) {
         oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
-        oprot.writeString(struct.experimentID);
+        oprot.writeString(struct.experimentId);
         oprot.writeFieldEnd();
       }
-      if (struct.projectID != null) {
+      if (struct.projectId != null) {
         oprot.writeFieldBegin(PROJECT_ID_FIELD_DESC);
-        oprot.writeString(struct.projectID);
+        oprot.writeString(struct.projectId);
         oprot.writeFieldEnd();
       }
       if (struct.isSetCreationTime()) {
@@ -2452,8 +2435,8 @@ import org.slf4j.LoggerFactory;
     @Override
     public void write(org.apache.thrift.protocol.TProtocol prot, Experiment struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
-      oprot.writeString(struct.experimentID);
-      oprot.writeString(struct.projectID);
+      oprot.writeString(struct.experimentId);
+      oprot.writeString(struct.projectId);
       oprot.writeString(struct.userName);
       oprot.writeString(struct.name);
       BitSet optionals = new BitSet();
@@ -2601,10 +2584,10 @@ import org.slf4j.LoggerFactory;
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, Experiment struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      struct.experimentID = iprot.readString();
-      struct.setExperimentIDIsSet(true);
-      struct.projectID = iprot.readString();
-      struct.setProjectIDIsSet(true);
+      struct.experimentId = iprot.readString();
+      struct.setExperimentIdIsSet(true);
+      struct.projectId = iprot.readString();
+      struct.setProjectIdIsSet(true);
       struct.userName = iprot.readString();
       struct.setUserNameIsSet(true);
       struct.name = iprot.readString();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentSummary.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentSummary.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentSummary.java
index c30e4ea..d28bbeb 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentSummary.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentSummary.java
@@ -52,8 +52,8 @@ import org.slf4j.LoggerFactory;
 @SuppressWarnings("all") public class ExperimentSummary implements org.apache.thrift.TBase<ExperimentSummary, ExperimentSummary._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentSummary> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentSummary");
 
-  private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentID", org.apache.thrift.protocol.TType.STRING, (short)1);
-  private static final org.apache.thrift.protocol.TField PROJECT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("projectID", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PROJECT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("projectId", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)3);
   private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)4);
   private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)5);
@@ -68,8 +68,8 @@ import org.slf4j.LoggerFactory;
     schemes.put(TupleScheme.class, new ExperimentSummaryTupleSchemeFactory());
   }
 
-  private String experimentID; // required
-  private String projectID; // required
+  private String experimentId; // required
+  private String projectId; // required
   private long creationTime; // optional
   private String userName; // required
   private String name; // required
@@ -80,8 +80,8 @@ import org.slf4j.LoggerFactory;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    EXPERIMENT_ID((short)1, "experimentID"),
-    PROJECT_ID((short)2, "projectID"),
+    EXPERIMENT_ID((short)1, "experimentId"),
+    PROJECT_ID((short)2, "projectId"),
     CREATION_TIME((short)3, "creationTime"),
     USER_NAME((short)4, "userName"),
     NAME((short)5, "name"),
@@ -167,9 +167,9 @@ import org.slf4j.LoggerFactory;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentID", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+    tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(_Fields.PROJECT_ID, new org.apache.thrift.meta_data.FieldMetaData("projectID", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+    tmpMap.put(_Fields.PROJECT_ID, new org.apache.thrift.meta_data.FieldMetaData("projectId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
@@ -194,14 +194,14 @@ import org.slf4j.LoggerFactory;
   }
 
   public ExperimentSummary(
-    String experimentID,
-    String projectID,
+    String experimentId,
+    String projectId,
     String userName,
     String name)
   {
     this();
-    this.experimentID = experimentID;
-    this.projectID = projectID;
+    this.experimentId = experimentId;
+    this.projectId = projectId;
     this.userName = userName;
     this.name = name;
   }
@@ -211,11 +211,11 @@ import org.slf4j.LoggerFactory;
    */
   public ExperimentSummary(ExperimentSummary other) {
     __isset_bitfield = other.__isset_bitfield;
-    if (other.isSetExperimentID()) {
-      this.experimentID = other.experimentID;
+    if (other.isSetExperimentId()) {
+      this.experimentId = other.experimentId;
     }
-    if (other.isSetProjectID()) {
-      this.projectID = other.projectID;
+    if (other.isSetProjectId()) {
+      this.projectId = other.projectId;
     }
     this.creationTime = other.creationTime;
     if (other.isSetUserName()) {
@@ -248,8 +248,8 @@ import org.slf4j.LoggerFactory;
 
   @Override
   public void clear() {
-    this.experimentID = null;
-    this.projectID = null;
+    this.experimentId = null;
+    this.projectId = null;
     setCreationTimeIsSet(false);
     this.creationTime = 0;
     this.userName = null;
@@ -260,49 +260,49 @@ import org.slf4j.LoggerFactory;
     this.errors = null;
   }
 
-  public String getExperimentID() {
-    return this.experimentID;
+  public String getExperimentId() {
+    return this.experimentId;
   }
 
-  public void setExperimentID(String experimentID) {
-    this.experimentID = experimentID;
+  public void setExperimentId(String experimentId) {
+    this.experimentId = experimentId;
   }
 
-  public void unsetExperimentID() {
-    this.experimentID = null;
+  public void unsetExperimentId() {
+    this.experimentId = null;
   }
 
-  /** Returns true if field experimentID is set (has been assigned a value) and false otherwise */
-  public boolean isSetExperimentID() {
-    return this.experimentID != null;
+  /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
+  public boolean isSetExperimentId() {
+    return this.experimentId != null;
   }
 
-  public void setExperimentIDIsSet(boolean value) {
+  public void setExperimentIdIsSet(boolean value) {
     if (!value) {
-      this.experimentID = null;
+      this.experimentId = null;
     }
   }
 
-  public String getProjectID() {
-    return this.projectID;
+  public String getProjectId() {
+    return this.projectId;
   }
 
-  public void setProjectID(String projectID) {
-    this.projectID = projectID;
+  public void setProjectId(String projectId) {
+    this.projectId = projectId;
   }
 
-  public void unsetProjectID() {
-    this.projectID = null;
+  public void unsetProjectId() {
+    this.projectId = null;
   }
 
-  /** Returns true if field projectID is set (has been assigned a value) and false otherwise */
-  public boolean isSetProjectID() {
-    return this.projectID != null;
+  /** Returns true if field projectId is set (has been assigned a value) and false otherwise */
+  public boolean isSetProjectId() {
+    return this.projectId != null;
   }
 
-  public void setProjectIDIsSet(boolean value) {
+  public void setProjectIdIsSet(boolean value) {
     if (!value) {
-      this.projectID = null;
+      this.projectId = null;
     }
   }
 
@@ -485,17 +485,17 @@ import org.slf4j.LoggerFactory;
     switch (field) {
     case EXPERIMENT_ID:
       if (value == null) {
-        unsetExperimentID();
+        unsetExperimentId();
       } else {
-        setExperimentID((String)value);
+        setExperimentId((String)value);
       }
       break;
 
     case PROJECT_ID:
       if (value == null) {
-        unsetProjectID();
+        unsetProjectId();
       } else {
-        setProjectID((String)value);
+        setProjectId((String)value);
       }
       break;
 
@@ -561,10 +561,10 @@ import org.slf4j.LoggerFactory;
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case EXPERIMENT_ID:
-      return getExperimentID();
+      return getExperimentId();
 
     case PROJECT_ID:
-      return getProjectID();
+      return getProjectId();
 
     case CREATION_TIME:
       return Long.valueOf(getCreationTime());
@@ -599,9 +599,9 @@ import org.slf4j.LoggerFactory;
 
     switch (field) {
     case EXPERIMENT_ID:
-      return isSetExperimentID();
+      return isSetExperimentId();
     case PROJECT_ID:
-      return isSetProjectID();
+      return isSetProjectId();
     case CREATION_TIME:
       return isSetCreationTime();
     case USER_NAME:
@@ -633,21 +633,21 @@ import org.slf4j.LoggerFactory;
     if (that == null)
       return false;
 
-    boolean this_present_experimentID = true && this.isSetExperimentID();
-    boolean that_present_experimentID = true && that.isSetExperimentID();
-    if (this_present_experimentID || that_present_experimentID) {
-      if (!(this_present_experimentID && that_present_experimentID))
+    boolean this_present_experimentId = true && this.isSetExperimentId();
+    boolean that_present_experimentId = true && that.isSetExperimentId();
+    if (this_present_experimentId || that_present_experimentId) {
+      if (!(this_present_experimentId && that_present_experimentId))
         return false;
-      if (!this.experimentID.equals(that.experimentID))
+      if (!this.experimentId.equals(that.experimentId))
         return false;
     }
 
-    boolean this_present_projectID = true && this.isSetProjectID();
-    boolean that_present_projectID = true && that.isSetProjectID();
-    if (this_present_projectID || that_present_projectID) {
-      if (!(this_present_projectID && that_present_projectID))
+    boolean this_present_projectId = true && this.isSetProjectId();
+    boolean that_present_projectId = true && that.isSetProjectId();
+    if (this_present_projectId || that_present_projectId) {
+      if (!(this_present_projectId && that_present_projectId))
         return false;
-      if (!this.projectID.equals(that.projectID))
+      if (!this.projectId.equals(that.projectId))
         return false;
     }
 
@@ -730,22 +730,22 @@ import org.slf4j.LoggerFactory;
 
     int lastComparison = 0;
 
-    lastComparison = Boolean.valueOf(isSetExperimentID()).compareTo(other.isSetExperimentID());
+    lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetExperimentID()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentID, other.experimentID);
+    if (isSetExperimentId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetProjectID()).compareTo(other.isSetProjectID());
+    lastComparison = Boolean.valueOf(isSetProjectId()).compareTo(other.isSetProjectId());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetProjectID()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projectID, other.projectID);
+    if (isSetProjectId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projectId, other.projectId);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -840,19 +840,19 @@ import org.slf4j.LoggerFactory;
     StringBuilder sb = new StringBuilder("ExperimentSummary(");
     boolean first = true;
 
-    sb.append("experimentID:");
-    if (this.experimentID == null) {
+    sb.append("experimentId:");
+    if (this.experimentId == null) {
       sb.append("null");
     } else {
-      sb.append(this.experimentID);
+      sb.append(this.experimentId);
     }
     first = false;
     if (!first) sb.append(", ");
-    sb.append("projectID:");
-    if (this.projectID == null) {
+    sb.append("projectId:");
+    if (this.projectId == null) {
       sb.append("null");
     } else {
-      sb.append(this.projectID);
+      sb.append(this.projectId);
     }
     first = false;
     if (isSetCreationTime()) {
@@ -923,12 +923,12 @@ import org.slf4j.LoggerFactory;
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
-    if (!isSetExperimentID()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentID' is unset! Struct:" + toString());
+    if (!isSetExperimentId()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' is unset! Struct:" + toString());
     }
 
-    if (!isSetProjectID()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'projectID' is unset! Struct:" + toString());
+    if (!isSetProjectId()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'projectId' is unset! Struct:" + toString());
     }
 
     if (!isSetUserName()) {
@@ -983,16 +983,16 @@ import org.slf4j.LoggerFactory;
         switch (schemeField.id) {
           case 1: // EXPERIMENT_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.experimentID = iprot.readString();
-              struct.setExperimentIDIsSet(true);
+              struct.experimentId = iprot.readString();
+              struct.setExperimentIdIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
           case 2: // PROJECT_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.projectID = iprot.readString();
-              struct.setProjectIDIsSet(true);
+              struct.projectId = iprot.readString();
+              struct.setProjectIdIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -1078,14 +1078,14 @@ import org.slf4j.LoggerFactory;
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.experimentID != null) {
+      if (struct.experimentId != null) {
         oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
-        oprot.writeString(struct.experimentID);
+        oprot.writeString(struct.experimentId);
         oprot.writeFieldEnd();
       }
-      if (struct.projectID != null) {
+      if (struct.projectId != null) {
         oprot.writeFieldBegin(PROJECT_ID_FIELD_DESC);
-        oprot.writeString(struct.projectID);
+        oprot.writeString(struct.projectId);
         oprot.writeFieldEnd();
       }
       if (struct.isSetCreationTime()) {
@@ -1155,8 +1155,8 @@ import org.slf4j.LoggerFactory;
     @Override
     public void write(org.apache.thrift.protocol.TProtocol prot, ExperimentSummary struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
-      oprot.writeString(struct.experimentID);
-      oprot.writeString(struct.projectID);
+      oprot.writeString(struct.experimentId);
+      oprot.writeString(struct.projectId);
       oprot.writeString(struct.userName);
       oprot.writeString(struct.name);
       BitSet optionals = new BitSet();
@@ -1202,10 +1202,10 @@ import org.slf4j.LoggerFactory;
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, ExperimentSummary struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      struct.experimentID = iprot.readString();
-      struct.setExperimentIDIsSet(true);
-      struct.projectID = iprot.readString();
-      struct.setProjectIDIsSet(true);
+      struct.experimentId = iprot.readString();
+      struct.setExperimentIdIsSet(true);
+      struct.projectId = iprot.readString();
+      struct.setProjectIdIsSet(true);
       struct.userName = iprot.readString();
       struct.setUserNameIsSet(true);
       struct.name = iprot.readString();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java
index 10c70fe..f9dc3bb 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java
@@ -23,36 +23,19 @@
  */
 package org.apache.airavata.model.workspace.experiment;
 
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-
 import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+
+import java.util.*;
 
 @SuppressWarnings("all") public class JobDetails implements org.apache.thrift.TBase<JobDetails, JobDetails._Fields>, java.io.Serializable, Cloneable, Comparable<JobDetails> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobDetails");
 
-  private static final org.apache.thrift.protocol.TField JOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobID", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField JOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobId", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField JOB_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("jobDescription", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)3);
   private static final org.apache.thrift.protocol.TField JOB_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("jobStatus", org.apache.thrift.protocol.TType.STRUCT, (short)4);
@@ -68,7 +51,7 @@ import org.slf4j.LoggerFactory;
     schemes.put(TupleScheme.class, new JobDetailsTupleSchemeFactory());
   }
 
-  private String jobID; // required
+  private String jobId; // required
   private String jobDescription; // required
   private long creationTime; // optional
   private JobStatus jobStatus; // optional
@@ -80,7 +63,7 @@ import org.slf4j.LoggerFactory;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    JOB_ID((short)1, "jobID"),
+    JOB_ID((short)1, "jobId"),
     JOB_DESCRIPTION((short)2, "jobDescription"),
     CREATION_TIME((short)3, "creationTime"),
     JOB_STATUS((short)4, "jobStatus"),
@@ -167,7 +150,7 @@ import org.slf4j.LoggerFactory;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.JOB_ID, new org.apache.thrift.meta_data.FieldMetaData("jobID", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+    tmpMap.put(_Fields.JOB_ID, new org.apache.thrift.meta_data.FieldMetaData("jobId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.JOB_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("jobDescription", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
@@ -191,16 +174,16 @@ import org.slf4j.LoggerFactory;
   }
 
   public JobDetails() {
-    this.jobID = "DO_NOT_SET_AT_CLIENTS";
+    this.jobId = "DO_NOT_SET_AT_CLIENTS";
 
   }
 
   public JobDetails(
-    String jobID,
+    String jobId,
     String jobDescription)
   {
     this();
-    this.jobID = jobID;
+    this.jobId = jobId;
     this.jobDescription = jobDescription;
   }
 
@@ -209,8 +192,8 @@ import org.slf4j.LoggerFactory;
    */
   public JobDetails(JobDetails other) {
     __isset_bitfield = other.__isset_bitfield;
-    if (other.isSetJobID()) {
-      this.jobID = other.jobID;
+    if (other.isSetJobId()) {
+      this.jobId = other.jobId;
     }
     if (other.isSetJobDescription()) {
       this.jobDescription = other.jobDescription;
@@ -246,7 +229,7 @@ import org.slf4j.LoggerFactory;
 
   @Override
   public void clear() {
-    this.jobID = "DO_NOT_SET_AT_CLIENTS";
+    this.jobId = "DO_NOT_SET_AT_CLIENTS";
 
     this.jobDescription = null;
     setCreationTimeIsSet(false);
@@ -259,26 +242,26 @@ import org.slf4j.LoggerFactory;
     this.workingDir = null;
   }
 
-  public String getJobID() {
-    return this.jobID;
+  public String getJobId() {
+    return this.jobId;
   }
 
-  public void setJobID(String jobID) {
-    this.jobID = jobID;
+  public void setJobId(String jobId) {
+    this.jobId = jobId;
   }
 
-  public void unsetJobID() {
-    this.jobID = null;
+  public void unsetJobId() {
+    this.jobId = null;
   }
 
-  /** Returns true if field jobID is set (has been assigned a value) and false otherwise */
-  public boolean isSetJobID() {
-    return this.jobID != null;
+  /** Returns true if field jobId is set (has been assigned a value) and false otherwise */
+  public boolean isSetJobId() {
+    return this.jobId != null;
   }
 
-  public void setJobIDIsSet(boolean value) {
+  public void setJobIdIsSet(boolean value) {
     if (!value) {
-      this.jobID = null;
+      this.jobId = null;
     }
   }
 
@@ -484,9 +467,9 @@ import org.slf4j.LoggerFactory;
     switch (field) {
     case JOB_ID:
       if (value == null) {
-        unsetJobID();
+        unsetJobId();
       } else {
-        setJobID((String)value);
+        setJobId((String)value);
       }
       break;
 
@@ -560,7 +543,7 @@ import org.slf4j.LoggerFactory;
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case JOB_ID:
-      return getJobID();
+      return getJobId();
 
     case JOB_DESCRIPTION:
       return getJobDescription();
@@ -598,7 +581,7 @@ import org.slf4j.LoggerFactory;
 
     switch (field) {
     case JOB_ID:
-      return isSetJobID();
+      return isSetJobId();
     case JOB_DESCRIPTION:
       return isSetJobDescription();
     case CREATION_TIME:
@@ -632,12 +615,12 @@ import org.slf4j.LoggerFactory;
     if (that == null)
       return false;
 
-    boolean this_present_jobID = true && this.isSetJobID();
-    boolean that_present_jobID = true && that.isSetJobID();
-    if (this_present_jobID || that_present_jobID) {
-      if (!(this_present_jobID && that_present_jobID))
+    boolean this_present_jobId = true && this.isSetJobId();
+    boolean that_present_jobId = true && that.isSetJobId();
+    if (this_present_jobId || that_present_jobId) {
+      if (!(this_present_jobId && that_present_jobId))
         return false;
-      if (!this.jobID.equals(that.jobID))
+      if (!this.jobId.equals(that.jobId))
         return false;
     }
 
@@ -729,12 +712,12 @@ import org.slf4j.LoggerFactory;
 
     int lastComparison = 0;
 
-    lastComparison = Boolean.valueOf(isSetJobID()).compareTo(other.isSetJobID());
+    lastComparison = Boolean.valueOf(isSetJobId()).compareTo(other.isSetJobId());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetJobID()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobID, other.jobID);
+    if (isSetJobId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobId, other.jobId);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -839,11 +822,11 @@ import org.slf4j.LoggerFactory;
     StringBuilder sb = new StringBuilder("JobDetails(");
     boolean first = true;
 
-    sb.append("jobID:");
-    if (this.jobID == null) {
+    sb.append("jobId:");
+    if (this.jobId == null) {
       sb.append("null");
     } else {
-      sb.append(this.jobID);
+      sb.append(this.jobId);
     }
     first = false;
     if (!first) sb.append(", ");
@@ -926,8 +909,8 @@ import org.slf4j.LoggerFactory;
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
-    if (!isSetJobID()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobID' is unset! Struct:" + toString());
+    if (!isSetJobId()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobId' is unset! Struct:" + toString());
     }
 
     if (!isSetJobDescription()) {
@@ -981,8 +964,8 @@ import org.slf4j.LoggerFactory;
         switch (schemeField.id) {
           case 1: // JOB_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.jobID = iprot.readString();
-              struct.setJobIDIsSet(true);
+              struct.jobId = iprot.readString();
+              struct.setJobIdIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -1077,9 +1060,9 @@ import org.slf4j.LoggerFactory;
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.jobID != null) {
+      if (struct.jobId != null) {
         oprot.writeFieldBegin(JOB_ID_FIELD_DESC);
-        oprot.writeString(struct.jobID);
+        oprot.writeString(struct.jobId);
         oprot.writeFieldEnd();
       }
       if (struct.jobDescription != null) {
@@ -1158,7 +1141,7 @@ import org.slf4j.LoggerFactory;
     @Override
     public void write(org.apache.thrift.protocol.TProtocol prot, JobDetails struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
-      oprot.writeString(struct.jobID);
+      oprot.writeString(struct.jobId);
       oprot.writeString(struct.jobDescription);
       BitSet optionals = new BitSet();
       if (struct.isSetCreationTime()) {
@@ -1215,8 +1198,8 @@ import org.slf4j.LoggerFactory;
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, JobDetails struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      struct.jobID = iprot.readString();
-      struct.setJobIDIsSet(true);
+      struct.jobId = iprot.readString();
+      struct.setJobIdIsSet(true);
       struct.jobDescription = iprot.readString();
       struct.setJobDescriptionIsSet(true);
       BitSet incoming = iprot.readBitSet(7);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/TaskDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/TaskDetails.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/TaskDetails.java
index 7488f06..47618d0 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/TaskDetails.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/TaskDetails.java
@@ -23,31 +23,14 @@
  */
 package org.apache.airavata.model.workspace.experiment;
 
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-
 import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+
+import java.util.*;
 
 /**
  * A structure holding the actual execution context decided based on user provided configuration data or system inferred
@@ -58,7 +41,7 @@ import org.slf4j.LoggerFactory;
 @SuppressWarnings("all") public class TaskDetails implements org.apache.thrift.TBase<TaskDetails, TaskDetails._Fields>, java.io.Serializable, Cloneable, Comparable<TaskDetails> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskDetails");
 
-  private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskID", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)2);
   private static final org.apache.thrift.protocol.TField APPLICATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationId", org.apache.thrift.protocol.TType.STRING, (short)3);
   private static final org.apache.thrift.protocol.TField APPLICATION_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationVersion", org.apache.thrift.protocol.TType.STRING, (short)4);
@@ -81,7 +64,7 @@ import org.slf4j.LoggerFactory;
     schemes.put(TupleScheme.class, new TaskDetailsTupleSchemeFactory());
   }
 
-  private String taskID; // required
+  private String taskId; // required
   private long creationTime; // optional
   private String applicationId; // optional
   private String applicationVersion; // optional
@@ -100,7 +83,7 @@ import org.slf4j.LoggerFactory;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    TASK_ID((short)1, "taskID"),
+    TASK_ID((short)1, "taskId"),
     CREATION_TIME((short)2, "creationTime"),
     APPLICATION_ID((short)3, "applicationId"),
     APPLICATION_VERSION((short)4, "applicationVersion"),
@@ -209,7 +192,7 @@ import org.slf4j.LoggerFactory;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskID", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+    tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
@@ -252,15 +235,15 @@ import org.slf4j.LoggerFactory;
   }
 
   public TaskDetails() {
-    this.taskID = "DO_NOT_SET_AT_CLIENTS";
+    this.taskId = "DO_NOT_SET_AT_CLIENTS";
 
   }
 
   public TaskDetails(
-    String taskID)
+    String taskId)
   {
     this();
-    this.taskID = taskID;
+    this.taskId = taskId;
   }
 
   /**
@@ -268,8 +251,8 @@ import org.slf4j.LoggerFactory;
    */
   public TaskDetails(TaskDetails other) {
     __isset_bitfield = other.__isset_bitfield;
-    if (other.isSetTaskID()) {
-      this.taskID = other.taskID;
+    if (other.isSetTaskId()) {
+      this.taskId = other.taskId;
     }
     this.creationTime = other.creationTime;
     if (other.isSetApplicationId()) {
@@ -341,7 +324,7 @@ import org.slf4j.LoggerFactory;
 
   @Override
   public void clear() {
-    this.taskID = "DO_NOT_SET_AT_CLIENTS";
+    this.taskId = "DO_NOT_SET_AT_CLIENTS";
 
     setCreationTimeIsSet(false);
     this.creationTime = 0;
@@ -362,26 +345,26 @@ import org.slf4j.LoggerFactory;
     this.emailAddresses = null;
   }
 
-  public String getTaskID() {
-    return this.taskID;
+  public String getTaskId() {
+    return this.taskId;
   }
 
-  public void setTaskID(String taskID) {
-    this.taskID = taskID;
+  public void setTaskId(String taskId) {
+    this.taskId = taskId;
   }
 
-  public void unsetTaskID() {
-    this.taskID = null;
+  public void unsetTaskId() {
+    this.taskId = null;
   }
 
-  /** Returns true if field taskID is set (has been assigned a value) and false otherwise */
-  public boolean isSetTaskID() {
-    return this.taskID != null;
+  /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
+  public boolean isSetTaskId() {
+    return this.taskId != null;
   }
 
-  public void setTaskIDIsSet(boolean value) {
+  public void setTaskIdIsSet(boolean value) {
     if (!value) {
-      this.taskID = null;
+      this.taskId = null;
     }
   }
 
@@ -822,9 +805,9 @@ import org.slf4j.LoggerFactory;
     switch (field) {
     case TASK_ID:
       if (value == null) {
-        unsetTaskID();
+        unsetTaskId();
       } else {
-        setTaskID((String)value);
+        setTaskId((String)value);
       }
       break;
 
@@ -954,7 +937,7 @@ import org.slf4j.LoggerFactory;
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case TASK_ID:
-      return getTaskID();
+      return getTaskId();
 
     case CREATION_TIME:
       return Long.valueOf(getCreationTime());
@@ -1013,7 +996,7 @@ import org.slf4j.LoggerFactory;
 
     switch (field) {
     case TASK_ID:
-      return isSetTaskID();
+      return isSetTaskId();
     case CREATION_TIME:
       return isSetCreationTime();
     case APPLICATION_ID:
@@ -1061,12 +1044,12 @@ import org.slf4j.LoggerFactory;
     if (that == null)
       return false;
 
-    boolean this_present_taskID = true && this.isSetTaskID();
-    boolean that_present_taskID = true && that.isSetTaskID();
-    if (this_present_taskID || that_present_taskID) {
-      if (!(this_present_taskID && that_present_taskID))
+    boolean this_present_taskId = true && this.isSetTaskId();
+    boolean that_present_taskId = true && that.isSetTaskId();
+    if (this_present_taskId || that_present_taskId) {
+      if (!(this_present_taskId && that_present_taskId))
         return false;
-      if (!this.taskID.equals(that.taskID))
+      if (!this.taskId.equals(that.taskId))
         return false;
     }
 
@@ -1221,12 +1204,12 @@ import org.slf4j.LoggerFactory;
 
     int lastComparison = 0;
 
-    lastComparison = Boolean.valueOf(isSetTaskID()).compareTo(other.isSetTaskID());
+    lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetTaskID()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskID, other.taskID);
+    if (isSetTaskId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -1401,11 +1384,11 @@ import org.slf4j.LoggerFactory;
     StringBuilder sb = new StringBuilder("TaskDetails(");
     boolean first = true;
 
-    sb.append("taskID:");
-    if (this.taskID == null) {
+    sb.append("taskId:");
+    if (this.taskId == null) {
       sb.append("null");
     } else {
-      sb.append(this.taskID);
+      sb.append(this.taskId);
     }
     first = false;
     if (isSetCreationTime()) {
@@ -1556,8 +1539,8 @@ import org.slf4j.LoggerFactory;
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
-    if (!isSetTaskID()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskID' is unset! Struct:" + toString());
+    if (!isSetTaskId()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskId' is unset! Struct:" + toString());
     }
 
     // check for sub-struct validity
@@ -1613,8 +1596,8 @@ import org.slf4j.LoggerFactory;
         switch (schemeField.id) {
           case 1: // TASK_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.taskID = iprot.readString();
-              struct.setTaskIDIsSet(true);
+              struct.taskId = iprot.readString();
+              struct.setTaskIdIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -1821,9 +1804,9 @@ import org.slf4j.LoggerFactory;
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.taskID != null) {
+      if (struct.taskId != null) {
         oprot.writeFieldBegin(TASK_ID_FIELD_DESC);
-        oprot.writeString(struct.taskID);
+        oprot.writeString(struct.taskId);
         oprot.writeFieldEnd();
       }
       if (struct.isSetCreationTime()) {
@@ -1986,7 +1969,7 @@ import org.slf4j.LoggerFactory;
     @Override
     public void write(org.apache.thrift.protocol.TProtocol prot, TaskDetails struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
-      oprot.writeString(struct.taskID);
+      oprot.writeString(struct.taskId);
       BitSet optionals = new BitSet();
       if (struct.isSetCreationTime()) {
         optionals.set(0);
@@ -2120,8 +2103,8 @@ import org.slf4j.LoggerFactory;
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, TaskDetails struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      struct.taskID = iprot.readString();
-      struct.setTaskIDIsSet(true);
+      struct.taskId = iprot.readString();
+      struct.setTaskIdIsSet(true);
       BitSet incoming = iprot.readBitSet(15);
       if (incoming.get(0)) {
         struct.creationTime = iprot.readI64();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/UserConfigurationData.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/UserConfigurationData.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/UserConfigurationData.java
index c9531ea..fdc80f5 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/UserConfigurationData.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/UserConfigurationData.java
@@ -65,7 +65,7 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TField ADVANCE_OUTPUT_DATA_HANDLING_FIELD_DESC = new org.apache.thrift.protocol.TField("advanceOutputDataHandling", org.apache.thrift.protocol.TType.STRUCT, (short)6);
   private static final org.apache.thrift.protocol.TField QOS_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("qosParams", org.apache.thrift.protocol.TType.STRUCT, (short)7);
   private static final org.apache.thrift.protocol.TField THROTTLE_RESOURCES_FIELD_DESC = new org.apache.thrift.protocol.TField("throttleResources", org.apache.thrift.protocol.TType.BOOL, (short)8);
-  private static final org.apache.thrift.protocol.TField USER_DN_FIELD_DESC = new org.apache.thrift.protocol.TField("userDN", org.apache.thrift.protocol.TType.STRING, (short)9);
+  private static final org.apache.thrift.protocol.TField USER_DN_FIELD_DESC = new org.apache.thrift.protocol.TField("userDn", org.apache.thrift.protocol.TType.STRING, (short)9);
   private static final org.apache.thrift.protocol.TField GENERATE_CERT_FIELD_DESC = new org.apache.thrift.protocol.TField("generateCert", org.apache.thrift.protocol.TType.BOOL, (short)10);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
@@ -82,7 +82,7 @@ import org.slf4j.LoggerFactory;
   private AdvancedOutputDataHandling advanceOutputDataHandling; // optional
   private QualityOfServiceParams qosParams; // optional
   private boolean throttleResources; // optional
-  private String userDN; // optional
+  private String userDn; // optional
   private boolean generateCert; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -95,7 +95,7 @@ import org.slf4j.LoggerFactory;
     ADVANCE_OUTPUT_DATA_HANDLING((short)6, "advanceOutputDataHandling"),
     QOS_PARAMS((short)7, "qosParams"),
     THROTTLE_RESOURCES((short)8, "throttleResources"),
-    USER_DN((short)9, "userDN"),
+    USER_DN((short)9, "userDn"),
     GENERATE_CERT((short)10, "generateCert");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -197,7 +197,7 @@ import org.slf4j.LoggerFactory;
         new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, QualityOfServiceParams.class)));
     tmpMap.put(_Fields.THROTTLE_RESOURCES, new org.apache.thrift.meta_data.FieldMetaData("throttleResources", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-    tmpMap.put(_Fields.USER_DN, new org.apache.thrift.meta_data.FieldMetaData("userDN", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+    tmpMap.put(_Fields.USER_DN, new org.apache.thrift.meta_data.FieldMetaData("userDn", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.GENERATE_CERT, new org.apache.thrift.meta_data.FieldMetaData("generateCert", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
@@ -250,8 +250,8 @@ import org.slf4j.LoggerFactory;
       this.qosParams = new QualityOfServiceParams(other.qosParams);
     }
     this.throttleResources = other.throttleResources;
-    if (other.isSetUserDN()) {
-      this.userDN = other.userDN;
+    if (other.isSetUserDn()) {
+      this.userDn = other.userDn;
     }
     this.generateCert = other.generateCert;
   }
@@ -274,7 +274,7 @@ import org.slf4j.LoggerFactory;
     this.qosParams = null;
     this.throttleResources = false;
 
-    this.userDN = null;
+    this.userDn = null;
     this.generateCert = false;
 
   }
@@ -459,26 +459,26 @@ import org.slf4j.LoggerFactory;
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __THROTTLERESOURCES_ISSET_ID, value);
   }
 
-  public String getUserDN() {
-    return this.userDN;
+  public String getUserDn() {
+    return this.userDn;
   }
 
-  public void setUserDN(String userDN) {
-    this.userDN = userDN;
+  public void setUserDn(String userDn) {
+    this.userDn = userDn;
   }
 
-  public void unsetUserDN() {
-    this.userDN = null;
+  public void unsetUserDn() {
+    this.userDn = null;
   }
 
-  /** Returns true if field userDN is set (has been assigned a value) and false otherwise */
-  public boolean isSetUserDN() {
-    return this.userDN != null;
+  /** Returns true if field userDn is set (has been assigned a value) and false otherwise */
+  public boolean isSetUserDn() {
+    return this.userDn != null;
   }
 
-  public void setUserDNIsSet(boolean value) {
+  public void setUserDnIsSet(boolean value) {
     if (!value) {
-      this.userDN = null;
+      this.userDn = null;
     }
   }
 
@@ -572,9 +572,9 @@ import org.slf4j.LoggerFactory;
 
     case USER_DN:
       if (value == null) {
-        unsetUserDN();
+        unsetUserDn();
       } else {
-        setUserDN((String)value);
+        setUserDn((String)value);
       }
       break;
 
@@ -616,7 +616,7 @@ import org.slf4j.LoggerFactory;
       return Boolean.valueOf(isThrottleResources());
 
     case USER_DN:
-      return getUserDN();
+      return getUserDn();
 
     case GENERATE_CERT:
       return Boolean.valueOf(isGenerateCert());
@@ -649,7 +649,7 @@ import org.slf4j.LoggerFactory;
     case THROTTLE_RESOURCES:
       return isSetThrottleResources();
     case USER_DN:
-      return isSetUserDN();
+      return isSetUserDn();
     case GENERATE_CERT:
       return isSetGenerateCert();
     }
@@ -741,12 +741,12 @@ import org.slf4j.LoggerFactory;
         return false;
     }
 
-    boolean this_present_userDN = true && this.isSetUserDN();
-    boolean that_present_userDN = true && that.isSetUserDN();
-    if (this_present_userDN || that_present_userDN) {
-      if (!(this_present_userDN && that_present_userDN))
+    boolean this_present_userDn = true && this.isSetUserDn();
+    boolean that_present_userDn = true && that.isSetUserDn();
+    if (this_present_userDn || that_present_userDn) {
+      if (!(this_present_userDn && that_present_userDn))
         return false;
-      if (!this.userDN.equals(that.userDN))
+      if (!this.userDn.equals(that.userDn))
         return false;
     }
 
@@ -855,12 +855,12 @@ import org.slf4j.LoggerFactory;
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetUserDN()).compareTo(other.isSetUserDN());
+    lastComparison = Boolean.valueOf(isSetUserDn()).compareTo(other.isSetUserDn());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetUserDN()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userDN, other.userDN);
+    if (isSetUserDn()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userDn, other.userDn);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -954,13 +954,13 @@ import org.slf4j.LoggerFactory;
       sb.append(this.throttleResources);
       first = false;
     }
-    if (isSetUserDN()) {
+    if (isSetUserDn()) {
       if (!first) sb.append(", ");
-      sb.append("userDN:");
-      if (this.userDN == null) {
+      sb.append("userDn:");
+      if (this.userDn == null) {
         sb.append("null");
       } else {
-        sb.append(this.userDN);
+        sb.append(this.userDn);
       }
       first = false;
     }
@@ -1105,8 +1105,8 @@ import org.slf4j.LoggerFactory;
             break;
           case 9: // USER_DN
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.userDN = iprot.readString();
-              struct.setUserDNIsSet(true);
+              struct.userDn = iprot.readString();
+              struct.setUserDnIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -1176,10 +1176,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeBool(struct.throttleResources);
         oprot.writeFieldEnd();
       }
-      if (struct.userDN != null) {
-        if (struct.isSetUserDN()) {
+      if (struct.userDn != null) {
+        if (struct.isSetUserDn()) {
           oprot.writeFieldBegin(USER_DN_FIELD_DESC);
-          oprot.writeString(struct.userDN);
+          oprot.writeString(struct.userDn);
           oprot.writeFieldEnd();
         }
       }
@@ -1226,7 +1226,7 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetThrottleResources()) {
         optionals.set(5);
       }
-      if (struct.isSetUserDN()) {
+      if (struct.isSetUserDn()) {
         optionals.set(6);
       }
       if (struct.isSetGenerateCert()) {
@@ -1251,8 +1251,8 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetThrottleResources()) {
         oprot.writeBool(struct.throttleResources);
       }
-      if (struct.isSetUserDN()) {
-        oprot.writeString(struct.userDN);
+      if (struct.isSetUserDn()) {
+        oprot.writeString(struct.userDn);
       }
       if (struct.isSetGenerateCert()) {
         oprot.writeBool(struct.generateCert);
@@ -1296,8 +1296,8 @@ import org.slf4j.LoggerFactory;
         struct.setThrottleResourcesIsSet(true);
       }
       if (incoming.get(6)) {
-        struct.userDN = iprot.readString();
-        struct.setUserDNIsSet(true);
+        struct.userDn = iprot.readString();
+        struct.setUserDnIsSet(true);
       }
       if (incoming.get(7)) {
         struct.generateCert = iprot.readBool();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java b/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
index 341cfa6..6ac1e7f 100644
--- a/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
+++ b/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
@@ -55,7 +55,7 @@ public class ExperimentModelUtil {
                                                     String applicationId,
                                                     List<InputDataObjectType> experimentInputList) {
         Experiment experiment = new Experiment();
-        experiment.setProjectID(projectID);
+        experiment.setProjectId(projectID);
         experiment.setUserName(userName);
         experiment.setName(experimentName);
         experiment.setDescription(expDescription);
@@ -77,7 +77,7 @@ public class ExperimentModelUtil {
 
         ComputationalResourceScheduling cmRS = new ComputationalResourceScheduling();
         cmRS.setResourceHostId(resourceHostId);
-        cmRS.setTotalCPUCount(cpuCount);
+        cmRS.setTotalCpuCount(cpuCount);
         cmRS.setNodeCount(nodeCount);
         cmRS.setNumberOfThreads(numberOfThreads);
         cmRS.setQueueName(queueName);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/thrift-interface-descriptions/experimentModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/experimentModel.thrift b/airavata-api/thrift-interface-descriptions/experimentModel.thrift
index 51aaca7..15382ab 100644
--- a/airavata-api/thrift-interface-descriptions/experimentModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/experimentModel.thrift
@@ -191,7 +191,7 @@ enum CorrectiveAction {
 */
 struct ComputationalResourceScheduling {
     1: optional string resourceHostId,
-    2: optional i32 totalCPUCount,
+    2: optional i32 totalCpuCount,
     3: optional i32 nodeCount,
     4: optional i32 numberOfThreads,
     5: optional string queueName,
@@ -247,12 +247,12 @@ struct UserConfigurationData {
     6: optional AdvancedOutputDataHandling advanceOutputDataHandling,
     7: optional QualityOfServiceParams qosParams,
     8: optional bool throttleResources = 0,
-    9: optional string userDN,
+    9: optional string userDn,
     10: optional bool generateCert = 0 
 }
 
 struct ErrorDetails {
-    1: required string errorID = DEFAULT_ID,
+    1: required string errorId = DEFAULT_ID,
     2: optional i64 creationTime,
     3: optional string actualErrorMessage,
     4: optional string userFriendlyMessage,
@@ -264,7 +264,7 @@ struct ErrorDetails {
 }
 
 struct JobDetails {
-    1: required string jobID = DEFAULT_ID,
+    1: required string jobId = DEFAULT_ID,
     2: required string jobDescription,
     3: optional i64 creationTime,
     4: optional JobStatus jobStatus,
@@ -276,7 +276,7 @@ struct JobDetails {
 }
 
 struct DataTransferDetails {
-    1: required string transferID = DEFAULT_ID,
+    1: required string transferId = DEFAULT_ID,
     2: optional i64 creationTime,
     3: required string transferDescription,
     4: optional TransferStatus transferStatus,
@@ -289,7 +289,7 @@ struct DataTransferDetails {
  *
 */
 struct TaskDetails {
-    1: required string taskID = DEFAULT_ID,
+    1: required string taskId = DEFAULT_ID,
     2: optional i64 creationTime,
     3: optional string applicationId,
     4: optional string applicationVersion,
@@ -367,8 +367,8 @@ struct ValidationResults {
 */
 
 struct Experiment {
-    1: required string experimentID = DEFAULT_ID,
-    2: required string projectID = DEFAULT_PROJECT_NAME,
+    1: required string experimentId = DEFAULT_ID,
+    2: required string projectId = DEFAULT_PROJECT_NAME,
     3: optional i64 creationTime,
     4: required string userName,
     5: required string name,
@@ -391,8 +391,8 @@ struct Experiment {
 }
 
 struct ExperimentSummary {
-    1: required string experimentID,
-    2: required string projectID,
+    1: required string experimentId,
+    2: required string projectId,
     3: optional i64 creationTime,
     4: required string userName,
     5: required string name,

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/thrift-interface-descriptions/workspaceModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/workspaceModel.thrift b/airavata-api/thrift-interface-descriptions/workspaceModel.thrift
index 803cea8..16aea3c 100644
--- a/airavata-api/thrift-interface-descriptions/workspaceModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/workspaceModel.thrift
@@ -41,7 +41,7 @@ struct Group {
 }
 
 struct Project {
-    1: required string projectID = experimentModel.DEFAULT_PROJECT_NAME,
+    1: required string projectId = experimentModel.DEFAULT_PROJECT_NAME,
     2: required string owner,
     3: required string name,
     4: optional string description

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
index 213b834..e1188b6 100644
--- a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
+++ b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
@@ -1311,10 +1311,10 @@ import org.slf4j.LoggerFactory;
      * Performs a deep copy on <i>other</i>.
      */
     public submitJob_args(submitJob_args other) {
-      if (other.isSetExperimentId()) {
+      if (other.issetExperimentId()) {
         this.experimentId = other.experimentId;
       }
-      if (other.isSetTaskId()) {
+      if (other.issetTaskId()) {
         this.taskId = other.taskId;
       }
       if (other.isSetGatewayId()) {
@@ -1351,7 +1351,7 @@ import org.slf4j.LoggerFactory;
     }
 
     /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
-    public boolean isSetExperimentId() {
+    public boolean issetExperimentId() {
       return this.experimentId != null;
     }
 
@@ -1375,7 +1375,7 @@ import org.slf4j.LoggerFactory;
     }
 
     /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTaskId() {
+    public boolean issetTaskId() {
       return this.taskId != null;
     }
 
@@ -1496,9 +1496,9 @@ import org.slf4j.LoggerFactory;
 
       switch (field) {
       case EXPERIMENT_ID:
-        return isSetExperimentId();
+        return issetExperimentId();
       case TASK_ID:
-        return isSetTaskId();
+        return issetTaskId();
       case GATEWAY_ID:
         return isSetGatewayId();
       case TOKEN_ID:
@@ -1520,8 +1520,8 @@ import org.slf4j.LoggerFactory;
       if (that == null)
         return false;
 
-      boolean this_present_experimentId = true && this.isSetExperimentId();
-      boolean that_present_experimentId = true && that.isSetExperimentId();
+      boolean this_present_experimentId = true && this.issetExperimentId();
+      boolean that_present_experimentId = true && that.issetExperimentId();
       if (this_present_experimentId || that_present_experimentId) {
         if (!(this_present_experimentId && that_present_experimentId))
           return false;
@@ -1529,8 +1529,8 @@ import org.slf4j.LoggerFactory;
           return false;
       }
 
-      boolean this_present_taskId = true && this.isSetTaskId();
-      boolean that_present_taskId = true && that.isSetTaskId();
+      boolean this_present_taskId = true && this.issetTaskId();
+      boolean that_present_taskId = true && that.issetTaskId();
       if (this_present_taskId || that_present_taskId) {
         if (!(this_present_taskId && that_present_taskId))
           return false;
@@ -1572,21 +1572,21 @@ import org.slf4j.LoggerFactory;
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
+      lastComparison = Boolean.valueOf(issetExperimentId()).compareTo(other.issetExperimentId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetExperimentId()) {
+      if (issetExperimentId()) {
         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
         if (lastComparison != 0) {
           return lastComparison;
         }
       }
-      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId());
+      lastComparison = Boolean.valueOf(issetTaskId()).compareTo(other.issetTaskId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetTaskId()) {
+      if (issetTaskId()) {
         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
         if (lastComparison != 0) {
           return lastComparison;
@@ -2300,10 +2300,10 @@ import org.slf4j.LoggerFactory;
      * Performs a deep copy on <i>other</i>.
      */
     public cancelJob_args(cancelJob_args other) {
-      if (other.isSetExperimentId()) {
+      if (other.issetExperimentId()) {
         this.experimentId = other.experimentId;
       }
-      if (other.isSetTaskId()) {
+      if (other.issetTaskId()) {
         this.taskId = other.taskId;
       }
       if (other.isSetGatewayId()) {
@@ -2340,7 +2340,7 @@ import org.slf4j.LoggerFactory;
     }
 
     /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
-    public boolean isSetExperimentId() {
+    public boolean issetExperimentId() {
       return this.experimentId != null;
     }
 
@@ -2364,7 +2364,7 @@ import org.slf4j.LoggerFactory;
     }
 
     /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTaskId() {
+    public boolean issetTaskId() {
       return this.taskId != null;
     }
 
@@ -2485,9 +2485,9 @@ import org.slf4j.LoggerFactory;
 
       switch (field) {
       case EXPERIMENT_ID:
-        return isSetExperimentId();
+        return issetExperimentId();
       case TASK_ID:
-        return isSetTaskId();
+        return issetTaskId();
       case GATEWAY_ID:
         return isSetGatewayId();
       case TOKEN_ID:
@@ -2509,8 +2509,8 @@ import org.slf4j.LoggerFactory;
       if (that == null)
         return false;
 
-      boolean this_present_experimentId = true && this.isSetExperimentId();
-      boolean that_present_experimentId = true && that.isSetExperimentId();
+      boolean this_present_experimentId = true && this.issetExperimentId();
+      boolean that_present_experimentId = true && that.issetExperimentId();
       if (this_present_experimentId || that_present_experimentId) {
         if (!(this_present_experimentId && that_present_experimentId))
           return false;
@@ -2518,8 +2518,8 @@ import org.slf4j.LoggerFactory;
           return false;
       }
 
-      boolean this_present_taskId = true && this.isSetTaskId();
-      boolean that_present_taskId = true && that.isSetTaskId();
+      boolean this_present_taskId = true && this.issetTaskId();
+      boolean that_present_taskId = true && that.issetTaskId();
       if (this_present_taskId || that_present_taskId) {
         if (!(this_present_taskId && that_present_taskId))
           return false;
@@ -2561,21 +2561,21 @@ import org.slf4j.LoggerFactory;
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
+      lastComparison = Boolean.valueOf(issetExperimentId()).compareTo(other.issetExperimentId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetExperimentId()) {
+      if (issetExperimentId()) {
         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
         if (lastComparison != 0) {
           return lastComparison;
         }
       }
-      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId());
+      lastComparison = Boolean.valueOf(issetTaskId()).compareTo(other.issetTaskId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetTaskId()) {
+      if (issetTaskId()) {
         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
         if (lastComparison != 0) {
           return lastComparison;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java b/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
index eb8ddf7..37c5e53 100644
--- a/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
+++ b/modules/gfac/airavata-gfac-stubs/src/main/java/org/apache/airavata/gfac/cpi/GfacService.java
@@ -1287,10 +1287,10 @@ import org.slf4j.LoggerFactory;
      * Performs a deep copy on <i>other</i>.
      */
     public submitJob_args(submitJob_args other) {
-      if (other.isSetExperimentId()) {
+      if (other.issetExperimentId()) {
         this.experimentId = other.experimentId;
       }
-      if (other.isSetTaskId()) {
+      if (other.issetTaskId()) {
         this.taskId = other.taskId;
       }
       if (other.isSetGatewayId()) {
@@ -1323,7 +1323,7 @@ import org.slf4j.LoggerFactory;
     }
 
     /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
-    public boolean isSetExperimentId() {
+    public boolean issetExperimentId() {
       return this.experimentId != null;
     }
 
@@ -1347,7 +1347,7 @@ import org.slf4j.LoggerFactory;
     }
 
     /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTaskId() {
+    public boolean issetTaskId() {
       return this.taskId != null;
     }
 
@@ -1433,9 +1433,9 @@ import org.slf4j.LoggerFactory;
 
       switch (field) {
       case EXPERIMENT_ID:
-        return isSetExperimentId();
+        return issetExperimentId();
       case TASK_ID:
-        return isSetTaskId();
+        return issetTaskId();
       case GATEWAY_ID:
         return isSetGatewayId();
       }
@@ -1455,8 +1455,8 @@ import org.slf4j.LoggerFactory;
       if (that == null)
         return false;
 
-      boolean this_present_experimentId = true && this.isSetExperimentId();
-      boolean that_present_experimentId = true && that.isSetExperimentId();
+      boolean this_present_experimentId = true && this.issetExperimentId();
+      boolean that_present_experimentId = true && that.issetExperimentId();
       if (this_present_experimentId || that_present_experimentId) {
         if (!(this_present_experimentId && that_present_experimentId))
           return false;
@@ -1464,8 +1464,8 @@ import org.slf4j.LoggerFactory;
           return false;
       }
 
-      boolean this_present_taskId = true && this.isSetTaskId();
-      boolean that_present_taskId = true && that.isSetTaskId();
+      boolean this_present_taskId = true && this.issetTaskId();
+      boolean that_present_taskId = true && that.issetTaskId();
       if (this_present_taskId || that_present_taskId) {
         if (!(this_present_taskId && that_present_taskId))
           return false;
@@ -1498,21 +1498,21 @@ import org.slf4j.LoggerFactory;
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
+      lastComparison = Boolean.valueOf(issetExperimentId()).compareTo(other.issetExperimentId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetExperimentId()) {
+      if (issetExperimentId()) {
         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
         if (lastComparison != 0) {
           return lastComparison;
         }
       }
-      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId());
+      lastComparison = Boolean.valueOf(issetTaskId()).compareTo(other.issetTaskId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetTaskId()) {
+      if (issetTaskId()) {
         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
         if (lastComparison != 0) {
           return lastComparison;
@@ -2171,10 +2171,10 @@ import org.slf4j.LoggerFactory;
      * Performs a deep copy on <i>other</i>.
      */
     public cancelJob_args(cancelJob_args other) {
-      if (other.isSetExperimentId()) {
+      if (other.issetExperimentId()) {
         this.experimentId = other.experimentId;
       }
-      if (other.isSetTaskId()) {
+      if (other.issetTaskId()) {
         this.taskId = other.taskId;
       }
     }
@@ -2203,7 +2203,7 @@ import org.slf4j.LoggerFactory;
     }
 
     /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
-    public boolean isSetExperimentId() {
+    public boolean issetExperimentId() {
       return this.experimentId != null;
     }
 
@@ -2227,7 +2227,7 @@ import org.slf4j.LoggerFactory;
     }
 
     /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTaskId() {
+    public boolean issetTaskId() {
       return this.taskId != null;
     }
 
@@ -2278,9 +2278,9 @@ import org.slf4j.LoggerFactory;
 
       switch (field) {
       case EXPERIMENT_ID:
-        return isSetExperimentId();
+        return issetExperimentId();
       case TASK_ID:
-        return isSetTaskId();
+        return issetTaskId();
       }
       throw new IllegalStateException();
     }
@@ -2298,8 +2298,8 @@ import org.slf4j.LoggerFactory;
       if (that == null)
         return false;
 
-      boolean this_present_experimentId = true && this.isSetExperimentId();
-      boolean that_present_experimentId = true && that.isSetExperimentId();
+      boolean this_present_experimentId = true && this.issetExperimentId();
+      boolean that_present_experimentId = true && that.issetExperimentId();
       if (this_present_experimentId || that_present_experimentId) {
         if (!(this_present_experimentId && that_present_experimentId))
           return false;
@@ -2307,8 +2307,8 @@ import org.slf4j.LoggerFactory;
           return false;
       }
 
-      boolean this_present_taskId = true && this.isSetTaskId();
-      boolean that_present_taskId = true && that.isSetTaskId();
+      boolean this_present_taskId = true && this.issetTaskId();
+      boolean that_present_taskId = true && that.issetTaskId();
       if (this_present_taskId || that_present_taskId) {
         if (!(this_present_taskId && that_present_taskId))
           return false;
@@ -2332,21 +2332,21 @@ import org.slf4j.LoggerFactory;
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
+      lastComparison = Boolean.valueOf(issetExperimentId()).compareTo(other.issetExperimentId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetExperimentId()) {
+      if (issetExperimentId()) {
         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
         if (lastComparison != 0) {
           return lastComparison;
         }
       }
-      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId());
+      lastComparison = Boolean.valueOf(issetTaskId()).compareTo(other.issetTaskId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetTaskId()) {
+      if (issetTaskId()) {
         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
         if (lastComparison != 0) {
           return lastComparison;


[10/44] airavata git commit: Adding mongo-registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
new file mode 100644
index 0000000..ef3152f
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
@@ -0,0 +1,714 @@
+/*
+*
+* 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.persistance.registry.jpa.utils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.airavata.common.utils.StringUtil;
+import org.apache.airavata.model.appcatalog.appinterface.*;
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.model.workspace.experiment.ActionableGroup;
+import org.apache.airavata.model.workspace.experiment.AdvancedInputDataHandling;
+import org.apache.airavata.model.workspace.experiment.AdvancedOutputDataHandling;
+import org.apache.airavata.model.workspace.experiment.ApplicationStatus;
+import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
+import org.apache.airavata.model.workspace.experiment.ErrorDetails;
+import org.apache.airavata.model.workspace.experiment.ExecutionUnit;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.ExperimentState;
+import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
+import org.apache.airavata.model.workspace.experiment.ExperimentSummary;
+import org.apache.airavata.model.workspace.experiment.JobDetails;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.apache.airavata.model.workspace.experiment.JobStatus;
+import org.apache.airavata.model.workspace.experiment.QualityOfServiceParams;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.model.workspace.experiment.TaskState;
+import org.apache.airavata.model.workspace.experiment.TaskStatus;
+import org.apache.airavata.model.workspace.experiment.TransferState;
+import org.apache.airavata.model.workspace.experiment.TransferStatus;
+import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeState;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeStatus;
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.resources.*;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ThriftDataModelConversion {
+    private final static Logger logger = LoggerFactory.getLogger(ThriftDataModelConversion.class);
+
+    public static Project getProject (ProjectResource pr) throws RegistryException {
+        if (pr != null) {
+            Project project = new Project();
+            project.setProjectId(pr.getId());
+            project.setName(pr.getName());
+            if (pr.getCreationTime()!=null) {
+				project.setCreationTime(pr.getCreationTime().getTime());
+			}
+			project.setDescription(pr.getDescription());
+            project.setOwner(pr.getWorker().getUser());
+            List<ProjectUserResource> projectUserList = pr.getProjectUserList();
+            List<String> sharedUsers = new ArrayList<String>();
+            if (projectUserList != null && !projectUserList.isEmpty()){
+                for (ProjectUserResource resource : projectUserList){
+                    sharedUsers.add(resource.getUserName());
+                }
+            }
+            project.setSharedUsers(sharedUsers);
+            return project;
+        }
+        return null;
+    }
+
+    public static Gateway getGateway (GatewayResource resource){
+        Gateway gateway = new Gateway();
+        gateway.setGatewayId(resource.getGatewayId());
+        gateway.setGatewayName(resource.getGatewayName());
+        gateway.setDomain(resource.getDomain());
+        gateway.setEmailAddress(resource.getEmailAddress());
+        return gateway;
+    }
+
+    public static List<Gateway> getAllGateways (List<Resource> gatewayList){
+        List<Gateway> gateways = new ArrayList<Gateway>();
+        for (Resource resource : gatewayList){
+            gateways.add(getGateway((GatewayResource)resource));
+        }
+        return gateways;
+    }
+
+
+    public static Experiment getExperiment(ExperimentResource experimentResource) throws RegistryException {
+        if (experimentResource != null){
+            Experiment experiment = new Experiment();
+            if (experimentResource.getProject()!= null){
+                experiment.setProjectId(experimentResource.getProject().getId());
+            }
+            experiment.setExperimentId(experimentResource.getExpID());
+            experiment.setCreationTime(experimentResource.getCreationTime().getTime());
+            experiment.setUserName(experimentResource.getExecutionUser());
+            experiment.setName(experimentResource.getExpName());
+            experiment.setDescription(experimentResource.getDescription());
+            experiment.setApplicationId(experimentResource.getApplicationId());
+            experiment.setApplicationVersion(experimentResource.getApplicationVersion());
+            experiment.setWorkflowTemplateId(experimentResource.getWorkflowTemplateId());
+            experiment.setEnableEmailNotification(experimentResource.isEnableEmailNotifications());
+            experiment.setGatewayExecutionId(experimentResource.getGatewayExecutionId());
+            if (experiment.isEnableEmailNotification()){
+                List<NotificationEmailResource> notificationEmails = experimentResource.getNotificationEmails();
+                experiment.setEmailAddresses(getEmailAddresses(notificationEmails));
+            }
+            experiment.setWorkflowTemplateVersion(experimentResource.getWorkflowTemplateVersion());
+            experiment.setWorkflowExecutionInstanceId(experimentResource.getWorkflowExecutionId());
+            List<ExperimentInputResource> experimentInputs = experimentResource.getExperimentInputs();
+            experiment.setExperimentInputs(getExpInputs(experimentInputs));
+            List<ExperimentOutputResource> experimentOutputs = experimentResource.getExperimentOutputs();
+            experiment.setExperimentOutputs(getExpOutputs(experimentOutputs));
+            StatusResource experimentStatus = experimentResource.getExperimentStatus();
+            if (experimentStatus != null){
+                experiment.setExperimentStatus(getExperimentStatus(experimentStatus));
+            }
+            List<StatusResource> changeList = experimentResource.getWorkflowNodeStatuses();
+            if (changeList != null && !changeList.isEmpty()){
+                experiment.setStateChangeList(getWorkflowNodeStatusList(changeList));
+            }
+
+            List<WorkflowNodeDetailResource> workflowNodeDetails = experimentResource.getWorkflowNodeDetails();
+            if (workflowNodeDetails != null && !workflowNodeDetails.isEmpty()){
+                experiment.setWorkflowNodeDetailsList(getWfNodeList(workflowNodeDetails));
+            }
+            List<ErrorDetailResource> errorDetails = experimentResource.getErrorDetails();
+            if (errorDetails!= null && !errorDetails.isEmpty()){
+                experiment.setErrors(getErrorDetailList(errorDetails));
+            }
+            String expID = experimentResource.getExpID();
+            if (experimentResource.isExists(ResourceType.CONFIG_DATA, expID)){
+                ConfigDataResource userConfigData = experimentResource.getUserConfigData(expID);
+                experiment.setUserConfigurationData(getUserConfigData(userConfigData));
+            }
+            return experiment;
+        }
+        return null;
+    }
+
+    public static ExperimentSummary getExperimentSummary(ExperimentResource experimentResource) throws RegistryException {
+        if (experimentResource != null){
+            ExperimentSummary experimentSummary = new ExperimentSummary();
+            if (experimentResource.getProject()!= null){
+                experimentSummary.setProjectId(experimentResource.getProject().getId());
+            }
+            experimentSummary.setExperimentId(experimentResource.getExpID());
+            experimentSummary.setCreationTime(experimentResource.getCreationTime().getTime());
+            experimentSummary.setUserName(experimentResource.getExecutionUser());
+            experimentSummary.setName(experimentResource.getExpName());
+            experimentSummary.setDescription(experimentResource.getDescription());
+            experimentSummary.setApplicationId(experimentResource.getApplicationId());
+            StatusResource experimentStatus = experimentResource.getExperimentStatus();
+            if (experimentStatus != null){
+                experimentSummary.setExperimentStatus(getExperimentStatus(experimentStatus));
+            }
+            List<ErrorDetailResource> errorDetails = experimentResource.getErrorDetails();
+            if (errorDetails!= null && !errorDetails.isEmpty()){
+                experimentSummary.setErrors(getErrorDetailList(errorDetails));
+            }
+            return experimentSummary;
+        }
+        return null;
+    }
+
+    public static InputDataObjectType getInput(Object object){
+        if (object != null){
+            InputDataObjectType dataObjectType = new InputDataObjectType();
+            if (object instanceof  ExperimentInputResource){
+                ExperimentInputResource expInput = (ExperimentInputResource) object;
+                dataObjectType.setName(expInput.getExperimentKey());
+                dataObjectType.setValue(expInput.getValue());
+                if (expInput.getDataType() != null){
+                    dataObjectType.setType(DataType.valueOf(expInput.getDataType()));
+                }
+                dataObjectType.setMetaData(expInput.getMetadata());
+                dataObjectType.setApplicationArgument(expInput.getAppArgument());
+                dataObjectType.setStandardInput(expInput.isStandardInput());
+                dataObjectType.setUserFriendlyDescription(expInput.getUserFriendlyDesc());
+                dataObjectType.setInputOrder(expInput.getInputOrder());
+                dataObjectType.setIsRequired(expInput.getRequired());
+                dataObjectType.setRequiredToAddedToCommandLine(expInput.getRequiredToCMD());
+                dataObjectType.setDataStaged(expInput.isDataStaged());
+                return dataObjectType;
+            }else if (object instanceof NodeInputResource){
+                NodeInputResource nodeInputResource = (NodeInputResource)object;
+                dataObjectType.setName(nodeInputResource.getInputKey());
+                dataObjectType.setValue(nodeInputResource.getValue());
+                if (nodeInputResource.getDataType() != null){
+                    dataObjectType.setType(DataType.valueOf(nodeInputResource.getDataType()));
+                }
+                dataObjectType.setMetaData(nodeInputResource.getMetadata());
+                dataObjectType.setApplicationArgument(nodeInputResource.getAppArgument());
+                dataObjectType.setStandardInput(nodeInputResource.isStandardInput());
+                dataObjectType.setUserFriendlyDescription(nodeInputResource.getUserFriendlyDesc());
+                dataObjectType.setInputOrder(nodeInputResource.getInputOrder());
+                dataObjectType.setIsRequired(nodeInputResource.getRequired());
+                dataObjectType.setRequiredToAddedToCommandLine(nodeInputResource.getRequiredToCMD());
+                dataObjectType.setDataStaged(nodeInputResource.isDataStaged());
+                return dataObjectType;
+            }else if (object instanceof ApplicationInputResource){
+                ApplicationInputResource inputResource = (ApplicationInputResource)object;
+                dataObjectType.setName(inputResource.getInputKey());
+                dataObjectType.setValue(inputResource.getValue());
+                if (inputResource.getDataType() != null){
+                    dataObjectType.setType(DataType.valueOf(inputResource.getDataType()));
+                }
+                dataObjectType.setMetaData(inputResource.getMetadata());
+                dataObjectType.setApplicationArgument(inputResource.getAppArgument());
+                dataObjectType.setStandardInput(inputResource.isStandardInput());
+                dataObjectType.setUserFriendlyDescription(inputResource.getUserFriendlyDesc());
+                dataObjectType.setInputOrder(inputResource.getInputOrder());
+                dataObjectType.setIsRequired(inputResource.isRequired());
+                dataObjectType.setRequiredToAddedToCommandLine(inputResource.isRequiredToCMD());
+                dataObjectType.setDataStaged(inputResource.isDataStaged());
+                return dataObjectType;
+            }else {
+                return null;
+            }
+        }
+        return null;
+    }
+
+    public static OutputDataObjectType getOutput(Object object){
+        if (object != null){
+            OutputDataObjectType dataObjectType = new OutputDataObjectType();
+            if (object instanceof ExperimentOutputResource){
+                ExperimentOutputResource expOutput = (ExperimentOutputResource)object;
+                dataObjectType.setName(expOutput.getExperimentKey());
+                dataObjectType.setValue(expOutput.getValue());
+                if (expOutput.getDataType() != null){
+                    dataObjectType.setType(DataType.valueOf(expOutput.getDataType()));
+                }
+                dataObjectType.setIsRequired(expOutput.getRequired());
+                dataObjectType.setRequiredToAddedToCommandLine(expOutput.getRequiredToCMD());
+                dataObjectType.setDataMovement(expOutput.isDataMovement());
+                dataObjectType.setLocation(expOutput.getDataNameLocation());
+                dataObjectType.setSearchQuery(expOutput.getSearchQuery());
+                dataObjectType.setApplicationArgument(expOutput.getAppArgument());
+                return dataObjectType;
+            }else if (object instanceof NodeOutputResource){
+                NodeOutputResource nodeOutputResource = (NodeOutputResource)object;
+                dataObjectType.setName(nodeOutputResource.getOutputKey());
+                dataObjectType.setValue(nodeOutputResource.getValue());
+                if (nodeOutputResource.getDataType() != null){
+                    dataObjectType.setType(DataType.valueOf(nodeOutputResource.getDataType()));
+                }
+                dataObjectType.setIsRequired(nodeOutputResource.getRequired());
+                dataObjectType.setRequiredToAddedToCommandLine(nodeOutputResource.getRequiredToCMD());
+                dataObjectType.setDataMovement(nodeOutputResource.isDataMovement());
+                dataObjectType.setLocation(nodeOutputResource.getDataNameLocation());
+                dataObjectType.setSearchQuery(nodeOutputResource.getSearchQuery());
+                dataObjectType.setApplicationArgument(nodeOutputResource.getAppArgument());
+                return dataObjectType;
+            }else if (object instanceof ApplicationOutputResource){
+                ApplicationOutputResource outputResource = (ApplicationOutputResource)object;
+                dataObjectType.setName(outputResource.getOutputKey());
+                dataObjectType.setValue(outputResource.getValue());
+                dataObjectType.setIsRequired(outputResource.isRequired());
+                dataObjectType.setRequiredToAddedToCommandLine(outputResource.isRequiredToCMD());
+                if (outputResource.getDataType() != null){
+                    dataObjectType.setType(DataType.valueOf(outputResource.getDataType()));
+                }
+                dataObjectType.setDataMovement(outputResource.isDataMovement());
+                dataObjectType.setLocation(outputResource.getDataNameLocation());
+                dataObjectType.setSearchQuery(outputResource.getSearchQuery());
+                dataObjectType.setApplicationArgument(outputResource.getAppArgument());
+                return dataObjectType;
+            }else {
+                return null;
+            }
+        }
+        return null;
+    }
+
+    public static List<String> getEmailAddresses (List<NotificationEmailResource> resourceList){
+        List<String> emailAddresses = new ArrayList<String>();
+        if (resourceList != null && !resourceList.isEmpty()){
+            for (NotificationEmailResource emailResource : resourceList){
+                emailAddresses.add(emailResource.getEmailAddress());
+            }
+        }
+        return emailAddresses;
+    }
+
+    public static List<InputDataObjectType> getExpInputs (List<ExperimentInputResource> exInputList){
+        List<InputDataObjectType> expInputs = new ArrayList<InputDataObjectType>();
+        if (exInputList != null && !exInputList.isEmpty()){
+            for (ExperimentInputResource inputResource : exInputList){
+                InputDataObjectType exInput = getInput(inputResource);
+                expInputs.add(exInput);
+            }
+        }
+        return expInputs;
+    }
+
+    public static List<OutputDataObjectType> getExpOutputs (List<ExperimentOutputResource> experimentOutputResourceList){
+        List<OutputDataObjectType> exOutputs = new ArrayList<OutputDataObjectType>();
+        if (experimentOutputResourceList != null && !experimentOutputResourceList.isEmpty()){
+            for (ExperimentOutputResource outputResource : experimentOutputResourceList){
+                OutputDataObjectType output = getOutput(outputResource);
+                exOutputs.add(output);
+            }
+        }
+        return exOutputs;
+    }
+
+    public static List<InputDataObjectType> getNodeInputs (List<NodeInputResource> nodeInputResources){
+        List<InputDataObjectType> nodeInputs = new ArrayList<InputDataObjectType>();
+        if (nodeInputResources != null && !nodeInputResources.isEmpty()){
+            for (NodeInputResource inputResource : nodeInputResources){
+                InputDataObjectType nodeInput = getInput(inputResource);
+                nodeInputs.add(nodeInput);
+            }
+        }
+        return nodeInputs;
+    }
+
+    public static List<OutputDataObjectType> getNodeOutputs (List<NodeOutputResource> nodeOutputResourceList){
+        List<OutputDataObjectType> nodeOutputs = new ArrayList<OutputDataObjectType>();
+        if (nodeOutputResourceList != null && !nodeOutputResourceList.isEmpty()){
+            for (NodeOutputResource outputResource : nodeOutputResourceList){
+                OutputDataObjectType output = getOutput(outputResource);
+                nodeOutputs.add(output);
+            }
+        }
+        return nodeOutputs;
+    }
+
+    public static List<InputDataObjectType> getApplicationInputs (List<ApplicationInputResource> applicationInputResources){
+        List<InputDataObjectType> appInputs = new ArrayList<InputDataObjectType>();
+        if (applicationInputResources != null && !applicationInputResources.isEmpty()){
+            for (ApplicationInputResource inputResource : applicationInputResources){
+                InputDataObjectType appInput = getInput(inputResource);
+                appInputs.add(appInput);
+            }
+        }
+        return appInputs;
+    }
+
+    public static List<OutputDataObjectType> getApplicationOutputs (List<ApplicationOutputResource> outputResources){
+        List<OutputDataObjectType> appOutputs = new ArrayList<OutputDataObjectType>();
+        if (outputResources != null && !outputResources.isEmpty()){
+            for (ApplicationOutputResource outputResource : outputResources){
+                OutputDataObjectType output = getOutput(outputResource);
+                appOutputs.add(output);
+            }
+        }
+        return appOutputs;
+    }
+
+    public static ExperimentStatus getExperimentStatus(StatusResource status){
+        if (status != null){
+            ExperimentStatus experimentStatus = new ExperimentStatus();
+            if (status.getState() == null || status.getState().equals("")){
+                status.setState("UNKNOWN");
+            }
+            experimentStatus.setExperimentState(ExperimentState.valueOf(status.getState()));
+            experimentStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
+            return experimentStatus;
+        }
+        return null;
+    }
+
+    public static WorkflowNodeStatus getWorkflowNodeStatus (StatusResource status){
+        if (status != null){
+            WorkflowNodeStatus workflowNodeStatus = new WorkflowNodeStatus();
+            if (status.getState() == null || status.getState().equals("")){
+                status.setState("UNKNOWN");
+            }
+            workflowNodeStatus.setWorkflowNodeState(WorkflowNodeState.valueOf(status.getState()));
+            workflowNodeStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
+            return workflowNodeStatus;
+        }
+        return null;
+    }
+
+    public static TaskStatus getTaskStatus (StatusResource status){
+        if (status != null){
+            TaskStatus taskStatus = new TaskStatus();
+            if (status.getState() == null || status.getState().equals("")){
+                status.setState("UNKNOWN");
+            }
+            taskStatus.setExecutionState(TaskState.valueOf(status.getState()));
+            taskStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
+            return taskStatus;
+        }
+        return null;
+    }
+
+    public static JobStatus getJobStatus (StatusResource status){
+        if (status != null){
+            JobStatus jobStatus = new JobStatus();
+            if (status.getState() == null || status.getState().equals("")){
+                status.setState("UNKNOWN");
+            }
+            jobStatus.setJobState(JobState.valueOf(status.getState()));
+            jobStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
+            return jobStatus;
+        }
+        return null;
+    }
+
+    public static TransferStatus getTransferStatus (StatusResource status){
+        if (status != null){
+            TransferStatus transferStatus = new TransferStatus();
+            if (status.getState() == null || status.getState().equals("")){
+                status.setState("UNKNOWN");
+            }
+            transferStatus.setTransferState(TransferState.valueOf(status.getState()));
+            transferStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
+            return transferStatus;
+        }
+        return null;
+    }
+
+    public static ApplicationStatus getApplicationStatus (StatusResource status){
+        if (status != null){
+            ApplicationStatus applicationStatus = new ApplicationStatus();
+            if (status.getState() == null || status.getState().equals("")){
+                status.setState("UNKNOWN");
+            }
+            applicationStatus.setApplicationState(status.getState());
+            applicationStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
+            return applicationStatus;
+        }
+        return null;
+    }
+
+    public static List<WorkflowNodeStatus> getWorkflowNodeStatusList(List<StatusResource> statuses){
+        List<WorkflowNodeStatus> wfNodeStatuses = new ArrayList<WorkflowNodeStatus>();
+        if (statuses != null && !statuses.isEmpty()){
+            for (StatusResource statusResource : statuses){
+                wfNodeStatuses.add(getWorkflowNodeStatus(statusResource));
+            }
+        }
+        return wfNodeStatuses;
+    }
+
+    public static WorkflowNodeDetails getWorkflowNodeDetails(WorkflowNodeDetailResource nodeDetailResource) throws RegistryException {
+        if (nodeDetailResource != null){
+            WorkflowNodeDetails wfNode = new WorkflowNodeDetails();
+            wfNode.setNodeInstanceId(nodeDetailResource.getNodeInstanceId());
+            wfNode.setCreationTime(nodeDetailResource.getCreationTime().getTime());
+            wfNode.setNodeName(nodeDetailResource.getNodeName());
+            List<NodeInputResource> nodeInputs = nodeDetailResource.getNodeInputs();
+            wfNode.setNodeInputs(getNodeInputs(nodeInputs));
+            List<NodeOutputResource> nodeOutputs = nodeDetailResource.getNodeOutputs();
+            wfNode.setNodeOutputs(getNodeOutputs(nodeOutputs));
+            List<TaskDetailResource> taskDetails = nodeDetailResource.getTaskDetails();
+            wfNode.setTaskDetailsList(getTaskDetailsList(taskDetails));
+            wfNode.setWorkflowNodeStatus(getWorkflowNodeStatus(nodeDetailResource.getWorkflowNodeStatus()));
+            List<ErrorDetailResource> errorDetails = nodeDetailResource.getErrorDetails();
+            wfNode.setErrors(getErrorDetailList(errorDetails));
+            wfNode.setExecutionUnit(ExecutionUnit.valueOf(nodeDetailResource.getExecutionUnit()));
+            wfNode.setExecutionUnitData(nodeDetailResource.getExecutionUnitData());
+            return wfNode;
+        }
+        return null;
+    }
+
+    public static List<WorkflowNodeDetails> getWfNodeList (List<WorkflowNodeDetailResource> resources) throws RegistryException {
+        List<WorkflowNodeDetails> workflowNodeDetailsList = new ArrayList<WorkflowNodeDetails>();
+        if (resources != null && !resources.isEmpty()){
+            for (WorkflowNodeDetailResource resource : resources){
+                workflowNodeDetailsList.add(getWorkflowNodeDetails(resource));
+            }
+        }
+        return workflowNodeDetailsList;
+    }
+
+    public static TaskDetails getTaskDetail (TaskDetailResource taskDetailResource) throws RegistryException {
+        if (taskDetailResource != null){
+            TaskDetails taskDetails = new TaskDetails();
+            String taskId = taskDetailResource.getTaskId();
+            taskDetails.setTaskId(taskId);
+            taskDetails.setApplicationId(taskDetailResource.getApplicationId());
+            taskDetails.setApplicationVersion(taskDetailResource.getApplicationVersion());
+            List<ApplicationInputResource> applicationInputs = taskDetailResource.getApplicationInputs();
+            taskDetails.setApplicationInputs(getApplicationInputs(applicationInputs));
+            List<ApplicationOutputResource> applicationOutputs = taskDetailResource.getApplicationOutputs();
+            taskDetails.setApplicationOutputs(getApplicationOutputs(applicationOutputs));
+            taskDetails.setEnableEmailNotification(taskDetailResource.isEnableEmailNotifications());
+            if (taskDetails.isEnableEmailNotification()){
+                List<NotificationEmailResource> notificationEmails = taskDetailResource.getNotificationEmails();
+                taskDetails.setEmailAddresses(getEmailAddresses(notificationEmails));
+            }
+            taskDetails.setApplicationDeploymentId(taskDetailResource.getApplicationDeploymentId());
+            if (taskDetailResource.isExists(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING, taskId)){
+                ComputationSchedulingResource computationScheduling = taskDetailResource.getComputationScheduling(taskId);
+                taskDetails.setTaskScheduling(getComputationalResourceScheduling(computationScheduling));
+            }
+
+            if (taskDetailResource.isExists(ResourceType.ADVANCE_INPUT_DATA_HANDLING, taskId)){
+                AdvanceInputDataHandlingResource inputDataHandling = taskDetailResource.getInputDataHandling(taskId);
+                taskDetails.setAdvancedInputDataHandling(getAdvanceInputDataHandling(inputDataHandling));
+            }
+
+            if (taskDetailResource.isExists(ResourceType.ADVANCE_OUTPUT_DATA_HANDLING, taskId)){
+                AdvancedOutputDataHandlingResource outputDataHandling = taskDetailResource.getOutputDataHandling(taskId);
+                taskDetails.setAdvancedOutputDataHandling(getAdvanceOutputDataHandling(outputDataHandling));
+            }
+
+            taskDetails.setTaskStatus(getTaskStatus(taskDetailResource.getTaskStatus()));
+            List<JobDetailResource> jobDetailList = taskDetailResource.getJobDetailList();
+            taskDetails.setJobDetailsList(getJobDetailsList(jobDetailList));
+            taskDetails.setErrors(getErrorDetailList(taskDetailResource.getErrorDetailList()));
+            taskDetails.setDataTransferDetailsList(getDataTransferlList(taskDetailResource.getDataTransferDetailList()));
+            return taskDetails;
+        }
+        return null;
+    }
+
+    public static List<TaskDetails> getTaskDetailsList (List<TaskDetailResource> resources) throws RegistryException {
+        List<TaskDetails> taskDetailsList = new ArrayList<TaskDetails>();
+        if (resources != null && !resources.isEmpty()){
+            for (TaskDetailResource resource : resources){
+                taskDetailsList.add(getTaskDetail(resource));
+            }
+        }
+        return taskDetailsList;
+    }
+
+    public static List<JobDetails> getJobDetailsList(List<JobDetailResource> jobs) throws RegistryException {
+        List<JobDetails> jobDetailsList = new ArrayList<JobDetails>();
+        if (jobs != null && !jobs.isEmpty()){
+            for (JobDetailResource resource : jobs){
+                jobDetailsList.add(getJobDetail(resource));
+            }
+        }
+        return jobDetailsList;
+    }
+
+
+    public static JobDetails getJobDetail(JobDetailResource jobDetailResource) throws RegistryException {
+        if (jobDetailResource != null){
+            JobDetails jobDetails = new JobDetails();
+            jobDetails.setJobId(jobDetailResource.getJobId());
+            jobDetails.setJobDescription(jobDetailResource.getJobDescription());
+            jobDetails.setCreationTime(jobDetailResource.getCreationTime().getTime());
+            StatusResource jobStatus = jobDetailResource.getJobStatus();
+            jobDetails.setJobStatus(getJobStatus(jobStatus));
+            jobDetails.setJobName(jobDetailResource.getJobName());
+            jobDetails.setWorkingDir(jobDetailResource.getWorkingDir());
+            StatusResource applicationStatus = jobDetailResource.getApplicationStatus();
+            jobDetails.setApplicationStatus(getApplicationStatus(applicationStatus));
+            List<ErrorDetailResource> errorDetails = jobDetailResource.getErrorDetails();
+            jobDetails.setErrors(getErrorDetailList(errorDetails));
+            jobDetails.setComputeResourceConsumed(jobDetailResource.getComputeResourceConsumed());
+            return jobDetails;
+        }
+        return null;
+    }
+
+    public static ErrorDetails getErrorDetails (ErrorDetailResource resource){
+        if (resource != null){
+            ErrorDetails errorDetails = new ErrorDetails();
+            errorDetails.setErrorId(String.valueOf(resource.getErrorId()));
+            errorDetails.setCreationTime(resource.getCreationTime().getTime());
+            errorDetails.setActualErrorMessage(resource.getActualErrorMsg());
+            errorDetails.setUserFriendlyMessage(resource.getUserFriendlyErrorMsg());
+            errorDetails.setErrorCategory(ErrorCategory.valueOf(resource.getErrorCategory()));
+            errorDetails.setTransientOrPersistent(resource.isTransientPersistent());
+            errorDetails.setCorrectiveAction(CorrectiveAction.valueOf(resource.getCorrectiveAction()));
+            errorDetails.setActionableGroup(ActionableGroup.valueOf(resource.getActionableGroup()));
+            return errorDetails;
+        }
+        return null;
+    }
+
+    public static List<ErrorDetails> getErrorDetailList (List<ErrorDetailResource> errorDetailResources){
+        List<ErrorDetails> errorDetailsList = new ArrayList<ErrorDetails>();
+        if (errorDetailResources != null && !errorDetailResources.isEmpty()){
+            for (ErrorDetailResource errorDetailResource : errorDetailResources){
+                errorDetailsList.add(getErrorDetails(errorDetailResource));
+            }
+        }
+        return errorDetailsList;
+    }
+
+    public static DataTransferDetails getDataTransferDetail (DataTransferDetailResource resource) throws RegistryException {
+        if (resource != null){
+            DataTransferDetails details = new DataTransferDetails();
+            details.setTransferId(resource.getTransferId());
+            details.setCreationTime(resource.getCreationTime().getTime());
+            details.setTransferDescription(resource.getTransferDescription());
+            details.setTransferStatus(getTransferStatus(resource.getDataTransferStatus()));
+            return details;
+        }
+        return null;
+    }
+
+    public static List<DataTransferDetails> getDataTransferlList (List<DataTransferDetailResource> resources) throws RegistryException {
+        List<DataTransferDetails> transferDetailsList = new ArrayList<DataTransferDetails>();
+        if (resources != null && !resources.isEmpty()){
+            for (DataTransferDetailResource resource : resources){
+                transferDetailsList.add(getDataTransferDetail(resource));
+            }
+        }
+        return transferDetailsList;
+    }
+
+
+    public static UserConfigurationData getUserConfigData (ConfigDataResource resource) throws RegistryException {
+        if (resource != null){
+            UserConfigurationData data = new UserConfigurationData();
+            data.setAiravataAutoSchedule(resource.isAiravataAutoSchedule());
+            data.setOverrideManualScheduledParams(resource.isOverrideManualParams());
+            data.setShareExperimentPublicly(resource.isShareExp());
+            data.setUserDn(resource.getUserDn());
+            data.setGenerateCert(resource.isGenerateCert());
+            ExperimentResource experimentResource = resource.getExperimentResource();
+            String expID = experimentResource.getExpID();
+            if (experimentResource.isExists(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING, expID)){
+                ComputationSchedulingResource computationScheduling = experimentResource.getComputationScheduling(expID);
+                data.setComputationalResourceScheduling(getComputationalResourceScheduling(computationScheduling));
+            }
+
+            if (experimentResource.isExists(ResourceType.ADVANCE_INPUT_DATA_HANDLING, expID)){
+                AdvanceInputDataHandlingResource inputDataHandling = experimentResource.getInputDataHandling(expID);
+                data.setAdvanceInputDataHandling(getAdvanceInputDataHandling(inputDataHandling));
+            }
+
+            if (experimentResource.isExists(ResourceType.ADVANCE_OUTPUT_DATA_HANDLING, expID)){
+                AdvancedOutputDataHandlingResource outputDataHandling = experimentResource.getOutputDataHandling(expID);
+                data.setAdvanceOutputDataHandling(getAdvanceOutputDataHandling(outputDataHandling));
+            }
+
+            if (experimentResource.isExists(ResourceType.QOS_PARAM, expID)){
+                QosParamResource qoSparams = experimentResource.getQOSparams(expID);
+                data.setQosParams(getQOSParams(qoSparams));
+            }
+            return data;
+        }
+        return null;
+    }
+
+
+    public static ComputationalResourceScheduling getComputationalResourceScheduling (ComputationSchedulingResource csr){
+        if (csr != null){
+            ComputationalResourceScheduling scheduling = new ComputationalResourceScheduling();
+            scheduling.setResourceHostId(csr.getResourceHostId());
+            scheduling.setTotalCpuCount(csr.getCpuCount());
+            scheduling.setNodeCount(csr.getNodeCount());
+            scheduling.setNumberOfThreads(csr.getNumberOfThreads());
+            scheduling.setQueueName(csr.getQueueName());
+            scheduling.setWallTimeLimit(csr.getWalltimeLimit());
+            scheduling.setJobStartTime((int)csr.getJobStartTime().getTime());
+            scheduling.setTotalPhysicalMemory(csr.getPhysicalMemory());
+            scheduling.setComputationalProjectAccount(csr.getProjectName());
+            scheduling.setChassisName(csr.getChessisName());
+            return scheduling;
+        }
+        return null;
+    }
+
+    public static AdvancedInputDataHandling getAdvanceInputDataHandling(AdvanceInputDataHandlingResource adhr){
+        if (adhr != null){
+            AdvancedInputDataHandling adih = new AdvancedInputDataHandling();
+            adih.setStageInputFilesToWorkingDir(adhr.isStageInputFiles());
+            adih.setParentWorkingDirectory(adhr.getWorkingDirParent());
+            adih.setUniqueWorkingDirectory(adhr.getWorkingDir());
+            adih.setCleanUpWorkingDirAfterJob(adhr.isCleanAfterJob());
+            return adih;
+        }
+        return null;
+    }
+
+    public static AdvancedOutputDataHandling getAdvanceOutputDataHandling(AdvancedOutputDataHandlingResource adodh){
+        if (adodh != null){
+            AdvancedOutputDataHandling outputDataHandling = new AdvancedOutputDataHandling();
+            outputDataHandling.setOutputDataDir(adodh.getOutputDataDir());
+            outputDataHandling.setDataRegistryURL(adodh.getDataRegUrl());
+            outputDataHandling.setPersistOutputData(adodh.isPersistOutputData());
+            return outputDataHandling;
+        }
+        return null;
+    }
+
+    public static QualityOfServiceParams getQOSParams (QosParamResource qos){
+        if (qos != null){
+            QualityOfServiceParams qosParams = new QualityOfServiceParams();
+            qosParams.setStartExecutionAt(qos.getStartExecutionAt());
+            qosParams.setExecuteBefore(qos.getExecuteBefore());
+            qosParams.setNumberofRetries(qos.getNoOfRetries());
+            return qosParams;
+        }
+        return null;
+    }
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/resources/META-INF/persistence.xml b/modules/registry/airavata-mongo-registry/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000..2ba8ce4
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,65 @@
+<?xml version="1.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.
+ *
+* -->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
+    <persistence-unit name="airavata_data">
+        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+        <class>org.apache.airavata.persistance.registry.jpa.model.Gateway</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.Configuration</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.Users</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.Gateway_Worker</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.Project</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.ProjectUser</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.Notification_Email</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Input</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.Experiment_Output</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.WorkflowNodeDetail</class>
+        <class>org.apache.airavata.persistance.registry.jpa.model.TaskDetail</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.ErrorDetail</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.ApplicationInput</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.ApplicationOutput</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.NodeInput</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.NodeOutput</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.JobDetail</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.DataTransferDetail</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.Status</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.ExperimentConfigData</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.Computational_Resource_Scheduling</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.AdvancedInputDataHandling</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.AdvancedOutputDataHandling</class>
+		<class>org.apache.airavata.persistance.registry.jpa.model.QosParam</class>
+        <exclude-unlisted-classes>true</exclude-unlisted-classes>
+        <properties>
+            <property name="openjpa.ConnectionURL"
+                      value="jdbc:mysql://localhost:3306/persitant_data" />
+            <property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver" />
+            <property name="openjpa.ConnectionUserName" value="airavata" />
+            <property name="openjpa.ConnectionPassword" value="airavata" />
+            <property name="openjpa.DynamicEnhancementAgent" value="true" />
+            <property name="openjpa.RuntimeUnenhancedClasses" value="supported" />
+            <property name="openjpa.Log" value="SQL=TRACE" />
+            <property name="openjpa.ConnectionFactoryProperties"
+                      value="PrettyPrint=true, PrettyPrintLineLength=72, PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=60000" />
+       </properties>
+    </persistence-unit>
+</persistence>

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/resources/airavata-server.properties b/modules/registry/airavata-mongo-registry/src/main/resources/airavata-server.properties
new file mode 100644
index 0000000..0bdb522
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/resources/airavata-server.properties
@@ -0,0 +1,280 @@
+#
+#
+# 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.
+#
+
+###########################################################################
+#
+#  This properties file provides configuration for all Airavata Services:
+#  API Server, Registry, Workflow Interpreter, GFac, Orchestrator
+#
+###########################################################################
+
+###########################################################################
+#  API Server Registry Configuration
+###########################################################################
+
+#for derby [AiravataJPARegistry]
+#registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+#registry.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
+# MySql database configuration
+registry.jdbc.driver=com.mysql.jdbc.Driver
+registry.jdbc.url=jdbc:mysql://localhost:3306/airavata-registry
+registry.jdbc.user=root
+registry.jdbc.password=
+start.derby.server.mode=true
+validationQuery=SELECT 1 from CONFIGURATION
+cache.enable=true
+jpa.cache.size=5000
+#jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true
+
+# Properties for default user mode
+default.registry.user=admin
+default.registry.password=admin
+default.registry.password.hash.method=SHA
+default.registry.gateway=php_reference_gateway
+
+#ip=127.0.0.1
+
+###########################################################################
+#  Application Catalog DB Configuration
+###########################################################################
+#for derby [AiravataJPARegistry]
+appcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+appcatalog.jdbc.url=jdbc:derby://localhost:1527/app_catalog;create=true;user=airavata;password=airavata
+# MySql database configuration
+#appcatalog.jdbc.driver=com.mysql.jdbc.Driver
+#appcatalog.jdbc.url=jdbc:mysql://localhost:3306/app_catalog
+appcatalog.jdbc.user=airavata
+appcatalog.jdbc.password=airavata
+appcatalog.validationQuery=SELECT 1 from CONFIGURATION
+
+###########################################################################
+#  Server module Configuration
+###########################################################################
+
+servers=apiserver,orchestrator,gfac,credentialstore
+#shutdown.trategy=NONE
+shutdown.trategy=SELF_TERMINATE
+
+
+apiserver.server.host=localhost
+apiserver.server.port=8930
+apiserver.server.min.threads=50
+orchestrator.server.host=localhost
+orchestrator.server.port=8940
+gfac.server.host=localhost
+gfac.server.port=8950
+orchestrator.server.min.threads=50
+
+###########################################################################
+#  Job Scheduler can send informative email messages to you about the status of your job.
+# Specify a string which consists of either the single character "n" (no mail), or one or more
+#  of the characters "a" (send mail when job is aborted), "b" (send mail when job begins),
+# and "e" (send mail when job terminates).  The default is "a" if not specified.
+###########################################################################
+
+job.notification.enable=true
+#Provide comma separated email ids as a string if more than one
+job.notification.emailids=
+job.notification.flags=abe
+
+###########################################################################
+# Credential Store module Configuration
+###########################################################################
+start.credential.store=false
+credential.store.keystore.url=/Users/chathuri/dev/airavata/credential-store/oa4mp/airavata_sym.jks
+credential.store.keystore.alias=airavata
+credential.store.keystore.password=airavata
+credential.store.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
+credential.store.jdbc.user=airavata
+credential.store.jdbc.password=airavata
+credential.store.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+credential.store.server.host=localhost
+credential.store.server.port=8960
+credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
+credential.store.thrift.server.keystore=/Users/chathuri/dev/airavata/credential-store/oa4mp/airavata.jks
+credential.store.thrift.server.keystore.password=airavata
+
+notifier.enabled=false
+#period in milliseconds
+notifier.duration=5000
+
+email.server=smtp.googlemail.com
+email.server.port=465
+email.user=airavata
+email.password=xxx
+email.ssl=true
+email.from=airavata@apache.org
+
+###########################################################################
+# Airavata GFac MyProxy GSI credentials to access Grid Resources.
+###########################################################################
+#
+# Security Configuration used by Airavata Generic Factory Service
+#  to interact with Computational Resources.
+#
+gfac.thread.pool.size=50
+airavata.server.thread.pool.size=50
+gfac=org.apache.airavata.gfac.server.GfacServer
+myproxy.server=myproxy.teragrid.org
+myproxy.username=ogce
+myproxy.password=
+myproxy.life=3600
+# XSEDE Trusted certificates can be downloaded from https://software.xsede.org/security/xsede-certs.tar.gz
+trusted.cert.location=/Users/lahirugunathilake/Downloads/certificates
+gfac.passive=true
+# SSH PKI key pair or ssh password can be used SSH based authentication is used.
+# if user specify both password authentication gets the higher preference
+
+################# ---------- For ssh key pair authentication ------------------- ################
+#public.ssh.key=/path to public key for ssh
+#private.ssh.key=/path to private key file for ssh
+#ssh.keypass=passphrase for the private key
+#ssh.username=username for ssh connection
+### Incase of password authentication.
+#ssh.password=Password for ssh connection
+
+################ ---------- BES Properties ------------------- ###############
+#bes.ca.cert.path=<location>/certificates/cacert.pem
+#bes.ca.key.path=<location>/certificates/cakey.pem
+#bes.ca.key.pass=passphrase
+
+
+###########################################################################
+# Airavata Workflow Interpreter Configurations
+###########################################################################
+
+#runInThread=true
+#provenance=true
+#provenanceWriterThreadPoolSize=20
+#gfac.embedded=true
+#workflowserver=org.apache.airavata.api.server.WorkflowServer
+enactment.thread.pool.size=10
+
+#to define custom workflow parser user following property
+#workflow.parser=org.apache.airavata.workflow.core.parser.AiravataWorkflowParser
+
+
+###########################################################################
+# API Server module Configuration
+###########################################################################
+apiserver=org.apache.airavata.api.server.AiravataAPIServer
+
+###########################################################################
+# Workflow Server module Configuration
+###########################################################################
+
+workflowserver=org.apache.airavata.api.server.WorkflowServer
+
+###########################################################################
+# Advance configuration to change service implementations
+###########################################################################
+# If false, disables two phase commit when submitting jobs
+TwoPhase=true
+#
+# Class which implemented HostScheduler interface. It will determine the which host to submit the request
+#
+host.scheduler=org.apache.airavata.gfac.core.scheduler.impl.SimpleHostScheduler
+
+###########################################################################
+# Monitoring module Configuration
+###########################################################################
+
+#This will be the primary monitoring tool which runs in airavata, in future there will be multiple monitoring
+#mechanisms and one would be able to start a monitor
+monitors=org.apache.airavata.gfac.monitor.impl.pull.qstat.QstatMonitor,org.apache.airavata.gfac.monitor.impl.LocalJobMonitor
+
+#These properties will used to enable email base monitoring
+email.based.monitor.host=imap.gmail.com
+email.based.monitor.address=test@scigap.com
+email.based.monitor.password=changeme
+email.based.monitor.folder.name=INBOX
+# either imaps or pop3
+email.based.monitor.store.protocol=imaps
+#These property will be used to query the email server periodically. value in milliseconds(ms).
+email.based.monitoring.period=10000
+###########################################################################
+# AMQP Notification Configuration
+###########################################################################
+
+
+amqp.notification.enable=1
+
+amqp.broker.host=localhost
+amqp.broker.port=5672
+amqp.broker.username=guest
+amqp.broker.password=guest
+
+amqp.sender=org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPSenderImpl
+amqp.topic.sender=org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPTopicSenderImpl
+amqp.broadcast.sender=org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPBroadcastSenderImpl
+
+#,org.apache.airavata.gfac.monitor.impl.push.amqp.AMQPMonitor
+#This is the amqp related configuration and this lists down the Rabbitmq host, this is an xsede specific configuration
+amqp.hosts=info1.dyn.teragrid.org,info2.dyn.teragrid.org
+proxy.file.path=/Users/lahirugunathilake/Downloads/x509up_u503876
+connection.name=xsede
+#publisher
+#for simple scenarios we can use the guest user
+rabbitmq.broker.url=amqp://localhost:5672
+#for production scenarios, give url as amqp://userName:password@hostName:portNumber/virtualHost, create user, virtualhost
+# 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
+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
+rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
+durable.queue=false
+launch.queue.name=launch.queue
+cancel.queue.name=cancel.queue
+activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQPublisher
+rabbitmq.exchange.name=airavata_rabbitmq_exchange
+
+###########################################################################
+# Orchestrator module Configuration
+###########################################################################
+
+#job.submitter=org.apache.airavata.orchestrator.core.impl.GFACEmbeddedJobSubmitter
+#job.submitter=org.apache.airavata.orchestrator.core.impl.GFACPassiveJobSubmitter
+#job.submitter=org.apache.airavata.orchestrator.core.impl.GFACRPCJobSubmitter
+job.validators=org.apache.airavata.orchestrator.core.validator.impl.BatchQueueValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
+submitter.interval=10000
+threadpool.size=10
+start.submitter=true
+embedded.mode=true
+enable.validation=true
+orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
+
+###########################################################################
+# Zookeeper Server Configuration
+###########################################################################
+
+embedded.zk=true
+zookeeper.server.host=localhost
+zookeeper.server.port=2181
+airavata-server=/api-server
+zookeeper.timeout=30000
+orchestrator-server=/orchestrator-server
+gfac-server=/gfac-server
+gfac-experiments=/gfac-experiments
+gfac-server-name=gfac-node0
+orchestrator-server-name=orch-node0
+airavata-server-name=api-node0

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/resources/registry-derby.sql b/modules/registry/airavata-mongo-registry/src/main/resources/registry-derby.sql
new file mode 100644
index 0000000..7ab3755
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/resources/registry-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/e13d90da/modules/registry/airavata-mongo-registry/src/main/resources/registry-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/resources/registry-mysql.sql b/modules/registry/airavata-mongo-registry/src/main/resources/registry-mysql.sql
new file mode 100644
index 0000000..14d7fc8
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/resources/registry-mysql.sql
@@ -0,0 +1,392 @@
+/*
+ *
+ * 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),
+         PROJECT_NAME VARCHAR(255) NOT NULL,
+         PROJECT_ID VARCHAR(255),
+         DESCRIPTION VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT NOW(),
+         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 NOW(),
+        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),
+        APP_ARGUMENT VARCHAR(255),
+        STANDARD_INPUT SMALLINT,
+        USER_FRIENDLY_DESC VARCHAR(255),
+        METADATA VARCHAR(255),
+        VALUE LONGTEXT,
+        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 LONGTEXT,
+        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 NOW(),
+        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 NOW(),
+        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 AUTO_INCREMENT,
+  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 APPLICATION_INPUT
+(
+        TASK_ID VARCHAR(255),
+        INPUT_KEY VARCHAR(255) NOT NULL,
+        DATA_TYPE VARCHAR(255),
+        APP_ARGUMENT VARCHAR(255),
+        STANDARD_INPUT SMALLINT,
+        USER_FRIENDLY_DESC VARCHAR(255),
+        METADATA VARCHAR(255),
+        VALUE LONGTEXT,
+        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 LONGTEXT,
+        DATA_MOVEMENT SMALLINT,
+        IS_REQUIRED SMALLINT,
+        REQUIRED_TO_COMMANDLINE 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),
+       APP_ARGUMENT VARCHAR(255),
+       STANDARD_INPUT SMALLINT,
+       USER_FRIENDLY_DESC VARCHAR(255),
+       METADATA 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 LONGTEXT NOT NULL,
+        CREATION_TIME TIMESTAMP DEFAULT NOW(),
+        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 NOW(),
+        TRANSFER_DESC VARCHAR(255) NOT NULL,
+        PRIMARY KEY(TRANSFER_ID),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE ERROR_DETAIL
+(
+         ERROR_ID INTEGER NOT NULL AUTO_INCREMENT,
+         EXPERIMENT_ID VARCHAR(255),
+         TASK_ID VARCHAR(255),
+         NODE_INSTANCE_ID VARCHAR(255),
+         JOB_ID VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT NOW(),
+         ACTUAL_ERROR_MESSAGE LONGTEXT,
+         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 STATUS
+(
+        STATUS_ID INTEGER NOT NULL AUTO_INCREMENT,
+        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' ON UPDATE now(),
+        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),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+
+);
+
+CREATE TABLE COMPUTATIONAL_RESOURCE_SCHEDULING
+(
+        RESOURCE_SCHEDULING_ID INTEGER NOT NULL AUTO_INCREMENT,
+        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 AUTO_INCREMENT,
+       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 AUTO_INCREMENT,
+       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 AUTO_INCREMENT,
+        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 NOW() ON UPDATE NOW(),
+        PRIMARY KEY (GATEWAY_ID, TOKEN_ID)
+);
+
+


[25/44] airavata git commit: fixing merge failures

Posted by sc...@apache.org.
fixing merge failures


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

Branch: refs/heads/mongo-registry
Commit: 7e97f09a9ccd92ad1648bde1047f3f0952f472a2
Parents: 945161e 94a20ab
Author: Supun Nakandala <sc...@apache.org>
Authored: Wed May 27 23:20:38 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Wed May 27 23:20:38 2015 +0530

----------------------------------------------------------------------
 .../client/samples/CreateLaunchExperiment.java  | 46 ++++++--------------
 .../tools/RegisterSampleApplications.java       |  2 +-
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  |  1 -
 3 files changed, 14 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/7e97f09a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/7e97f09a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --cc modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
index 3aa2c8d,2cd9ecb..f62a9e0
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
@@@ -570,14 -568,15 +570,13 @@@ public class BetterGfacImpl implements 
                      jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
                      throw new GFacException(e.getMessage(), e);
                  }
 +            }else if (gfacExpState == GfacExperimentState.INHANDLERSINVOKING || gfacExpState == GfacExperimentState.INHANDLERSINVOKED || gfacExpState == GfacExperimentState.OUTHANDLERSINVOKING){
 +                log.info("Experiment should be immedietly cancelled");
 +                GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentId(), ExperimentState.CANCELED);
- 
              }
 -//            else if (gfacExpState == GfacExperimentState.INHANDLERSINVOKING || gfacExpState == GfacExperimentState.INHANDLERSINVOKED || gfacExpState == GfacExperimentState.OUTHANDLERSINVOKING){
 -//                log.info("Experiment should be immedietly cancelled");
 -//                GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentID(), ExperimentState.CANCELED);
 -//
 -//            }
              return true;
              }catch(Exception e){
 -                log.error("Error occured while cancelling job for experiment : " + jobExecutionContext.getExperimentID(), e);
 +                log.error("Error occured while cancelling job for experiment : " + jobExecutionContext.getExperimentId(), e);
                  throw new GFacException(e.getMessage(), e);
              }finally{
                  closeZK(jobExecutionContext);


[18/44] airavata git commit: Adding mongo-registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input_PK.java
new file mode 100644
index 0000000..73a83a7
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input_PK.java
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import java.io.Serializable;
+
+public class Experiment_Input_PK implements Serializable {
+    private String experiment_id;
+    private String ex_key;
+
+    public Experiment_Input_PK(String experiment_id, String ex_key) {
+        this.experiment_id = experiment_id;
+        this.ex_key = ex_key;
+    }
+
+    public Experiment_Input_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getExperiment_id() {
+        return experiment_id;
+    }
+
+    public void setExperiment_id(String experiment_id) {
+        this.experiment_id = experiment_id;
+    }
+
+    public String getEx_key() {
+        return ex_key;
+    }
+
+    public void setEx_key(String ex_key) {
+        this.ex_key = ex_key;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java
new file mode 100644
index 0000000..ece544e
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java
@@ -0,0 +1,151 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name ="EXPERIMENT_OUTPUT")
+@IdClass(Experiment_Output_PK.class)
+public class Experiment_Output  implements Serializable {
+    @Id
+    @Column(name = "EXPERIMENT_ID")
+    private String experiment_id;
+
+    @Id
+    @Column(name = "OUTPUT_KEY")
+    private String ex_key;
+    @Lob
+    @Column(name = "VALUE")
+    private char[] value;
+    @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
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    public String getExperiment_id() {
+        return experiment_id;
+    }
+
+    public void setExperiment_id(String experiment_id) {
+        this.experiment_id = experiment_id;
+    }
+
+    public String getEx_key() {
+        return ex_key;
+    }
+
+    public void setEx_key(String ex_key) {
+        this.ex_key = ex_key;
+    }
+
+    public char[] getValue() {
+        return value;
+    }
+
+    public void setValue(char[] value) {
+        this.value = value;
+    }
+
+    public String getDataType() {
+        return dataType;
+    }
+
+    public void setDataType(String dataType) {
+        this.dataType = dataType;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    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/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output_PK.java
new file mode 100644
index 0000000..c41d8d9
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output_PK.java
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import java.io.Serializable;
+
+public class Experiment_Output_PK implements Serializable {
+    private String experiment_id;
+    private String ex_key;
+
+    public Experiment_Output_PK(String experiment_id, String ex_key) {
+        this.experiment_id = experiment_id;
+        this.ex_key = ex_key;
+    }
+
+    public Experiment_Output_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getExperiment_id() {
+        return experiment_id;
+    }
+
+    public void setExperiment_id(String experiment_id) {
+        this.experiment_id = experiment_id;
+    }
+
+    public String getEx_key() {
+        return ex_key;
+    }
+
+    public void setEx_key(String ex_key) {
+        this.ex_key = ex_key;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway.java
new file mode 100644
index 0000000..7619f17
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway.java
@@ -0,0 +1,76 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name ="GATEWAY")
+public class Gateway implements Serializable {
+    @Id
+    @Column(name = "GATEWAY_ID")
+    private String gateway_id;
+    @Column(name = "GATEWAY_NAME")
+    private String gateway_name;
+    @Column(name = "DOMAIN")
+    private String domain;
+    @Column(name = "EMAIL_ADDRESS")
+    private String emailAddress;
+
+    public String getGateway_name() {
+        return gateway_name;
+    }
+
+    public void setGateway_name(String gateway_name) {
+        this.gateway_name = gateway_name;
+    }
+
+    public String getDomain() {
+        return domain;
+    }
+
+    public void setDomain(String domain) {
+        this.domain = domain;
+    }
+
+    public String getGateway_id() {
+        return gateway_id;
+    }
+
+    public void setGateway_id(String gateway_id) {
+        this.gateway_id = gateway_id;
+    }
+
+    public String getEmailAddress() {
+        return emailAddress;
+    }
+
+    public void setEmailAddress(String emailAddress) {
+        this.emailAddress = emailAddress;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker.java
new file mode 100644
index 0000000..12f3202
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker.java
@@ -0,0 +1,82 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name ="GATEWAY_WORKER")
+@IdClass(Gateway_Worker_PK.class)
+public class Gateway_Worker implements Serializable {
+    @Id
+    @Column(name = "GATEWAY_ID")
+    private String gateway_id;
+
+    @Id
+    @Column(name = "USER_NAME")
+    private String user_name;
+
+    @ManyToOne(cascade=CascadeType.MERGE)
+    @JoinColumn(name = "GATEWAY_ID")
+    private Gateway gateway;
+
+
+    @ManyToOne(cascade=CascadeType.MERGE)
+    @JoinColumn(name = "USER_NAME")
+    private Users user;
+
+    public String getUser_name() {
+        return user_name;
+    }
+
+    public void setUser_name(String user_name) {
+        this.user_name = user_name;
+    }
+
+    public void setGateway(Gateway gateway) {
+        this.gateway = gateway;
+    }
+
+    public Gateway getGateway() {
+        return gateway;
+    }
+
+    public Users getUser() {
+        return user;
+    }
+
+    public void setUser(Users user) {
+        this.user = user;
+    }
+
+    public String getGateway_id() {
+        return gateway_id;
+    }
+
+    public void setGateway_id(String gateway_id) {
+        this.gateway_id = gateway_id;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker_PK.java
new file mode 100644
index 0000000..b2a93a6
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker_PK.java
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import java.io.Serializable;
+
+public class Gateway_Worker_PK implements Serializable {
+    private String gateway_id;
+    private String user_name;
+
+    public Gateway_Worker_PK(String gateway_id, String user_name) {
+        this.gateway_id = gateway_id;
+        this.user_name = user_name;
+    }
+
+    public Gateway_Worker_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getUser_name() {
+        return user_name;
+    }
+
+    public void setUser_name(String user_name) {
+        this.user_name = user_name;
+    }
+
+    public String getGateway_id() {
+        return gateway_id;
+    }
+
+    public void setGateway_id(String gateway_id) {
+        this.gateway_id = gateway_id;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java
new file mode 100644
index 0000000..36f12f8
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java
@@ -0,0 +1,120 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@DataCache
+@Entity
+@Table(name = "JOB_DETAIL")
+@IdClass(JobDetails_PK.class)
+public class JobDetail implements Serializable {
+    @Id
+    @Column(name = "JOB_ID")
+    private String jobId;
+    @Id
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Column(name = "JOB_DESCRIPTION")
+    @Lob
+    private char[] jobDescription;
+    @Column(name = "CREATION_TIME")
+    private Timestamp creationTime;
+    @Column(name = "COMPUTE_RESOURCE_CONSUMED")
+    private String computeResourceConsumed;
+    @Column(name = "JOBNAME")
+    private String jobName;
+    @Column(name = "WORKING_DIR")
+    private String workingDir;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail task;
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public char[] getJobDescription() {
+        return jobDescription;
+    }
+
+    public void setJobDescription(char[] jobDescription) {
+        this.jobDescription = jobDescription;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+
+    public String getComputeResourceConsumed() {
+        return computeResourceConsumed;
+    }
+
+    public void setComputeResourceConsumed(String computeResourceConsumed) {
+        this.computeResourceConsumed = computeResourceConsumed;
+    }
+
+    public String getJobName() {
+        return jobName;
+    }
+
+    public void setJobName(String jobName) {
+        this.jobName = jobName;
+    }
+
+    public String getWorkingDir() {
+        return workingDir;
+    }
+
+    public void setWorkingDir(String workingDir) {
+        this.workingDir = workingDir;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetails_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetails_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetails_PK.java
new file mode 100644
index 0000000..1247fb6
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetails_PK.java
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import java.io.Serializable;
+
+public class JobDetails_PK implements Serializable {
+    private String jobId;
+    private String taskId;
+
+    public JobDetails_PK(String jobId, String taskId) {
+        this.jobId = jobId;
+        this.taskId = taskId;
+    }
+
+    public JobDetails_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput.java
new file mode 100644
index 0000000..7e48cbf
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput.java
@@ -0,0 +1,171 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name = "NODE_INPUT")
+@IdClass(NodeInput_PK.class)
+public class NodeInput implements Serializable {
+    @Id
+    @Column(name = "NODE_INSTANCE_ID")
+    private String nodeId;
+    @Id
+    @Column(name = "INPUT_KEY")
+    private String inputKey;
+    @Column(name = "DATA_TYPE")
+    private String dataType;
+    @Column(name = "METADATA")
+    private String metadata;
+    @Column(name = "VALUE")
+    private String value;
+    @Column(name = "APP_ARGUMENT")
+    private String appArgument;
+    @Column(name = "INPUT_ORDER")
+    private int inputOrder;
+
+    @Column(name = "STANDARD_INPUT")
+    private boolean standardInput;
+
+    @Column(name = "USER_FRIENDLY_DESC")
+    private String userFriendlyDesc;
+
+    @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 = "NODE_INSTANCE_ID")
+    private WorkflowNodeDetail nodeDetails;
+
+    public String getInputKey() {
+        return inputKey;
+    }
+
+    public void setInputKey(String inputKey) {
+        this.inputKey = inputKey;
+    }
+
+    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 getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public String getNodeId() {
+        return nodeId;
+    }
+
+    public void setNodeId(String nodeId) {
+        this.nodeId = nodeId;
+    }
+
+    public WorkflowNodeDetail getNodeDetails() {
+        return nodeDetails;
+    }
+
+    public void setNodeDetails(WorkflowNodeDetail nodeDetails) {
+        this.nodeDetails = nodeDetails;
+    }
+
+    public String getAppArgument() {
+        return appArgument;
+    }
+
+    public void setAppArgument(String appArgument) {
+        this.appArgument = appArgument;
+    }
+
+    public boolean isStandardInput() {
+        return standardInput;
+    }
+
+    public void setStandardInput(boolean standardInput) {
+        this.standardInput = standardInput;
+    }
+
+    public String getUserFriendlyDesc() {
+        return userFriendlyDesc;
+    }
+
+    public void setUserFriendlyDesc(String userFriendlyDesc) {
+        this.userFriendlyDesc = userFriendlyDesc;
+    }
+
+    public int getInputOrder() {
+        return inputOrder;
+    }
+
+    public void setInputOrder(int inputOrder) {
+        this.inputOrder = inputOrder;
+    }
+
+    public boolean getIsRequired() {
+        return isRequired;
+    }
+
+    public void setIsRequired(boolean isRequired) {
+        this.isRequired = isRequired;
+    }
+
+    public boolean getRequiredToCMD() {
+        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/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput_PK.java
new file mode 100644
index 0000000..9db1cbe
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput_PK.java
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import java.io.Serializable;
+
+public class NodeInput_PK implements Serializable {
+    private String nodeId;
+    private String inputKey;
+
+    public NodeInput_PK(String nodeId, String inputKey) {
+        this.nodeId = nodeId;
+        this.inputKey = inputKey;
+    }
+
+    public NodeInput_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getNodeId() {
+        return nodeId;
+    }
+
+    public void setNodeId(String nodeId) {
+        this.nodeId = nodeId;
+    }
+
+    public String getInputKey() {
+        return inputKey;
+    }
+
+    public void setInputKey(String inputKey) {
+        this.inputKey = inputKey;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java
new file mode 100644
index 0000000..9281ee8
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java
@@ -0,0 +1,148 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name = "NODE_OUTPUT")
+@IdClass(NodeOutput_PK.class)
+public class NodeOutput implements Serializable {
+    @Id
+    @Column(name = "NODE_INSTANCE_ID")
+    private String nodeId;
+    @Id
+    @Column(name = "OUTPUT_KEY")
+    private String outputKey;
+    @Column(name = "DATA_TYPE")
+    private String dataType;
+    @Column(name = "VALUE")
+    private String value;
+    @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 = "NODE_INSTANCE_ID")
+    private WorkflowNodeDetail node;
+
+    public String getNodeId() {
+        return nodeId;
+    }
+
+    public void setNodeId(String nodeId) {
+        this.nodeId = nodeId;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public WorkflowNodeDetail getNode() {
+        return node;
+    }
+
+    public void setNode(WorkflowNodeDetail node) {
+        this.node = node;
+    }
+
+    public String getOutputKey() {
+        return outputKey;
+    }
+
+    public void setOutputKey(String outputKey) {
+        this.outputKey = outputKey;
+    }
+
+    public String getDataType() {
+        return dataType;
+    }
+
+    public void setDataType(String dataType) {
+        this.dataType = dataType;
+    }
+
+    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/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput_PK.java
new file mode 100644
index 0000000..84fded8
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput_PK.java
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import java.io.Serializable;
+
+public class NodeOutput_PK implements Serializable {
+    private String nodeId;
+    private String outputKey;
+
+    public NodeOutput_PK(String nodeId, String outputKey) {
+        this.nodeId = nodeId;
+        this.outputKey = outputKey;
+    }
+
+    public NodeOutput_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getNodeId() {
+        return nodeId;
+    }
+
+    public void setNodeId(String nodeId) {
+        this.nodeId = nodeId;
+    }
+
+    public String getOutputKey() {
+        return outputKey;
+    }
+
+    public void setOutputKey(String outputKey) {
+        this.outputKey = outputKey;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Notification_Email.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Notification_Email.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Notification_Email.java
new file mode 100644
index 0000000..524994e
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Notification_Email.java
@@ -0,0 +1,97 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name ="NOTIFICATION_EMAIL")
+public class Notification_Email implements Serializable {
+    @Id
+    @GeneratedValue
+    private int emailId;
+    @Column(name = "EXPERIMENT_ID")
+    private String experiment_id;
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Column(name = "EMAIL_ADDRESS")
+    private String emailAddress;
+
+    @ManyToOne
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+    @ManyToOne
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail taskDetail;
+
+    public String getExperiment_id() {
+        return experiment_id;
+    }
+
+    public void setExperiment_id(String experiment_id) {
+        this.experiment_id = experiment_id;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    public String getEmailAddress() {
+        return emailAddress;
+    }
+
+    public void setEmailAddress(String emailAddress) {
+        this.emailAddress = emailAddress;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public TaskDetail getTaskDetail() {
+        return taskDetail;
+    }
+
+    public void setTaskDetail(TaskDetail taskDetail) {
+        this.taskDetail = taskDetail;
+    }
+
+    public int getEmailId() {
+        return emailId;
+    }
+
+    public void setEmailId(int emailId) {
+        this.emailId = emailId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Project.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Project.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Project.java
new file mode 100644
index 0000000..054411d
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Project.java
@@ -0,0 +1,125 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@DataCache
+@Entity
+@Table(name ="PROJECT")
+public class Project implements Serializable {
+    @Id
+    @Column(name = "PROJECT_ID")
+    private String project_id;
+
+    @Column(name = "GATEWAY_ID")
+    private String gateway_id;
+
+    @Column(name = "PROJECT_NAME")
+    private String project_name;
+
+    @Column(name = "DESCRIPTION")
+    private String description;
+
+    @Column(name = "USER_NAME")
+    private String user_name;
+
+    @Column(name = "CREATION_TIME")
+    private Timestamp creationTime;
+
+    @ManyToOne(cascade=CascadeType.MERGE)
+    @JoinColumn(name = "GATEWAY_ID")
+    private Gateway gateway;
+
+    @ManyToOne(cascade=CascadeType.MERGE)
+    @JoinColumn(name = "USER_NAME")
+    private Users users;
+
+
+    public String getProject_name() {
+        return project_name;
+    }
+
+    public Gateway getGateway() {
+        return gateway;
+    }
+
+    public void setProject_name(String project_name) {
+        this.project_name = project_name;
+    }
+
+    public void setGateway(Gateway gateway) {
+        this.gateway = gateway;
+    }
+
+    public Users getUsers() {
+        return users;
+    }
+
+    public void setUsers(Users users) {
+        this.users = users;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public void setProject_id(String project_id) {
+        this.project_id = project_id;
+    }
+
+    public String getProject_id() {
+        return project_id;
+    }
+
+    public String getUser_name() {
+        return user_name;
+    }
+
+    public void setUser_name(String user_name) {
+        this.user_name = user_name;
+    }
+
+    public String getGateway_id() {
+        return gateway_id;
+    }
+
+    public void setGateway_id(String gateway_id) {
+        this.gateway_id = gateway_id;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java
new file mode 100644
index 0000000..5b930d1
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java
@@ -0,0 +1,81 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@IdClass(ProjectUser_PK.class)
+@Table(name = "PROJECT_USER")
+public class ProjectUser implements Serializable {
+    @Id
+    @Column(name = "PROJECT_ID")
+    private String projectID;
+    @Id
+    @Column(name = "USER_NAME")
+    private String userName;
+
+    @ManyToOne(cascade=CascadeType.MERGE)
+    @JoinColumn(name = "PROJECT_ID")
+    private Project project;
+
+    @ManyToOne(cascade=CascadeType.MERGE)
+    @JoinColumn(name = "USER_NAME")
+    private Users user;
+
+    public String getProjectId() {
+        return projectID;
+    }
+
+    public void setProjectId(String projectID) {
+        this.projectID = projectID;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public Project getProject() {
+        return project;
+    }
+
+    public void setProject(Project project) {
+        this.project = project;
+    }
+
+    public Users getUser() {
+        return user;
+    }
+
+    public void setUser(Users user) {
+        this.user = user;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java
new file mode 100644
index 0000000..e3eff9c
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import java.io.Serializable;
+
+public class ProjectUser_PK implements Serializable {
+    private String projectID;
+    private String userName;
+
+    public ProjectUser_PK(String projectID, String userName) {
+        this.projectID = projectID;
+        this.userName = userName;
+    }
+
+    public ProjectUser_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getProjectId() {
+        return projectID;
+    }
+
+    public void setProjectId(String projectID) {
+        this.projectID = projectID;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/QosParam.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/QosParam.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/QosParam.java
new file mode 100644
index 0000000..a0dbfa0
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/QosParam.java
@@ -0,0 +1,119 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name = "QOS_PARAMS")
+public class QosParam implements Serializable {
+    @Id
+    @GeneratedValue
+    @Column(name = "QOS_ID")
+    private int qosId;
+    @Column(name = "EXPERIMENT_ID")
+    private String expId;
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Column(name = "START_EXECUTION_AT")
+    private String startExecutionAt;
+    @Column(name = "EXECUTE_BEFORE")
+    private String executeBefore;
+    @Column(name = "NO_OF_RETRIES")
+    private int noOfRetries;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail task;
+
+    public int getQosId() {
+        return qosId;
+    }
+
+    public void setQosId(int qosId) {
+        this.qosId = qosId;
+    }
+
+    public String getExpId() {
+        return expId;
+    }
+
+    public void setExpId(String expId) {
+        this.expId = expId;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getStartExecutionAt() {
+        return startExecutionAt;
+    }
+
+    public void setStartExecutionAt(String startExecutionAt) {
+        this.startExecutionAt = startExecutionAt;
+    }
+
+    public String getExecuteBefore() {
+        return executeBefore;
+    }
+
+    public void setExecuteBefore(String executeBefore) {
+        this.executeBefore = executeBefore;
+    }
+
+    public int getNoOfRetries() {
+        return noOfRetries;
+    }
+
+    public void setNoOfRetries(int noOfRetries) {
+        this.noOfRetries = noOfRetries;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Status.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Status.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Status.java
new file mode 100644
index 0000000..4783af5
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Status.java
@@ -0,0 +1,174 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@DataCache
+@Entity
+@Table(name = "STATUS")
+public class Status implements Serializable {
+    @Id
+    @GeneratedValue
+    @Column(name = "STATUS_ID")
+    private int statusId;
+    @Column(name = "EXPERIMENT_ID")
+    private String expId;
+    @Column(name = "NODE_INSTANCE_ID")
+    private String nodeId;
+    @Column(name = "TRANSFER_ID")
+    private String transferId;
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Column(name = "JOB_ID")
+    private String jobId;
+    @Column(name = "STATE")
+    private String state;
+    @Column(name = "STATUS_UPDATE_TIME")
+    private Timestamp statusUpdateTime;
+    @Column(name = "STATUS_TYPE")
+    private String statusType;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail task;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "NODE_INSTANCE_ID")
+    private WorkflowNodeDetail node;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TRANSFER_ID")
+    private DataTransferDetail transferDetail;
+
+    public int getStatusId() {
+        return statusId;
+    }
+
+    public void setStatusId(int statusId) {
+        this.statusId = statusId;
+    }
+
+    public String getExpId() {
+        return expId;
+    }
+
+    public void setExpId(String expId) {
+        this.expId = expId;
+    }
+
+    public String getNodeId() {
+        return nodeId;
+    }
+
+    public void setNodeId(String nodeId) {
+        this.nodeId = nodeId;
+    }
+
+    public String getTransferId() {
+        return transferId;
+    }
+
+    public void setTransferId(String transferId) {
+        this.transferId = transferId;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public Timestamp getStatusUpdateTime() {
+        return statusUpdateTime;
+    }
+
+    public void setStatusUpdateTime(Timestamp statusUpdateTime) {
+        this.statusUpdateTime = statusUpdateTime;
+    }
+
+    public String getStatusType() {
+        return statusType;
+    }
+
+    public void setStatusType(String statusType) {
+        this.statusType = statusType;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+
+    public WorkflowNodeDetail getNode() {
+        return node;
+    }
+
+    public void setNode(WorkflowNodeDetail node) {
+        this.node = node;
+    }
+
+    public DataTransferDetail getTransferDetail() {
+        return transferDetail;
+    }
+
+    public void setTransferDetail(DataTransferDetail transferDetail) {
+        this.transferDetail = transferDetail;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java
new file mode 100644
index 0000000..ebd7758
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java
@@ -0,0 +1,119 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@DataCache
+@Entity
+@Table(name = "TASK_DETAIL")
+public class TaskDetail implements Serializable {
+    @Id
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Column(name = "NODE_INSTANCE_ID")
+    private String nodeId;
+    @Column(name = "CREATION_TIME")
+    private Timestamp creationTime;
+    @Column(name = "APPLICATION_ID")
+    private String appId;
+    @Column(name = "APPLICATION_VERSION")
+    private String appVersion;
+    @Column(name = "ALLOW_NOTIFICATION")
+    private boolean allowNotification;
+
+    @Column(name = "APPLICATION_DEPLOYMENT_ID")
+    private String applicationDeploymentId;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "NODE_INSTANCE_ID")
+    private WorkflowNodeDetail nodeDetail;
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getNodeId() {
+        return nodeId;
+    }
+
+    public void setNodeId(String nodeId) {
+        this.nodeId = nodeId;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+
+    public void setAppId(String appId) {
+        this.appId = appId;
+    }
+
+    public String getAppVersion() {
+        return appVersion;
+    }
+
+    public void setAppVersion(String appVersion) {
+        this.appVersion = appVersion;
+    }
+
+    public WorkflowNodeDetail getNodeDetail() {
+        return nodeDetail;
+    }
+
+    public void setNodeDetail(WorkflowNodeDetail nodeDetail) {
+        this.nodeDetail = nodeDetail;
+    }
+
+	public String getApplicationDeploymentId() {
+		return applicationDeploymentId;
+	}
+
+	public void setApplicationDeploymentId(String applicationDeploymentId) {
+		this.applicationDeploymentId = applicationDeploymentId;
+	}
+
+    public boolean isAllowNotification() {
+        return allowNotification;
+    }
+
+    public void setAllowNotification(boolean allowNotification) {
+        this.allowNotification = allowNotification;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Users.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Users.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Users.java
new file mode 100644
index 0000000..9005985
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Users.java
@@ -0,0 +1,55 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name ="USERS")
+public class Users implements Serializable {
+
+    @Id
+    @Column(name = "USER_NAME")
+    private String user_name;
+    @Column(name = "PASSWORD")
+    private String password;
+
+
+    public String getUser_name() {
+        return user_name;
+    }
+
+    public void setUser_name(String user_name) {
+        this.user_name = user_name;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/WorkflowNodeDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/WorkflowNodeDetail.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/WorkflowNodeDetail.java
new file mode 100644
index 0000000..b4ae29e
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/WorkflowNodeDetail.java
@@ -0,0 +1,107 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@DataCache
+@Entity
+@Table(name = "WORKFLOW_NODE_DETAIL")
+public class WorkflowNodeDetail implements Serializable {
+    @Column(name = "EXPERIMENT_ID")
+    private String expId;
+    @Id
+    @Column(name = "NODE_INSTANCE_ID")
+    private String nodeId;
+    @Column(name = "EXECUTION_UNIT")
+    private String executionUnit;
+    @Column(name = "EXECUTION_UNIT_DATA")
+    private String executionUnitData;
+    @Column(name = "CREATION_TIME")
+    private Timestamp creationTime;
+    @Column(name = "NODE_NAME")
+    private String nodeName;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    public String getExpId() {
+        return expId;
+    }
+
+    public void setExpId(String expId) {
+        this.expId = expId;
+    }
+
+    public String getNodeId() {
+        return nodeId;
+    }
+
+    public void setNodeId(String nodeId) {
+        this.nodeId = nodeId;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public String getNodeName() {
+        return nodeName;
+    }
+
+    public void setNodeName(String nodeName) {
+        this.nodeName = nodeName;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+	public String getExecutionUnitData() {
+		return executionUnitData;
+	}
+
+	public void setExecutionUnitData(String executionUnitData) {
+		this.executionUnitData = executionUnitData;
+	}
+
+	public String getExecutionUnit() {
+		return executionUnit;
+	}
+
+	public void setExecutionUnit(String executionUnit) {
+		this.executionUnit = executionUnit;
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/ExperimentRegistry.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/ExperimentRegistry.java
new file mode 100644
index 0000000..515218d
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/ExperimentRegistry.java
@@ -0,0 +1,28 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ExperimentRegistry {
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentRegistry.class);
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/Test.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/Test.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/Test.java
new file mode 100644
index 0000000..4f0dcca
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/Test.java
@@ -0,0 +1,81 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo;
+
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
+import org.apache.airavata.persistance.registry.jpa.mongo.dao.ExperimentDao;
+import org.apache.airavata.persistance.registry.jpa.mongo.utils.MongoUtil;
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.RegistryModelType;
+import org.junit.Assert;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+
+public class Test {
+    private final static Logger logger = LoggerFactory.getLogger(Test.class);
+
+    public static void main(String[] args) throws RegistryException, IOException {
+        AiravataUtils.setExecutionAsServer();
+        Registry registry = RegistryFactory.getDefaultRegistry();
+//        String experiemtnId = "SLM-Espresso-Stampede_45667ea8-aae3-4a8e-807d-a16312035c35";
+//        long time1 = System.currentTimeMillis();
+//        Experiment experiement = (Experiment) registry.getExperiment(RegistryModelType.EXPERIMENT, experiemtnId);
+//        long time2 = System.currentTimeMillis();
+//        System.out.println(time2-time1);
+//
+//        ExperimentDao experimentDao = new ExperimentDao();
+//        experimentDao.createExperiment(experiement);
+//        time1 = System.currentTimeMillis();
+//        Experiment persistedExperiment = experimentDao.getExperiment(experiement.getExperimentId());
+//        time2 = System.currentTimeMillis();
+//        System.out.println(time2-time1);
+//
+//        Assert.assertEquals(experiement, persistedExperiment);
+
+        MongoUtil.dropAiravataRegistry();
+
+        ExperimentDao experimentDao = new ExperimentDao();
+        BufferedReader reader = new BufferedReader(new FileReader("/home/supun/Downloads/EXPERIMENT.csv"));
+        String temp = reader.readLine();
+        int i = 1;
+        while(temp != null && !temp.isEmpty()){
+            try{
+                Experiment experiement = (Experiment) registry.get(RegistryModelType.EXPERIMENT, temp.trim());
+                experimentDao.createExperiment(experiement);
+                Experiment persistedExperiment = experimentDao.getExperiment(experiement.getExperimentId());
+                Assert.assertEquals(experiement, persistedExperiment);
+                System.out.println(i+" :"+experiement.getExperimentId());
+                i++;
+            }catch (Exception e){
+                System.out.println(temp);
+                e.printStackTrace();
+            }
+            temp = reader.readLine();
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftDeserializer.java
new file mode 100644
index 0000000..ba597ee
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftDeserializer.java
@@ -0,0 +1,152 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.*;
+import com.fasterxml.jackson.databind.node.JsonNodeType;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.fasterxml.jackson.databind.type.TypeFactory;
+import com.google.common.base.CaseFormat;
+import org.apache.thrift.TBase;
+import org.apache.thrift.TException;
+import org.apache.thrift.TFieldIdEnum;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.lang.reflect.ParameterizedType;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * This abstract class represents a generic de-serializer for converting JSON to Thrift-based entities.
+ *
+ * @param <E> An implementation of the {@link org.apache.thrift.TFieldIdEnum} interface.
+ * @param <T> An implementation of the {@link org.apache.thrift.TBase} interface.
+ */
+public abstract class AbstractThriftDeserializer<E extends TFieldIdEnum, T extends TBase<T, E>> extends JsonDeserializer<T> {
+
+    private static Logger log = LoggerFactory.getLogger(AbstractThriftDeserializer.class);
+
+    @Override
+    public T deserialize(final JsonParser jp, final DeserializationContext ctxt) throws IOException, JsonProcessingException {
+        final T instance = newInstance();
+        final ObjectMapper mapper = (ObjectMapper)jp.getCodec();
+        final ObjectNode rootNode = (ObjectNode)mapper.readTree(jp);
+        final Iterator<Map.Entry<String, JsonNode>> iterator = rootNode.fields();
+
+        while(iterator.hasNext()) {
+            final Map.Entry<String, JsonNode> currentField = iterator.next();
+            try {
+                /*
+                 * If the current node is not a null value, process it.  Otherwise,
+                 * skip it.  Jackson will treat the null as a 0 for primitive
+                 * number types, which in turn will make Thrift think the field
+                 * has been set. Also we ignore the MongoDB specific _id field
+                 */
+                if(!currentField.getKey().equalsIgnoreCase("_id")
+                        && currentField.getValue().getNodeType() != JsonNodeType.NULL) {
+                    final E field = getField(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_UNDERSCORE, currentField.getKey()));
+                    final JsonParser parser = currentField.getValue().traverse();
+                    parser.setCodec(mapper);
+                    final Object value = mapper.readValue(parser, generateValueType(instance, field));
+                    if(value != null) {
+                        log.debug(String.format("Field %s produced value %s of type %s.",
+                                currentField.getKey(), value, value.getClass().getName()));
+                        instance.setFieldValue(field, value);
+                    } else {
+                        log.debug("Field {} contains a null value.  Skipping...", currentField.getKey());
+                    }
+                } else {
+                    log.debug("Field {} contains a null value.  Skipping...", currentField.getKey());
+                }
+            } catch (final NoSuchFieldException | IllegalArgumentException e) {
+                log.error("Unable to de-serialize field '{}'.", currentField.getKey(), e);
+                ctxt.mappingException(e.getMessage());
+            }
+        }
+
+        try {
+            // Validate that the instance contains all required fields.
+            validate(instance);
+        } catch (final TException e) {
+            log.error(String.format("Unable to deserialize JSON '%s' to type '%s'.",
+                    jp.getValueAsString(), instance.getClass().getName(), e));
+            ctxt.mappingException(e.getMessage());
+        }
+
+        return instance;
+    }
+
+    /**
+     * Returns the {@code <E>} enumerated value that represents the target
+     * field in the Thrift entity referenced in the JSON document.
+     * @param fieldName The name of the Thrift entity target field.
+     * @return The {@code <E>} enumerated value that represents the target
+     *   field in the Thrift entity referenced in the JSON document.
+     */
+    protected abstract E getField(String fieldName);
+
+    /**
+     * Creates a new instance of the Thrift entity class represented by this deserializer.
+     * @return A new instance of the Thrift entity class represented by this deserializer.
+     */
+    protected abstract T newInstance();
+
+    /**
+     * Validates that the Thrift entity instance contains all required fields after deserialization.
+     * @param instance A Thrift entity instance.
+     * @throws org.apache.thrift.TException if unable to validate the instance.
+     */
+    protected abstract void validate(T instance) throws TException;
+
+    /**
+     * Generates a {@link JavaType} that matches the target Thrift field represented by the provided
+     * {@code <E>} enumerated value.  If the field's type includes generics, the generics will
+     * be added to the generated {@link JavaType} to support proper conversion.
+     * @param thriftInstance The Thrift-generated class instance that will be converted to/from JSON.
+     * @param field A {@code <E>} enumerated value that represents a field in a Thrift-based entity.
+     * @return The {@link JavaType} representation of the type associated with the field.
+     * @throws NoSuchFieldException if unable to determine the field's type.
+     * @throws SecurityException if unable to determine the field's type.
+     */
+    protected JavaType generateValueType(final T thriftInstance, final E field) throws NoSuchFieldException, SecurityException {
+        final TypeFactory typeFactory = TypeFactory.defaultInstance();
+
+        final Field declaredField = thriftInstance.getClass().getDeclaredField(field.getFieldName());
+        if(declaredField.getType().equals(declaredField.getGenericType())) {
+            log.debug("Generating JavaType for type '{}'.", declaredField.getType());
+            return typeFactory.constructType(declaredField.getType());
+        } else {
+            final ParameterizedType type = (ParameterizedType)declaredField.getGenericType();
+            final Class<?>[] parameterizedTypes = new Class<?>[type.getActualTypeArguments().length];
+            for(int i=0; i<type.getActualTypeArguments().length; i++) {
+                parameterizedTypes[i] = (Class<?>)type.getActualTypeArguments()[i];
+            }
+            log.debug("Generating JavaType for type '{}' with generics '{}'", declaredField.getType(), parameterizedTypes);
+            return typeFactory.constructParametricType(declaredField.getType(), parameterizedTypes);
+        }
+    }
+
+}
\ No newline at end of file


[20/44] airavata git commit: Adding mongo-registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
new file mode 100644
index 0000000..e7791fa
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
@@ -0,0 +1,1773 @@
+/*
+ *
+ * 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.persistance.registry.jpa.impl;
+
+import org.apache.airavata.common.logger.AiravataLogger;
+import org.apache.airavata.common.logger.AiravataLoggerFactory;
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.mongo.dao.ExperimentDao;
+import org.apache.airavata.persistance.registry.jpa.resources.*;
+import org.apache.airavata.persistance.registry.jpa.utils.ThriftDataModelConversion;
+import org.apache.airavata.registry.cpi.CompositeIdentifier;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.RegistryModelType;
+import org.apache.airavata.registry.cpi.ResultOrderType;
+import org.apache.airavata.registry.cpi.utils.Constants;
+
+import java.sql.Timestamp;
+import java.util.*;
+import java.util.stream.Collectors;
+
+public class ExperimentRegistry {
+    private GatewayResource gatewayResource;
+    private WorkerResource workerResource;
+    private final static AiravataLogger logger = AiravataLoggerFactory.getLogger(ExperimentRegistry.class);
+
+    private ExperimentDao experimentDao;
+
+    public ExperimentRegistry(GatewayResource gateway, UserResource user) throws RegistryException {
+        gatewayResource = gateway;
+        if (!gatewayResource.isExists(ResourceType.GATEWAY_WORKER, user.getUserName())) {
+            workerResource = ResourceUtils.addGatewayWorker(gateway, user);
+        } else {
+            workerResource = (WorkerResource) ResourceUtils.getWorker(gateway.getGatewayId(), user.getUserName());
+        }
+
+        this.experimentDao = new ExperimentDao();
+    }
+
+    public String addExperiment(Experiment experiment, String gatewayId) throws RegistryException {
+        try {
+            if (!ResourceUtils.isUserExist(experiment.getUserName())) {
+                ResourceUtils.addUser(experiment.getUserName(), null);
+            }
+            if (!workerResource.isProjectExists(experiment.getProjectId())) {
+                logger.error("Project does not exist in the system..");
+                throw new Exception("Project does not exist in the system, Please" +
+                        " create the project first...");
+            }
+            //setting up unique ids
+            experiment.setExperimentId(getExperimentId(experiment.getName()));
+            for (WorkflowNodeDetails wfnd : experiment.getWorkflowNodeDetailsList()) {
+                wfnd.setNodeInstanceId(getNodeInstanceID(wfnd.getNodeName()));
+                for (TaskDetails taskDetails : wfnd.getTaskDetailsList()) {
+                    taskDetails.setTaskId(getTaskId(wfnd.getNodeName()));
+                    for (DataTransferDetails dtd : taskDetails.getDataTransferDetailsList()) {
+                        dtd.setTransferId(getDataTransferID(taskDetails.getTaskId()));
+                    }
+                }
+            }
+            experimentDao.createExperiment(experiment);
+        } catch (Exception e) {
+            logger.error("Error while saving experiment to registry", e);
+            throw new RegistryException(e);
+        }
+        return experiment.getExperimentId();
+    }
+
+    public String addUserConfigData(UserConfigurationData configurationData, String expId) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expId);
+            experiment.setUserConfigurationData(configurationData);
+            experimentDao.updateExperiment(experiment);
+            return expId;
+        } catch (Exception e) {
+            logger.error("Unable to save user config data", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addExpOutputs(List<OutputDataObjectType> exOutput, String expId) throws RegistryException {
+        return updateExpOutputs(exOutput, expId);
+    }
+
+    public String updateExpOutputs(List<OutputDataObjectType> exOutput, String expId) throws RegistryException {
+        try {
+            Experiment experiement = experimentDao.getExperiment(expId);
+            experiement.setExperimentOutputs(exOutput);
+            experimentDao.updateExperiment(experiement);
+            return expId;
+        } catch (Exception e) {
+            logger.error("Error while updating experiment outputs", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addNodeOutputs(List<OutputDataObjectType> wfOutputs, CompositeIdentifier ids) throws RegistryException {
+        return updateNodeOutputs(wfOutputs, (String) ids.getSecondLevelIdentifier());
+    }
+
+    public String updateNodeOutputs(List<OutputDataObjectType> wfOutputs, String nodeId) throws RegistryException {
+        try {
+            WorkflowNodeDetails wfnd = experimentDao.getWFNode(nodeId);
+            wfnd.setNodeOutputs(wfOutputs);
+            experimentDao.updateWFNode(wfnd);
+            return nodeId;
+        } catch (Exception e) {
+            logger.error("Error while updating node outputs...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addApplicationOutputs(List<OutputDataObjectType> appOutputs, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getThirdLevelIdentifier());
+            taskDetails.getApplicationOutputs().addAll(appOutputs);
+            experimentDao.updateTaskDetail(taskDetails);
+            return (String) ids.getSecondLevelIdentifier();
+        } catch (Exception e) {
+            logger.error("Error while adding application outputs...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String updateExperimentStatus(ExperimentStatus experimentStatus, String expId)
+            throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expId);
+            String currentState = (experiment.getExperimentStatus() == null)
+                    ? ExperimentState.UNKNOWN.name()
+                    : experiment.getExperimentStatus().getExperimentState().name();
+            if (isValidStatusTransition(ExperimentState.valueOf(currentState),
+                    experimentStatus.getExperimentState())) {
+                experiment.setExperimentStatus(experimentStatus);
+                experimentDao.updateExperiment(experiment);
+                logger.debugId(expId, "Updated experiment {} status to {}.",
+                        expId, experimentStatus.toString());
+                return experiment.getExperimentId();
+            }
+        } catch (Exception e) {
+            logger.errorId(expId, "Error while updating experiment status...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public String addWorkflowNodeStatus(WorkflowNodeStatus status, CompositeIdentifier ids) throws RegistryException {
+        return updateWorkflowNodeStatus(status, (String) ids.getSecondLevelIdentifier());
+    }
+
+    public String updateWorkflowNodeStatus(WorkflowNodeStatus status, String nodeId) throws RegistryException {
+        try {
+            WorkflowNodeDetails wfnd = experimentDao.getWFNode(nodeId);
+            wfnd.setWorkflowNodeStatus(status);
+            experimentDao.updateWFNode(wfnd);
+            return nodeId;
+        } catch (Exception e) {
+            logger.errorId(nodeId, "Error while updating workflow node status to " + status.toString() + "...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addTaskStatus(TaskStatus status, CompositeIdentifier ids) throws RegistryException {
+        return updateTaskStatus(status, (String) ids.getThirdLevelIdentifier());
+    }
+
+    public String updateTaskStatus(TaskStatus status, String taskId) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
+            taskDetails.setTaskStatus(status);
+            experimentDao.updateTaskDetail(taskDetails);
+            return taskId;
+        } catch (Exception e) {
+            logger.errorId(taskId, "Error while updating task status to " + status.toString() + "...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    /**
+     * @param status job status
+     * @param ids    composite id will contain taskid and jobid
+     * @return status id
+     */
+    public String addJobStatus(JobStatus status, CompositeIdentifier ids) throws RegistryException {
+        return updateJobStatus(status, ids);
+    }
+
+    public String updateJobStatus(JobStatus status, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
+                    if (status.getJobState() == null) {
+                        status.setJobState(JobState.UNKNOWN);
+                    }
+                    jobDetails.setJobStatus(status);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    return (String) ids.getSecondLevelIdentifier();
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.errorId(ids.toString(), "Error while updating job status to " + status.toString() + " ...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    /**
+     * @param status application status
+     * @param ids    composite id will contain taskid and jobid
+     * @return status id
+     */
+    public String addApplicationStatus(ApplicationStatus status, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
+                    jobDetails.setApplicationStatus(status);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    return (String) ids.getSecondLevelIdentifier();
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Unable to read airavata-server properties", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateApplicationStatus(ApplicationStatus status, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals((String) ids.getSecondLevelIdentifier())) {
+                    jobDetails.setApplicationStatus(status);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    return;
+                }
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating application status...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    /**
+     * @param status data transfer status
+     * @param ids    contains taskId and transfer id
+     * @return status id
+     */
+    public String addTransferStatus(TransferStatus status, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (DataTransferDetails dataTransferDetails : taskDetails.getDataTransferDetailsList()) {
+                if (dataTransferDetails.getTransferId().equals(ids.getSecondLevelIdentifier())) {
+                    if (status.getTransferState() == null) {
+                        status.setTransferState(TransferState.UNKNOWN);
+                    }
+                    dataTransferDetails.setTransferStatus(status);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    return (String) ids.getSecondLevelIdentifier();
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Error while adding transfer status...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateTransferStatus(TransferStatus status, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (DataTransferDetails dataTransferDetails : taskDetails.getDataTransferDetailsList()) {
+                if (dataTransferDetails.getTransferId().equals(ids.getSecondLevelIdentifier())) {
+                    dataTransferDetails.setTransferStatus(status);
+                    experimentDao.updateTaskDetail(taskDetails);
+                }
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating transfer status...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addWorkflowNodeDetails(WorkflowNodeDetails nodeDetails, String expId) throws RegistryException {
+        try {
+            nodeDetails.setNodeInstanceId(getNodeInstanceID(nodeDetails.getNodeName()));
+            for (TaskDetails taskDetails : nodeDetails.getTaskDetailsList()) {
+                taskDetails.setTaskId(getTaskId(nodeDetails.getNodeName()));
+                for (DataTransferDetails dtd : taskDetails.getDataTransferDetailsList()) {
+                    dtd.setTransferId(getDataTransferID(taskDetails.getTaskId()));
+                }
+            }
+            experimentDao.createWFNode(expId, nodeDetails);
+            return nodeDetails.getNodeInstanceId();
+        } catch (Exception e) {
+            logger.error("Error while adding workflow node details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateWorkflowNodeDetails(WorkflowNodeDetails nodeDetails, String nodeId) throws RegistryException {
+        try {
+            experimentDao.updateWFNode(nodeDetails);
+        } catch (Exception e) {
+            logger.error("Error while updating workflow node details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addTaskDetails(TaskDetails taskDetails, String nodeId) throws RegistryException {
+        try {
+            experimentDao.createTaskDetail(nodeId, taskDetails);
+            return taskDetails.getTaskId();
+        } catch (Exception e) {
+            logger.error("Error while adding task details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String updateTaskDetails(TaskDetails taskDetails, String taskId) throws RegistryException {
+        try {
+            experimentDao.updateTaskDetail(taskDetails);
+            return taskDetails.getTaskId();
+        } catch (Exception e) {
+            logger.error("Error while updating task details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateAppOutputs(List<OutputDataObjectType> appOutputs, String taskId) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
+            taskDetails.setApplicationOutputs(appOutputs);
+            experimentDao.updateTaskDetail(taskDetails);
+        } catch (Exception e) {
+            logger.error("Error while updating application outputs...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addJobDetails(JobDetails jobDetails, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            jobDetails.setJobId((String) ids.getSecondLevelIdentifier());
+            taskDetails.getJobDetailsList().add(jobDetails);
+            experimentDao.updateTaskDetail(taskDetails);
+            return (String) ids.getSecondLevelIdentifier();
+        } catch (Exception e) {
+            logger.error("Error while adding job details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    // ids - taskId + jobid
+    public void updateJobDetails(JobDetails jobDetails, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            List<JobDetails> jobDetailsList = taskDetails.getJobDetailsList();
+            for (JobDetails exisitingJobDetail : taskDetails.getJobDetailsList()) {
+                if (exisitingJobDetail.getJobId().equals(jobDetails.getJobId())) {
+                    jobDetailsList.remove(exisitingJobDetail);
+                    jobDetailsList.add(jobDetails);
+                    taskDetails.setJobDetailsList(jobDetailsList);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    return;
+                }
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating job details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addDataTransferDetails(DataTransferDetails transferDetails, String taskId) throws RegistryException {
+        try {
+            if (transferDetails.getTransferDescription() == null) {
+                throw new RegistryException("Data transfer description cannot be empty");
+            }
+            TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
+            taskDetails.getDataTransferDetailsList().add(transferDetails);
+            experimentDao.updateTaskDetail(taskDetails);
+            return taskId;
+        } catch (Exception e) {
+            logger.error("Error while adding transfer details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String updateDataTransferDetails(DataTransferDetails transferDetails, CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetail = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (DataTransferDetails dtd : taskDetail.getDataTransferDetailsList()) {
+                if (dtd.getTransferId().equals(ids.getSecondLevelIdentifier())) {
+                    taskDetail.getDataTransferDetailsList().remove(dtd);
+                    taskDetail.getDataTransferDetailsList().add(transferDetails);
+                    experimentDao.updateTaskDetail(taskDetail);
+                    return (String) ids.getSecondLevelIdentifier();
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Error while updating transfer details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    /**
+     * @param scheduling computational resource object
+     * @param ids        contains expId and taskId, if it is an experiment, task id can be null
+     * @return scheduling id
+     */
+    public String addComputationalResourceScheduling(ComputationalResourceScheduling scheduling, CompositeIdentifier ids) throws RegistryException {
+        try {
+            if (ids.getSecondLevelIdentifier() == null) {
+                Experiment experiment = experimentDao.getExperiment((String) ids.getTopLevelIdentifier());
+                experiment.getUserConfigurationData().setComputationalResourceScheduling(scheduling);
+                experimentDao.updateExperiment(experiment);
+                return (String) ids.getTopLevelIdentifier();
+            } else {
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getSecondLevelIdentifier());
+                taskDetails.setTaskScheduling(scheduling);
+                experimentDao.updateTaskDetail(taskDetails);
+                return (String) ids.getSecondLevelIdentifier();
+            }
+        } catch (Exception e) {
+            logger.error("Error while adding scheduling parameters...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    /**
+     * @param dataHandling advanced input data handling object
+     * @param ids          contains expId and taskId
+     * @return data handling id
+     */
+    public String addInputDataHandling(AdvancedInputDataHandling dataHandling, CompositeIdentifier ids) throws RegistryException {
+        try {
+            if (ids.getSecondLevelIdentifier() == null) {
+                Experiment experiment = experimentDao.getExperiment((String) ids.getTopLevelIdentifier());
+                experiment.getUserConfigurationData().setAdvanceInputDataHandling(dataHandling);
+                experimentDao.updateExperiment(experiment);
+                return (String) ids.getTopLevelIdentifier();
+            } else {
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getSecondLevelIdentifier());
+                taskDetails.setAdvancedInputDataHandling(dataHandling);
+                experimentDao.updateTaskDetail(taskDetails);
+                return (String) ids.getSecondLevelIdentifier();
+            }
+        } catch (Exception e) {
+            logger.error("Error while adding input data handling...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    /**
+     * @param dataHandling advanced output data handling object
+     * @param ids          contains expId and taskId
+     * @return data handling id
+     */
+    public String addOutputDataHandling(AdvancedOutputDataHandling dataHandling, CompositeIdentifier ids) throws RegistryException {
+        try {
+            if (ids.getSecondLevelIdentifier() == null) {
+                Experiment experiment = experimentDao.getExperiment((String) ids.getTopLevelIdentifier());
+                experiment.getUserConfigurationData().setAdvanceOutputDataHandling(dataHandling);
+                experimentDao.updateExperiment(experiment);
+                return (String) ids.getTopLevelIdentifier();
+            } else {
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getSecondLevelIdentifier());
+                taskDetails.setAdvancedOutputDataHandling(dataHandling);
+                experimentDao.updateTaskDetail(taskDetails);
+                return (String) ids.getSecondLevelIdentifier();
+            }
+        } catch (Exception e) {
+            logger.error("Error while adding output data handling...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public String addQosParams(QualityOfServiceParams qosParams, String expId) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expId);
+            experiment.getUserConfigurationData().setQosParams(qosParams);
+            experimentDao.updateExperiment(experiment);
+            return expId;
+        } catch (Exception e) {
+            logger.error("Error while adding QOS params...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    //Todo
+    public String addErrorDetails(ErrorDetails error, Object id) throws RegistryException {
+        try {
+            ErrorDetailResource errorResource = null;
+            ExperimentResource experiment;
+            TaskDetailResource taskDetail;
+            WorkflowNodeDetailResource workflowNode;
+            // figure out the id is an experiment, node task or job
+            if (id instanceof String) {
+                // FIXME : for .12 we only saveExperiment task related errors
+//                if (isExperimentExist((String) id)) {
+//                    experiment = gatewayResource.getExperiment((String) id);
+//                    errorResource = (ErrorDetailResource) experiment.create(ResourceType.ERROR_DETAIL);
+//                } else if (isWFNodeExist((String) id)) {
+//                    experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+//                    workflowNode = experiment.getWorkflowNode((String) id);
+//                    errorResource = (ErrorDetailResource) workflowNode.create(ResourceType.ERROR_DETAIL);
+//                    errorResource.setExperimentResource(workflowNode.getExperimentResource());
+//                } else
+                if (isTaskDetailExist((String) id)) {
+                    experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+                    workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
+                    taskDetail = workflowNode.getTaskDetail((String) id);
+                    errorResource = (ErrorDetailResource) taskDetail.create(ResourceType.ERROR_DETAIL);
+                    if (error.getErrorId() != null && !error.getErrorId().equals(experimentModelConstants.DEFAULT_ID)) {
+                        List<ErrorDetailResource> errorDetailList = taskDetail.getErrorDetailList();
+                        if (errorDetailList != null && !errorDetailList.isEmpty()) {
+                            for (ErrorDetailResource errorDetailResource : errorDetailList) {
+                                if (errorDetailResource.getErrorId() == Integer.parseInt(error.getErrorId())) {
+                                    errorResource = errorDetailResource;
+                                }
+                            }
+                        }
+                    }
+                    errorResource.setTaskDetailResource(taskDetail);
+                    errorResource.setNodeDetail(taskDetail.getWorkflowNodeDetailResource());
+                    errorResource.setExperimentResource(taskDetail.getWorkflowNodeDetailResource().getExperimentResource());
+                } else {
+//                    logger.error("The id provided is not an experiment id or a workflow id or a task id..");
+                }
+            } else if (id instanceof CompositeIdentifier) {
+                CompositeIdentifier cid = (CompositeIdentifier) id;
+                if (isJobDetailExist(cid)) {
+                    experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+                    workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
+                    taskDetail = workflowNode.getTaskDetail((String) cid.getTopLevelIdentifier());
+                    JobDetailResource jobDetail = taskDetail.getJobDetail((String) cid.getSecondLevelIdentifier());
+                    errorResource = (ErrorDetailResource) jobDetail.create(ResourceType.ERROR_DETAIL);
+                    if (error.getErrorId() != null && !error.getErrorId().equals(experimentModelConstants.DEFAULT_ID)) {
+                        List<ErrorDetailResource> errorDetailList = taskDetail.getErrorDetailList();
+                        if (errorDetailList != null && !errorDetailList.isEmpty()) {
+                            for (ErrorDetailResource errorDetailResource : errorDetailList) {
+                                if (errorDetailResource.getErrorId() == Integer.parseInt(error.getErrorId())) {
+                                    errorResource = errorDetailResource;
+                                }
+                            }
+                        }
+                    }
+                    errorResource.setTaskDetailResource(taskDetail);
+                    errorResource.setNodeDetail(taskDetail.getWorkflowNodeDetailResource());
+                    errorResource.setExperimentResource(taskDetail.getWorkflowNodeDetailResource().getExperimentResource());
+                } else {
+                    logger.error("The id provided is not a job in the system..");
+                }
+            } else {
+//                logger.error("The id provided is not an experiment id or a workflow id or a task id or a composite " +
+//                        "identifier for job..");
+            }
+            if (errorResource != null) {
+                errorResource.setCreationTime(AiravataUtils.getTime(error.getCreationTime()));
+                errorResource.setActualErrorMsg(error.getActualErrorMessage());
+                errorResource.setUserFriendlyErrorMsg(error.getUserFriendlyMessage());
+                if (error.getErrorCategory() != null) {
+                    errorResource.setErrorCategory(error.getErrorCategory().toString());
+                }
+                errorResource.setTransientPersistent(error.isTransientOrPersistent());
+                if (error.getCorrectiveAction() != null) {
+                    errorResource.setCorrectiveAction(error.getCorrectiveAction().toString());
+                } else {
+                    errorResource.setCorrectiveAction(CorrectiveAction.CONTACT_SUPPORT.toString());
+                }
+                if (error.getActionableGroup() != null) {
+                    errorResource.setActionableGroup(error.getActionableGroup().toString());
+                } else {
+                    errorResource.setActionableGroup(ActionableGroup.GATEWAYS_ADMINS.toString());
+                }
+                errorResource.save();
+                return String.valueOf(errorResource.getErrorId());
+            }
+        } catch (Exception e) {
+            logger.error("Unable to add error details...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public String getNodeInstanceID(String nodeName) {
+        String node = nodeName.replaceAll("\\s", "");
+        return node + "_" + UUID.randomUUID();
+    }
+
+    public String getExperimentId(String experimentName) {
+        String exp = experimentName.replaceAll("\\s", "");
+        return exp + "_" + UUID.randomUUID();
+    }
+
+    public String getTaskId(String nodeName) {
+        String node = nodeName.replaceAll("\\s", "");
+        return node + "_" + UUID.randomUUID();
+    }
+
+    public String getDataTransferID(String taskId) {
+        String task = taskId.replaceAll("\\s", "");
+        return task + "_" + UUID.randomUUID();
+    }
+
+    public void updateExperimentField(String expID, String fieldName, Object value) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expID);
+            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_NAME)) {
+                experiment.setName((String) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
+                experiment.setUserName((String) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_DESC)) {
+                experiment.setDescription((String) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_ID)) {
+                experiment.setApplicationId((String) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_VERSION)) {
+                experiment.setApplicationVersion((String) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_TEMPLATE_ID)) {
+                experiment.setWorkflowTemplateId((String) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_TEMPLATE_VERSION)) {
+                experiment.setWorkflowTemplateVersion((String) value);
+                experimentDao.updateExperiment(experiment);
+            } else {
+                logger.error("Unsupported field type for Experiment");
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating fields in experiment...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateExpConfigDataField(String expID, String fieldName, Object value) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expID);
+            if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.AIRAVATA_AUTO_SCHEDULE)) {
+                experiment.getUserConfigurationData().setAiravataAutoSchedule((Boolean) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.OVERRIDE_MANUAL_PARAMS)) {
+                experiment.getUserConfigurationData().setOverrideManualScheduledParams((Boolean) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.SHARE_EXP)) {
+                experiment.getUserConfigurationData().setShareExperimentPublicly((Boolean) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants
+                    .ConfigurationDataConstants.COMPUTATIONAL_RESOURCE_SCHEDULING)) {
+                experiment.getUserConfigurationData()
+                        .setComputationalResourceScheduling((ComputationalResourceScheduling) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_INPUT_HANDLING)) {
+                experiment.getUserConfigurationData()
+                        .setAdvanceInputDataHandling((AdvancedInputDataHandling) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_OUTPUT_HANDLING)) {
+                experiment.getUserConfigurationData()
+                        .setAdvanceOutputDataHandling((AdvancedOutputDataHandling) value);
+                experimentDao.updateExperiment(experiment);
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.QOS_PARAMS)) {
+                experiment.getUserConfigurationData()
+                        .setQosParams((QualityOfServiceParams) value);
+                experimentDao.updateExperiment(experiment);
+            } else {
+                logger.error("Unsupported field type for Experiment config data");
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating fields in experiment config...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateExperiment(Experiment experiment, String expId) throws RegistryException {
+        try {
+            if (!ResourceUtils.isUserExist(experiment.getUserName())) {
+                ResourceUtils.addUser(experiment.getUserName(), null);
+            }
+            if (!workerResource.isProjectExists(experiment.getProjectId())) {
+                logger.error("Project does not exist in the system..");
+                throw new Exception("Project does not exist in the system, Please create the project first...");
+            }
+            //making sure id is set
+            experiment.setExperimentId(expId);
+            experimentDao.updateExperiment(experiment);
+        } catch (Exception e) {
+            logger.error("Error while updating experiment...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateUserConfigData(UserConfigurationData configData, String expId) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expId);
+            experiment.setUserConfigurationData(configData);
+            experimentDao.updateExperiment(experiment);
+            return;
+        } catch (Exception e) {
+            logger.error("Error while updating user config data...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    //Todo
+    /**
+     * Method to getExperiment matching experiment list
+     *
+     * @param fieldName
+     * @param value
+     * @return
+     * @throws RegistryException
+     */
+    public List<Experiment> getExperimentList(String fieldName, Object value) throws RegistryException {
+        List<Experiment> experiments = new ArrayList();
+        try {
+            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
+                WorkerResource resource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
+                resource.setUser((String) value);
+                List<ExperimentResource> resources = resource.getExperiments();
+                for (ExperimentResource experimentResource : resources) {
+                    Experiment experiment = ThriftDataModelConversion.getExperiment(experimentResource);
+                    experiments.add(experiment);
+                }
+                return experiments;
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.PROJECT_ID)) {
+                ProjectResource project = workerResource.getProject((String) value);
+                List<ExperimentResource> resources = project.getExperiments();
+                for (ExperimentResource resource : resources) {
+                    Experiment experiment = ThriftDataModelConversion.getExperiment(resource);
+                    experiments.add(experiment);
+                }
+                return experiments;
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
+                List<ExperimentResource> resources = gatewayResource.getExperiments();
+                for (ExperimentResource resource : resources) {
+                    Experiment experiment = ThriftDataModelConversion.getExperiment(resource);
+                    experiments.add(experiment);
+                }
+                return experiments;
+            }
+            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_NODE_LIST)) {
+                if (value instanceof List<?>) {
+                    return getExperimentList(fieldName, ((List<?>) value).get(0));
+                } else if (value instanceof WorkflowNodeDetails) {
+                    //WorkflowNodeDetailResource nodeDetailResource = getWorkflowNodeDetailResource(((WorkflowNodeDetails) value).getNodeInstanceId());
+//                    if (nodeDetailResource != null) {
+//                        return Arrays.asList(new Experiment[]{ThriftDataModelConversion
+//                                .getExperiment(nodeDetailResource
+//                                        .getExperimentResource())});
+//                    }
+                } else {
+                    logger.error("Unsupported field value to retrieve workflow node detail list...");
+                }
+
+            } else {
+                logger.error("Unsupported field name to retrieve experiment list...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting experiment list...", e);
+            throw new RegistryException(e);
+        }
+        return experiments;
+    }
+
+    //Todo
+    /**
+     * Method to getExperiment matching experiment list with pagination and ordering
+     *
+     * @param fieldName
+     * @param value
+     * @param limit
+     * @param offset
+     * @param orderByIdentifier
+     * @param resultOrderType
+     * @return
+     * @throws RegistryException
+     */
+    public List<Experiment> getExperimentList(String fieldName, Object value, int limit, int offset,
+                                              Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+        List<Experiment> experiments = new ArrayList();
+        try {
+            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
+                WorkerResource resource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
+                resource.setUser((String) value);
+                List<ExperimentResource> resources = resource.getExperiments(limit, offset,
+                        orderByIdentifier, resultOrderType);
+                for (ExperimentResource experimentResource : resources) {
+                    Experiment experiment = ThriftDataModelConversion.getExperiment(experimentResource);
+                    experiments.add(experiment);
+                }
+                return experiments;
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.PROJECT_ID)) {
+                ProjectResource project = workerResource.getProject((String) value);
+                List<ExperimentResource> resources = project.getExperiments(limit, offset,
+                        Constants.FieldConstants.ExperimentConstants.CREATION_TIME, ResultOrderType.DESC);
+                for (ExperimentResource resource : resources) {
+                    Experiment experiment = ThriftDataModelConversion.getExperiment(resource);
+                    experiments.add(experiment);
+                }
+                return experiments;
+            }
+            logger.error("Unsupported field name to retrieve experiment list...");
+        } catch (Exception e) {
+            logger.error("Error while getting experiment list...", e);
+            throw new RegistryException(e);
+        }
+        return experiments;
+    }
+
+
+    public List<WorkflowNodeDetails> getWFNodeDetails(String fieldName, Object value) throws RegistryException {
+        try {
+            if (fieldName.equals(Constants.FieldConstants.WorkflowNodeConstants.EXPERIMENT_ID)) {
+                Experiment experiment = experimentDao.getExperiment((String) value);
+                return experiment.getWorkflowNodeDetailsList();
+            }
+            if (fieldName.equals(Constants.FieldConstants.WorkflowNodeConstants.TASK_LIST)) {
+                if (value instanceof List<?>) {
+                    return getWFNodeDetails(fieldName, ((List<?>) value).get(0));
+                } else if (value instanceof TaskDetails) {
+                    //Fixme
+//                    TaskDetailResource taskDetailResource = getTaskDetailResource(((TaskDetails) value).getTaskId());
+//                    if (taskDetailResource != null) {
+//                        return Arrays.asList(new WorkflowNodeDetails[]{ThriftDataModelConversion
+//                                .getWorkflowNodeDetails(taskDetailResource
+//                                        .getWorkflowNodeDetailResource())});
+//                    }
+                } else {
+                    logger.error("Unsupported field value to retrieve workflow node detail list...");
+                }
+            } else {
+                logger.error("Unsupported field name to retrieve workflow detail list...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting workfkow details...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<WorkflowNodeStatus> getWFNodeStatusList(String fieldName, Object value) throws RegistryException {
+        try {
+            if (fieldName.equals(Constants.FieldConstants.WorkflowNodeStatusConstants.EXPERIMENT_ID)) {
+                Experiment experiment = experimentDao.getExperiment((String) value);
+                List<WorkflowNodeStatus> workflowNodeStatuses = experiment.getWorkflowNodeDetailsList().stream().map(WorkflowNodeDetails::getWorkflowNodeStatus).collect(Collectors.toList());
+                return workflowNodeStatuses;
+            } else {
+                logger.error("Unsupported field name to retrieve workflow status list...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting workflow status...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<TaskDetails> getTaskDetails(String fieldName, Object value) throws RegistryException {
+        try {
+            if (fieldName.equals(Constants.FieldConstants.TaskDetailConstants.NODE_ID)) {
+                WorkflowNodeDetails wfnd = experimentDao.getWFNode((String) value);
+                return wfnd.getTaskDetailsList();
+            } else {
+                logger.error("Unsupported field name to retrieve task detail list...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting task details...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<JobDetails> getJobDetails(String fieldName, Object value) throws RegistryException {
+        try {
+            if (fieldName.equals(Constants.FieldConstants.JobDetaisConstants.TASK_ID)) {
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) value);
+                return taskDetails.getJobDetailsList();
+            } else {
+                logger.error("Unsupported field name to retrieve job details list...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while job details...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<DataTransferDetails> getDataTransferDetails(String fieldName, Object value) throws RegistryException {
+        try {
+            if (fieldName.equals(Constants.FieldConstants.DataTransferDetailConstants.TASK_ID)) {
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) value);
+                return taskDetails.getDataTransferDetailsList();
+            } else {
+                logger.error("Unsupported field name to retrieve job details list...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting data transfer details...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<ErrorDetails> getErrorDetails(String fieldName, Object value) throws RegistryException {
+        try {
+            if (fieldName.equals(Constants.FieldConstants.ErrorDetailsConstants.EXPERIMENT_ID)) {
+                Experiment experiment = experimentDao.getExperiment((String) value);
+                return experiment.getErrors();
+            } else if (fieldName.equals(Constants.FieldConstants.ErrorDetailsConstants.NODE_ID)) {
+                WorkflowNodeDetails wfnd = experimentDao.getWFNode((String) value);
+                wfnd.getErrors();
+            } else if (fieldName.equals(Constants.FieldConstants.ErrorDetailsConstants.TASK_ID)) {
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) value);
+                return taskDetails.getErrors();
+            } else if (fieldName.equals(Constants.FieldConstants.ErrorDetailsConstants.JOB_ID)) {
+                CompositeIdentifier cid = (CompositeIdentifier) value;
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) cid.getTopLevelIdentifier());
+                for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                    if (jobDetails.getJobId().equals(cid.getSecondLevelIdentifier())) {
+                        return jobDetails.getErrors();
+                    }
+                }
+            } else {
+                logger.error("Unsupported field name to retrieve job details list...");
+            }
+        } catch (Exception e) {
+            logger.error("Unable to get error details...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public Object getExperiment(String expId, String fieldName) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expId);
+            if (fieldName == null) {
+                return experiment;
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
+                return experiment.getUserName();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
+                return experiment.getGatewayExecutionId();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_NAME)) {
+                return experiment.getName();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_DESC)) {
+                return experiment.getDescription();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_ID)) {
+                return experiment.getApplicationId();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.PROJECT_ID)) {
+                return experiment.getProjectId();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_VERSION)) {
+                return experiment.getApplicationVersion();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_TEMPLATE_ID)) {
+                return experiment.getWorkflowTemplateId();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_TEMPLATE_VERSION)) {
+                return experiment.getWorkflowTemplateVersion();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_INPUTS)) {
+                return experiment.getExperimentInputs();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_OUTPUTS)) {
+                return experiment.getExperimentOutputs();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_STATUS)) {
+                return experiment.getExperimentStatus();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_CONFIGURATION_DATA)) {
+                return experiment.getUserConfigurationData();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_EXECUTION_ID)) {
+                return experiment.getWorkflowExecutionInstanceId();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.STATE_CHANGE_LIST)) {
+                final List<WorkflowNodeStatus> statusList = new ArrayList();
+                        experiment.getWorkflowNodeDetailsList().stream()
+                        .forEach(wfnd->statusList.add(wfnd.getWorkflowNodeStatus()));
+                return statusList;
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_NODE_LIST)) {
+                return experiment.getWorkflowNodeDetailsList();
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.ERROR_DETAIL_LIST)) {
+                return experiment.getErrors();
+            } else {
+                logger.error("Unsupported field name for experiment basic data..");
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting experiment info...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public Object getConfigData(String expId, String fieldName) throws RegistryException {
+        try {
+            UserConfigurationData configurationData = experimentDao.getExperiment(expId).getUserConfigurationData();
+            if (fieldName == null) {
+                return configurationData;
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.AIRAVATA_AUTO_SCHEDULE)) {
+                return configurationData.isAiravataAutoSchedule();
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.OVERRIDE_MANUAL_PARAMS)) {
+                return configurationData.isOverrideManualScheduledParams();
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.SHARE_EXP)) {
+                return configurationData.isShareExperimentPublicly();
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.COMPUTATIONAL_RESOURCE_SCHEDULING)) {
+                return configurationData.getComputationalResourceScheduling();
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_INPUT_HANDLING)) {
+                return configurationData.getAdvanceInputDataHandling();
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_OUTPUT_HANDLING)) {
+                return configurationData.getAdvanceOutputDataHandling();
+            } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.QOS_PARAMS)) {
+                return configurationData.getQosParams();
+            } else {
+                logger.error("Unsupported field name for experiment configuration data..");
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting config data..", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<OutputDataObjectType> getExperimentOutputs(String expId) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expId);
+            return experiment.getExperimentOutputs();
+        } catch (Exception e) {
+            logger.error("Error while getting experiment outputs...", e);
+        }
+        return null;
+    }
+
+    public ExperimentStatus getExperimentStatus(String expId) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(expId);
+            return experiment.getExperimentStatus();
+        } catch (Exception e) {
+            logger.error("Error while getting experiment status...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public ComputationalResourceScheduling getComputationalScheduling(RegistryModelType type, String id) throws RegistryException {
+        try {
+            ComputationSchedulingResource computationScheduling = null;
+            switch (type) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getComputationalResourceScheduling();
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    return taskDetails.getTaskScheduling();
+            }
+            if (computationScheduling != null) {
+                return ThriftDataModelConversion.getComputationalResourceScheduling(computationScheduling);
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting scheduling data..", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public AdvancedInputDataHandling getInputDataHandling(RegistryModelType type, String id) throws RegistryException {
+        try {
+            AdvanceInputDataHandlingResource dataHandlingResource = null;
+            switch (type) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getAdvanceInputDataHandling();
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    return taskDetails.getAdvancedInputDataHandling();
+            }
+            if (dataHandlingResource != null) {
+                return ThriftDataModelConversion.getAdvanceInputDataHandling(dataHandlingResource);
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting input data handling..", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public AdvancedOutputDataHandling getOutputDataHandling(RegistryModelType type, String id) throws RegistryException {
+        try {
+            AdvancedOutputDataHandlingResource dataHandlingResource = null;
+            switch (type) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getAdvanceOutputDataHandling();
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    return taskDetails.getAdvancedOutputDataHandling();
+            }
+            if (dataHandlingResource != null) {
+                return ThriftDataModelConversion.getAdvanceOutputDataHandling(dataHandlingResource);
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting output data handling...", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public QualityOfServiceParams getQosParams(RegistryModelType type, String id) throws RegistryException {
+        try {
+            switch (type) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getQosParams();
+            }
+        } catch (Exception e) {
+            logger.error("Error while getting qos params..", e);
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public WorkflowNodeDetails getWorkflowNodeDetails(String nodeId) throws RegistryException {
+        try {
+            return experimentDao.getWFNode(nodeId);
+        } catch (Exception e) {
+            logger.error("Error while getting workflow node details...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public WorkflowNodeStatus getWorkflowNodeStatus(String nodeId) throws RegistryException {
+        try {
+            WorkflowNodeDetails wfnd = experimentDao.getWFNode(nodeId);
+            return wfnd.getWorkflowNodeStatus();
+        } catch (Exception e) {
+            logger.error("Error while getting workflow node status..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public List<OutputDataObjectType> getNodeOutputs(String nodeId) throws RegistryException {
+        try {
+            WorkflowNodeDetails wfnd = experimentDao.getWFNode(nodeId);
+            return wfnd.getNodeOutputs();
+        } catch (Exception e) {
+            logger.error("Error while getting node outputs..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public TaskDetails getTaskDetails(String taskId) throws RegistryException {
+        try {
+            return experimentDao.getTaskDetail(taskId);
+        } catch (Exception e) {
+            logger.error("Error while getting task details..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public List<OutputDataObjectType> getApplicationOutputs(String taskId) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
+            return taskDetails.getApplicationOutputs();
+        } catch (Exception e) {
+            logger.error("Error while getting application outputs..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public TaskStatus getTaskStatus(String taskId) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
+            return taskDetails.getTaskStatus();
+        } catch (Exception e) {
+            logger.error("Error while getting experiment outputs..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    // ids contains task id + job id
+    public JobDetails getJobDetails(CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
+                    return jobDetails;
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Error while getting job details..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    // ids contains task id + job id
+    public JobStatus getJobStatus(CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
+                    return jobDetails.getJobStatus();
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Error while getting job status..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public ApplicationStatus getApplicationStatus(CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
+                    return jobDetails.getApplicationStatus();
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Error while getting application status..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public DataTransferDetails getDataTransferDetails(CompositeIdentifier cid) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String)cid.getTopLevelIdentifier());
+            for(DataTransferDetails dtd: taskDetails.getDataTransferDetailsList()){
+                if(dtd.getTransferId().equals(cid.getSecondLevelIdentifier())){
+                    return dtd;
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Error while getting data transfer details..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public TransferStatus getDataTransferStatus(CompositeIdentifier cid) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String)cid.getTopLevelIdentifier());
+            for(DataTransferDetails dtd: taskDetails.getDataTransferDetailsList()){
+                if(dtd.getTransferId().equals(cid.getSecondLevelIdentifier())){
+                    return dtd.getTransferStatus();
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Error while getting data transfer status..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    //Todo
+    public List<String> getExperimentIds(String fieldName, Object value) throws RegistryException {
+        List<String> expIDs = new ArrayList();
+        try {
+            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
+                if (gatewayResource == null) {
+                    logger.error("You should use an existing gateway in order to retrieve experiments..");
+                    return null;
+                } else {
+                    List<ExperimentResource> resources = gatewayResource.getExperiments();
+                    for (ExperimentResource resource : resources) {
+                        String expID = resource.getExpID();
+                        expIDs.add(expID);
+                    }
+                }
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
+                List<ExperimentResource> resources = workerResource.getExperiments();
+                expIDs.addAll(resources.stream().map(ExperimentResource::getExpID).collect(Collectors.toList()));
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.PROJECT_ID)) {
+                List<ExperimentResource> resources = workerResource.getExperiments();
+                expIDs.addAll(resources.stream().map(ExperimentResource::getExpID).collect(Collectors.toList()));
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving experiment ids..", e);
+            throw new RegistryException(e);
+        }
+        return expIDs;
+    }
+
+    public List<String> getWorkflowNodeIds(String fieldName, Object value) throws RegistryException {
+        List<String> wfIds = new ArrayList();
+        List<WorkflowNodeDetails> wfNodeDetails = getWFNodeDetails(fieldName, value);
+        wfIds.addAll(wfNodeDetails.stream().map(WorkflowNodeDetails::getNodeInstanceId).collect(Collectors.toList()));
+        return wfIds;
+    }
+
+    public List<String> getTaskDetailIds(String fieldName, Object value) throws RegistryException {
+        List<String> taskDetailIds = new ArrayList();
+        List<TaskDetails> taskDetails = getTaskDetails(fieldName, value);
+        taskDetailIds.addAll(taskDetails.stream().map(TaskDetails::getTaskId).collect(Collectors.toList()));
+        return taskDetailIds;
+    }
+
+    public List<String> getJobDetailIds(String fieldName, Object value) throws RegistryException {
+        List<String> jobIds = new ArrayList<String>();
+        List<JobDetails> jobDetails = getJobDetails(fieldName, value);
+        jobIds.addAll(jobDetails.stream().map(JobDetails::getJobId).collect(Collectors.toList()));
+        return jobIds;
+    }
+
+    public List<String> getTransferDetailIds(String fieldName, Object value) throws RegistryException {
+        List<String> transferIds = new ArrayList<String>();
+        List<DataTransferDetails> dataTransferDetails = getDataTransferDetails(fieldName, value);
+        transferIds.addAll(dataTransferDetails.stream().map(DataTransferDetails::getTransferId).collect(Collectors.toList()));
+        return transferIds;
+    }
+
+
+    public void removeExperiment(String experimentId) throws RegistryException {
+        try {
+            Experiment experiment = new Experiment();
+            experiment.setExperimentId(experimentId);
+            experimentDao.deleteExperiment(experiment);
+        } catch (Exception e) {
+            logger.error("Error while removing experiment..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeExperimentConfigData(String experimentId) throws RegistryException {
+        try {
+            Experiment experiment = experimentDao.getExperiment(experimentId);
+            experiment.setUserConfigurationData(null);
+            experimentDao.updateExperiment(experiment);
+        } catch (Exception e) {
+            logger.error("Error while removing experiment config..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeWorkflowNode(String nodeId) throws RegistryException {
+        try {
+            WorkflowNodeDetails wfnd = new WorkflowNodeDetails();
+            wfnd.setNodeInstanceId(nodeId);
+            experimentDao.deleteWFNode(wfnd);
+        } catch (Exception e) {
+            logger.error("Error while removing workflow node..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeTaskDetails(String taskId) throws RegistryException {
+        try {
+            TaskDetails taskDetails = new TaskDetails();
+            taskDetails.setTaskId(taskId);
+            experimentDao.deleteTaskDetail(taskDetails);
+        } catch (Exception e) {
+            logger.error("Error while removing task details..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeJobDetails(CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
+                    taskDetails.getJobDetailsList().remove(jobDetails);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    return;
+                }
+            }
+        } catch (Exception e) {
+            logger.error("Error while removing job details..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeDataTransferDetails(CompositeIdentifier cid) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String)cid.getTopLevelIdentifier());
+            for(DataTransferDetails dtd: taskDetails.getDataTransferDetailsList()){
+                if(dtd.getTransferId().equals(cid.getSecondLevelIdentifier())){
+                    taskDetails.getDataTransferDetailsList().remove(dtd);
+                    experimentDao.updateTaskDetail(taskDetails);
+                }
+            }
+        } catch (Exception e) {
+            logger.error("Error while removing transfer details..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeComputationalScheduling(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            switch (dataType) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    experiment.getUserConfigurationData().setComputationalResourceScheduling(null);
+                    experimentDao.updateExperiment(experiment);
+                    return;
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    taskDetails.setTaskScheduling(null);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    break;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while removing scheduling data..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeInputDataHandling(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            switch (dataType) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    experiment.getUserConfigurationData().setAdvanceInputDataHandling(null);
+                    experimentDao.updateExperiment(experiment);
+                    break;
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    taskDetails.setAdvancedInputDataHandling(null);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    break;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while removing input data handling..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeOutputDataHandling(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            switch (dataType) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    experiment.getUserConfigurationData().setAdvanceOutputDataHandling(null);
+                    experimentDao.updateExperiment(experiment);
+                    break;
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    taskDetails.setAdvancedOutputDataHandling(null);
+                    experimentDao.updateTaskDetail(taskDetails);
+                    break;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while removing output data handling..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void removeQOSParams(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            switch (dataType) {
+                case EXPERIMENT:
+                    Experiment experiment = experimentDao.getExperiment(id);
+                    experiment.getUserConfigurationData().setQosParams(null);
+                    experimentDao.updateExperiment(experiment);
+                    break;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while removing QOS params", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isExperimentExist(String expID) throws RegistryException {
+        try {
+            return experimentDao.getExperiment(expID) != null;
+        } catch (Exception e) {
+            logger.error("Error while retrieving experiment...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isExperimentConfigDataExist(String expID) throws RegistryException {
+        try {
+            return experimentDao.getExperiment(expID).getUserConfigurationData() != null;
+        } catch (Exception e) {
+            logger.error("Error while retrieving experiment...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isWFNodeExist(String nodeId) throws RegistryException {
+        try {
+            return experimentDao.getWFNode(nodeId) != null;
+        } catch (Exception e) {
+            logger.error("Error while retrieving workflow...", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isTaskDetailExist(String taskId) throws RegistryException {
+        try {
+            return experimentDao.getTaskDetail(taskId) != null;
+        } catch (Exception e) {
+            logger.error("Error while retrieving task.....", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isJobDetailExist(CompositeIdentifier ids) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
+            for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
+                    return true;
+                }
+            }
+            return false;
+        } catch (Exception e) {
+            logger.error("Error while retrieving job details.....", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isTransferDetailExist(CompositeIdentifier cid) throws RegistryException {
+        try {
+            TaskDetails taskDetails = experimentDao.getTaskDetail((String) cid.getTopLevelIdentifier());
+            for (DataTransferDetails dtd : taskDetails.getDataTransferDetailsList()) {
+                if (dtd.getTransferId().equals(cid.getSecondLevelIdentifier())) {
+                    return true;
+                }
+            }
+            return false;
+        } catch (Exception e) {
+            logger.error("Error while retrieving transfer details.....", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isComputationalSchedulingExist(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            Experiment experiment;
+            switch (dataType) {
+                case EXPERIMENT:
+                    experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getComputationalResourceScheduling() != null;
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    return taskDetails.getTaskScheduling() != null;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving scheduling data.....", e);
+            throw new RegistryException(e);
+        }
+        return false;
+    }
+
+    public boolean isInputDataHandlingExist(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            Experiment experiment;
+            switch (dataType) {
+                case EXPERIMENT:
+                    experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getAdvanceInputDataHandling() != null;
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    return taskDetails.getAdvancedInputDataHandling() != null;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving input data handling.....", e);
+            throw new RegistryException(e);
+        }
+        return false;
+    }
+
+    public boolean isOutputDataHandlingExist(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            Experiment experiment;
+            switch (dataType) {
+                case EXPERIMENT:
+                    experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getAdvanceOutputDataHandling() != null;
+                case TASK_DETAIL:
+                    TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                    return taskDetails.getAdvancedOutputDataHandling() != null;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving output data handling..", e);
+            throw new RegistryException(e);
+        }
+        return false;
+    }
+
+    public boolean isQOSParamsExist(RegistryModelType dataType, String id) throws RegistryException {
+        try {
+            Experiment experiment;
+            switch (dataType) {
+                case EXPERIMENT:
+                    experiment = experimentDao.getExperiment(id);
+                    return experiment.getUserConfigurationData().getQosParams() != null;
+                default:
+                    logger.error("Unsupported data type...");
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving qos params..", e);
+            throw new RegistryException(e);
+        }
+        return false;
+    }
+
+    public void updateScheduling(ComputationalResourceScheduling scheduling, String id, String type) throws RegistryException {
+        try {
+            if (type.equals(RegistryModelType.EXPERIMENT.toString())) {
+                Experiment experiment = experimentDao.getExperiment(id);
+                experiment.getUserConfigurationData().setComputationalResourceScheduling(scheduling);
+                experimentDao.updateExperiment(experiment);
+                return;
+            } else if (type.equals(RegistryModelType.TASK_DETAIL.toString())) {
+                TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                taskDetails.setTaskScheduling(scheduling);
+                experimentDao.updateTaskDetail(taskDetails);
+                return;
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating scheduling..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateInputDataHandling(AdvancedInputDataHandling dataHandling, String id, String type) throws RegistryException {
+        try {
+            if (type.equals(RegistryModelType.EXPERIMENT.toString())) {
+                Experiment experiment = experimentDao.getExperiment(id);
+                experiment.getUserConfigurationData().setAdvanceInputDataHandling(dataHandling);
+                experimentDao.updateExperiment(experiment);
+                return;
+            } else if (type.equals(RegistryModelType.TASK_DETAIL.toString())) {
+                TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                taskDetails.setAdvancedInputDataHandling(dataHandling);
+                experimentDao.updateTaskDetail(taskDetails);
+                return;
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating input data handling..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateOutputDataHandling(AdvancedOutputDataHandling dataHandling, String id, String type) throws RegistryException {
+        try {
+            if (type.equals(RegistryModelType.EXPERIMENT.toString())) {
+                Experiment experiment = experimentDao.getExperiment(id);
+                experiment.getUserConfigurationData().setAdvanceOutputDataHandling(dataHandling);
+                experimentDao.updateExperiment(experiment);
+                return;
+            } else if (type.equals(RegistryModelType.TASK_DETAIL.toString())) {
+                TaskDetails taskDetails = experimentDao.getTaskDetail(id);
+                taskDetails.setAdvancedOutputDataHandling(dataHandling);
+                experimentDao.updateTaskDetail(taskDetails);
+                return;
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating output data handling", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateQOSParams(QualityOfServiceParams params, String id, String type) throws RegistryException {
+        try {
+            if (type.equals(RegistryModelType.EXPERIMENT.toString())) {
+                Experiment experiment = experimentDao.getExperiment(id);
+                experiment.getUserConfigurationData().setQosParams(params);
+                experimentDao.updateExperiment(experiment);
+            } else {
+                logger.error("Unsupported data type... " + type);
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating QOS data..", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    /**
+     * To search the experiments of user with the given filter criteria and retrieve the results with
+     * pagination support. Results can be ordered based on an identifier (i.e column) either ASC or
+     * DESC.
+     *
+     * @param filters
+     * @param limit
+     * @param offset
+     * @param orderByIdentifier
+     * @param resultOrderType
+     * @return
+     * @throws RegistryException
+     */
+    public List<ExperimentSummary> searchExperiments(Map<String, String> filters, int limit,
+            int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+        List<Experiment> experimentList = experimentDao.searchExperiments(
+                filters, limit, offset, orderByIdentifier, resultOrderType);
+        List<ExperimentSummary> experimentSummaries = new ArrayList();
+        experimentList.stream().forEach(experiment->{
+            ExperimentSummary expSummary = new ExperimentSummary();
+            expSummary.setExperimentId(experiment.getExperimentId());
+            expSummary.setName(experiment.getName());
+            expSummary.setDescription(experiment.getDescription());
+            expSummary.setCreationTime(experiment.getCreationTime());
+            //Todo
+            experimentSummaries.add(expSummary);
+        });
+        return experimentSummaries;
+    }
+
+    private boolean isValidStatusTransition(ExperimentState oldState, ExperimentState nextState) {
+        if (nextState == null) {
+            return false;
+        }
+        switch (oldState) {
+            case CREATED:
+                return true;
+            case VALIDATED:
+                return nextState != ExperimentState.CREATED;
+            case SCHEDULED:
+                return nextState != ExperimentState.CREATED
+                        || nextState != ExperimentState.VALIDATED;
+            case LAUNCHED:
+                return nextState != ExperimentState.CREATED
+                        || nextState != ExperimentState.VALIDATED
+                        || nextState != ExperimentState.SCHEDULED;
+            case EXECUTING:
+                return nextState != ExperimentState.CREATED
+                        || nextState != ExperimentState.VALIDATED
+                        || nextState != ExperimentState.SCHEDULED
+                        || nextState != ExperimentState.LAUNCHED;
+
+            case CANCELING:
+                return nextState == ExperimentState.CANCELING
+                        || nextState == ExperimentState.CANCELED
+                        || nextState == ExperimentState.COMPLETED
+                        || nextState == ExperimentState.FAILED;
+            case CANCELED:
+                return nextState == ExperimentState.CANCELED;
+            case COMPLETED:
+                return nextState == ExperimentState.COMPLETED;
+            case FAILED:
+                return nextState == ExperimentState.FAILED;
+            //case SUSPENDED:  // We don't change state to SUSPEND
+            case UNKNOWN:
+                return true;
+            default:
+                return false;
+        }
+    }
+}


[07/44] airavata git commit: Changing the thrift model variable names to lower camel case

Posted by sc...@apache.org.
Changing the thrift model variable names to lower camel case


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

Branch: refs/heads/mongo-registry
Commit: b376aa859656d99dcc0651e2d381ed7d13427f3b
Parents: 86994f6
Author: Supun Nakandala <sc...@apache.org>
Authored: Sun May 24 23:37:55 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Sun May 24 23:37:57 2015 +0530

----------------------------------------------------------------------
 .../server/handler/AiravataServerHandler.java   |   8 +-
 .../AiravataExperimentStatusUpdator.java        |   4 +-
 .../api/server/util/DataModelUtils.java         |   4 +-
 .../handler/AiravataServerHandlerTest.java      |  14 +-
 .../lib/airavata/experimentModel_types.cpp      | 136 ++++++------
 .../lib/airavata/experimentModel_types.h        | 112 +++++-----
 .../lib/airavata/workspaceModel_types.cpp       |  14 +-
 .../lib/airavata/workspaceModel_types.h         |  10 +-
 .../Model/Workspace/Experiment/Types.php        | 160 +++++++--------
 .../lib/Airavata/Model/Workspace/Types.php      |  16 +-
 .../model/workspace/experiment/ttypes.py        | 188 ++++++++---------
 .../apache/airavata/model/workspace/ttypes.py   |  20 +-
 .../client/samples/CancelExperiments.java       |   2 +-
 .../client/samples/CreateLaunchBES.java         |   6 +-
 .../client/samples/CreateLaunchExperiment.java  |   6 +-
 .../samples/CreateLaunchExperimentUS3.java      |   2 +-
 .../samples/TestCreateLaunchExperiment.java     |   6 +-
 .../airavata/model/workspace/Project.java       |  90 ++++----
 .../ComputationalResourceScheduling.java        |  96 ++++-----
 .../experiment/DataTransferDetails.java         | 115 +++++------
 .../workspace/experiment/ErrorDetails.java      |  90 ++++----
 .../model/workspace/experiment/Experiment.java  | 205 +++++++++----------
 .../workspace/experiment/ExperimentSummary.java | 176 ++++++++--------
 .../model/workspace/experiment/JobDetails.java  | 115 +++++------
 .../model/workspace/experiment/TaskDetails.java | 115 +++++------
 .../experiment/UserConfigurationData.java       |  88 ++++----
 .../model/util/ExperimentModelUtil.java         |   4 +-
 .../experimentModel.thrift                      |  20 +-
 .../workspaceModel.thrift                       |   2 +-
 .../apache/airavata/gfac/cpi/GfacService.java   |  56 ++---
 .../apache/airavata/gfac/cpi/GfacService.java   |  56 ++---
 .../gaussian/handler/GaussianHandler.java       |   6 +-
 .../gfac/bes/provider/impl/BESProvider.java     |  45 ++--
 .../bes/security/UNICORESecurityContext.java    |  19 +-
 .../gfac/bes/utils/DataTransferrer.java         |   2 +-
 .../airavata/gfac/bes/utils/JSDLUtils.java      |  25 +--
 .../gfac/bes/utils/ResourceProcessor.java       |   8 +-
 .../gfac/core/context/JobExecutionContext.java  |   4 +-
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  |  82 ++++----
 .../apache/airavata/gfac/core/cpi/GFacImpl.java |  52 ++---
 .../gfac/core/handler/AbstractHandler.java      |   4 +-
 .../core/monitor/AiravataJobStatusUpdator.java  |   2 +-
 .../gfac/core/monitor/ExperimentIdentity.java   |   6 +-
 .../core/monitor/GfacInternalStatusUpdator.java |   6 +-
 .../airavata/gfac/core/monitor/MonitorID.java   |  28 +--
 .../state/GfacExperimentStateChangeRequest.java |   6 +-
 .../monitor/state/JobStatusChangeRequest.java   |   4 +-
 .../monitor/state/JobStatusChangedEvent.java    |   4 +-
 .../airavata/gfac/core/utils/GFacUtils.java     |  32 +--
 .../gfac/core/utils/OutHandlerWorker.java       |   2 +-
 .../handler/GSISSHDirectorySetupHandler.java    |   4 +-
 .../gfac/gsissh/handler/GSISSHInputHandler.java |   6 +-
 .../gsissh/handler/GSISSHOutputHandler.java     |  14 +-
 .../gsissh/handler/NewGSISSHOutputHandler.java  |   2 +-
 .../gsissh/provider/impl/GSISSHProvider.java    |  22 +-
 .../gfac/gsissh/util/GFACGSISSHUtils.java       |   2 +-
 .../impl/GSISSHProviderTestWithMyProxyAuth.java |   4 +-
 .../gfac/local/provider/impl/LocalProvider.java |  24 +--
 .../gfac/services/impl/LocalProviderTest.java   |   6 +-
 .../gfac/monitor/email/EmailBasedMonitor.java   |   8 +-
 .../airavata/gfac/monitor/HPCMonitorID.java     |  12 +-
 .../handlers/GridPullMonitorHandler.java        |   6 +-
 .../monitor/impl/pull/qstat/HPCPullMonitor.java |  44 ++--
 .../impl/pull/qstat/ResourceConnection.java     |   4 +-
 .../monitor/impl/push/amqp/AMQPMonitor.java     |  10 +-
 .../airavata/gfac/monitor/util/CommonUtils.java |  20 +-
 .../ssh/handler/AdvancedSCPInputHandler.java    |   4 +-
 .../ssh/handler/AdvancedSCPOutputHandler.java   |   4 +-
 .../gfac/ssh/handler/NewSSHOutputHandler.java   |   2 +-
 .../ssh/handler/SSHDirectorySetupHandler.java   |   4 +-
 .../gfac/ssh/handler/SSHInputHandler.java       |   6 +-
 .../gfac/ssh/handler/SSHOutputHandler.java      |  14 +-
 .../gfac/ssh/provider/impl/SSHProvider.java     |  26 +--
 .../airavata/gfac/ssh/util/GFACSSHUtils.java    |   2 +-
 .../airavata/gfac/ssh/util/HandleOutputs.java   |   2 +-
 .../services/impl/BigRed2TestWithSSHAuth.java   |   4 +-
 .../impl/SSHProviderTestWithSSHAuth.java        |   2 +-
 .../airavata/integration/DataRetrievalIT.java   |   6 +-
 .../server/OrchestratorServerHandler.java       |  10 +-
 .../orchestrator/cpi/OrchestratorService.java   |  56 ++---
 .../core/model/ExperimentConfigurationData.java |   4 +-
 .../cpi/impl/SimpleOrchestratorImpl.java        |  14 +-
 .../orchestrator/core/NewOrchestratorTest.java  |   2 +-
 .../core/OrchestratorTestWithGRAM.java          |   2 +-
 .../orchestrator/core/ValidatorTest.java        |   6 +-
 .../orchestrator/core/util/SecondValidator.java |   2 +-
 .../orchestrator/core/util/TestValidator.java   |   4 +-
 .../registry/jpa/impl/ExperimentRegistry.java   |  54 ++---
 .../registry/jpa/impl/ProjectRegistry.java      |   6 +-
 .../registry/jpa/impl/RegistryImpl.java         |   6 +-
 .../registry/jpa/model/ErrorDetail.java         |   4 +-
 .../registry/jpa/model/ProjectUser.java         |   4 +-
 .../registry/jpa/model/ProjectUser_PK.java      |   4 +-
 .../jpa/resources/ErrorDetailResource.java      |   6 +-
 .../jpa/resources/ProjectUserResource.java      |   4 +-
 .../registry/jpa/resources/Utils.java           |   4 +-
 .../registry/jpa/resources/WorkerResource.java  |   2 +-
 .../jpa/utils/ThriftDataModelConversion.java    |  22 +-
 .../jpa/ExecutionErrorResourceTest.java         |   6 +-
 .../jpa/ExperimentDataResourceTest.java         |   2 +-
 .../jpa/ExperimentMetadataResourceTest.java     |   2 +-
 .../registry/jpa/GFacJobDataResourceTest.java   |   2 +-
 .../registry/jpa/GFacJobStatusResourceTest.java |   2 +-
 .../registry/jpa/GramDataResourceTest.java      |   2 +-
 .../registry/jpa/NodeDataResourceTest.java      |   2 +-
 .../jpa/OrchestratorDataResourceTest.java       |   2 +-
 .../registry/jpa/RegistryUseCaseTest.java       |  14 +-
 .../registry/jpa/WorkflowDataResourceTest.java  |   2 +-
 .../registry/cpi/CompositeIdentifier.java       |  21 +-
 .../ExperimentExecution.java                    |   6 +-
 .../engine/interpretor/WorkflowInterpreter.java |  36 ++--
 .../core/SimpleWorkflowInterpreter.java         |  16 +-
 .../WorkflowInterpretorEventListener.java       |  24 +--
 .../ui/experiment/LaunchApplicationWindow.java  |  16 +-
 .../WorkflowInterpreterLaunchWindow.java        |  20 +-
 .../xbaya/ui/monitor/MonitorEventHandler.java   |   6 +-
 .../airavata/api/samples/ExperimentSample.java  |   2 +-
 .../airavata/gsi/ssh/api/job/JobDescriptor.java |   9 +-
 .../gsi/ssh/api/job/PBSOutputParser.java        |   2 +-
 .../gsi/ssh/api/job/SlurmOutputParser.java      |   2 +-
 .../gsi/ssh/api/job/UGEOutputParser.java        |   2 +-
 121 files changed, 1432 insertions(+), 1519 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index fff3810..c905bcd 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -1430,11 +1430,11 @@ public class AiravataServerHandler implements Airavata.Iface {
                     List<Object> taskDetails = registry.get(RegistryModelType.TASK_DETAIL, Constants.FieldConstants.TaskDetailConstants.NODE_ID, nodeInstanceId);
                     if (taskDetails != null && !taskDetails.isEmpty()){
                         for (Object ts : taskDetails){
-                            String taskID = ((TaskDetails) ts).getTaskID();
+                            String taskID = ((TaskDetails) ts).getTaskId();
                             List<Object> jobDetails = registry.get(RegistryModelType.JOB_DETAIL, Constants.FieldConstants.JobDetaisConstants.TASK_ID, taskID);
                             if (jobDetails != null && !jobDetails.isEmpty()){
                                 for (Object job : jobDetails){
-                                    String jobID = ((JobDetails) job).getJobID();
+                                    String jobID = ((JobDetails) job).getJobId();
                                     jobStatus.put(jobID, ((JobDetails) job).getJobStatus());
                                 }
                             }
@@ -1468,7 +1468,7 @@ public class AiravataServerHandler implements Airavata.Iface {
                     List<Object> taskDetails = registry.get(RegistryModelType.TASK_DETAIL, Constants.FieldConstants.TaskDetailConstants.NODE_ID, nodeInstanceId);
                     if (taskDetails != null && !taskDetails.isEmpty()){
                         for (Object ts : taskDetails){
-                            String taskID = ((TaskDetails) ts).getTaskID();
+                            String taskID = ((TaskDetails) ts).getTaskId();
                             List<Object> jobDetails = registry.get(RegistryModelType.JOB_DETAIL, Constants.FieldConstants.JobDetaisConstants.TASK_ID, taskID);
                             if (jobDetails != null && !jobDetails.isEmpty()){
                                 for (Object job : jobDetails){
@@ -1505,7 +1505,7 @@ public class AiravataServerHandler implements Airavata.Iface {
                     List<Object> taskDetails = registry.get(RegistryModelType.TASK_DETAIL, Constants.FieldConstants.TaskDetailConstants.NODE_ID, nodeInstanceId);
                     if (taskDetails != null && !taskDetails.isEmpty()){
                         for (Object ts : taskDetails){
-                            String taskID = ((TaskDetails) ts).getTaskID();
+                            String taskID = ((TaskDetails) ts).getTaskId();
                             List<Object> dataTransferDetails = registry.get(RegistryModelType.DATA_TRANSFER_DETAIL, Constants.FieldConstants.JobDetaisConstants.TASK_ID, taskID);
                             if (dataTransferDetails != null && !dataTransferDetails.isEmpty()){
                                 for (Object dataTransfer : dataTransferDetails){

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
index dd7bcd0..1d4b577 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
@@ -23,11 +23,9 @@ package org.apache.airavata.api.server.listener;
 import com.google.common.eventbus.Subscribe;
 import org.apache.airavata.api.server.util.DataModelUtils;
 import org.apache.airavata.common.exception.AiravataException;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.*;
 import org.apache.airavata.common.utils.listener.AbstractActivityListener;
 import org.apache.airavata.messaging.core.MessageContext;
-import org.apache.airavata.messaging.core.MessageHandler;
 import org.apache.airavata.messaging.core.Publisher;
 import org.apache.airavata.messaging.core.impl.RabbitMQTaskLaunchConsumer;
 import org.apache.airavata.model.messaging.event.ExperimentStatusChangeEvent;
@@ -188,7 +186,7 @@ public class AiravataExperimentStatusUpdator implements AbstractActivityListener
     	Experiment details = (Experiment)airavataRegistry.get(RegistryModelType.EXPERIMENT, experimentId);
         if(details == null) {
             details = new Experiment();
-            details.setExperimentID(experimentId);
+            details.setExperimentId(experimentId);
         }
         org.apache.airavata.model.workspace.experiment.ExperimentStatus status = new org.apache.airavata.model.workspace.experiment.ExperimentStatus();
         status.setExperimentState(state);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/DataModelUtils.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/DataModelUtils.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/DataModelUtils.java
index 8af8956..d630572 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/DataModelUtils.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/DataModelUtils.java
@@ -48,8 +48,8 @@ public class DataModelUtils {
 				}
 			}
 		} catch (AppCatalogException e) {
-            logger.error("Error while retrieving execution type for experiment : " + experiment.getExperimentID(), e);
-            throw new Exception("Error while retrieving execution type for experiment : " + experiment.getExperimentID(), e);
+            logger.error("Error while retrieving execution type for experiment : " + experiment.getExperimentId(), e);
+            throw new Exception("Error while retrieving execution type for experiment : " + experiment.getExperimentId(), e);
 		}
 		return ExecutionType.UNKNOWN;
 	}

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/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 1094563..66be2f2 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
@@ -80,7 +80,7 @@ public class AiravataServerHandlerTest {
 
             //testing the update of a project
             Project updatedProject = new Project();
-            updatedProject.setProjectID(projectId1);
+            updatedProject.setProjectId(projectId1);
             updatedProject.setOwner("TestUser"+TAG);
             updatedProject.setName("UpdatedTestProject"+TAG);
             updatedProject.setDescription("This is an updated test project"+TAG);
@@ -88,7 +88,7 @@ public class AiravataServerHandlerTest {
 
             //testing project retrieval
             Project retrievedProject = airavataServerHandler.getProject(projectId1);
-            Assert.assertEquals(updatedProject.getProjectID(), retrievedProject.getProjectID());
+            Assert.assertEquals(updatedProject.getProjectId(), retrievedProject.getProjectId());
             Assert.assertEquals(updatedProject.getOwner(), retrievedProject.getOwner());
             Assert.assertEquals(updatedProject.getName(), retrievedProject.getName());
             Assert.assertEquals(updatedProject.getDescription(), retrievedProject.getDescription());
@@ -184,7 +184,7 @@ public class AiravataServerHandlerTest {
             ComputationalResourceScheduling scheduling = new ComputationalResourceScheduling();
             scheduling.setResourceHostId(UUID.randomUUID().toString());
             scheduling.setComputationalProjectAccount("TG-STA110014S");
-            scheduling.setTotalCPUCount(1);
+            scheduling.setTotalCpuCount(1);
             scheduling.setNodeCount(1);
             scheduling.setWallTimeLimit(15);
             scheduling.setQueueName("normal");
@@ -195,7 +195,7 @@ public class AiravataServerHandlerTest {
             userConfigurationData.setComputationalResourceScheduling(scheduling);
 
             Experiment experiment = new Experiment();
-            experiment.setProjectID(projectId1);
+            experiment.setProjectId(projectId1);
             experiment.setUserName("TestUser" + TAG);
             experiment.setName("TestExperiment"+TAG);
             experiment.setDescription("experiment");
@@ -209,7 +209,7 @@ public class AiravataServerHandlerTest {
             //retrieving the stored experiment
             Experiment retrievedExperiment = airavataServerHandler.getExperiment(experimentId1);
             Assert.assertNotNull(retrievedExperiment);
-            Assert.assertEquals(retrievedExperiment.getProjectID(), experiment.getProjectID());
+            Assert.assertEquals(retrievedExperiment.getProjectId(), experiment.getProjectId());
             Assert.assertEquals(retrievedExperiment.getDescription(), experiment.getDescription());
             Assert.assertEquals(retrievedExperiment.getName(), experiment.getName());
             Assert.assertEquals(retrievedExperiment.getApplicationId(), experiment.getApplicationId());
@@ -226,7 +226,7 @@ public class AiravataServerHandlerTest {
 
             //creating more experiments
             experiment = new Experiment();
-            experiment.setProjectID(projectId1);
+            experiment.setProjectId(projectId1);
             experiment.setUserName("TestUser" + TAG);
             experiment.setName("TestExperiment2" + TAG);
             experiment.setDescription("experiment");
@@ -238,7 +238,7 @@ public class AiravataServerHandlerTest {
             Assert.assertNotNull(experimentId2);
 
             experiment = new Experiment();
-            experiment.setProjectID(projectId1);
+            experiment.setProjectId(projectId1);
             experiment.setUserName("TestUser" + TAG);
             experiment.setName("TestExperiment3"+TAG);
             experiment.setDescription("experiment");

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.cpp
index 34e4aa6..46a68d8 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.cpp
@@ -752,8 +752,8 @@ uint32_t ComputationalResourceScheduling::read(::apache::thrift::protocol::TProt
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          xfer += iprot->readI32(this->totalCPUCount);
-          this->__isset.totalCPUCount = true;
+          xfer += iprot->readI32(this->totalCpuCount);
+          this->__isset.totalCpuCount = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -843,9 +843,9 @@ uint32_t ComputationalResourceScheduling::write(::apache::thrift::protocol::TPro
     xfer += oprot->writeString(this->resourceHostId);
     xfer += oprot->writeFieldEnd();
   }
-  if (this->__isset.totalCPUCount) {
-    xfer += oprot->writeFieldBegin("totalCPUCount", ::apache::thrift::protocol::T_I32, 2);
-    xfer += oprot->writeI32(this->totalCPUCount);
+  if (this->__isset.totalCpuCount) {
+    xfer += oprot->writeFieldBegin("totalCpuCount", ::apache::thrift::protocol::T_I32, 2);
+    xfer += oprot->writeI32(this->totalCpuCount);
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.nodeCount) {
@@ -896,7 +896,7 @@ uint32_t ComputationalResourceScheduling::write(::apache::thrift::protocol::TPro
 void swap(ComputationalResourceScheduling &a, ComputationalResourceScheduling &b) {
   using ::std::swap;
   swap(a.resourceHostId, b.resourceHostId);
-  swap(a.totalCPUCount, b.totalCPUCount);
+  swap(a.totalCpuCount, b.totalCpuCount);
   swap(a.nodeCount, b.nodeCount);
   swap(a.numberOfThreads, b.numberOfThreads);
   swap(a.queueName, b.queueName);
@@ -1286,8 +1286,8 @@ uint32_t UserConfigurationData::read(::apache::thrift::protocol::TProtocol* ipro
         break;
       case 9:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->userDN);
-          this->__isset.userDN = true;
+          xfer += iprot->readString(this->userDn);
+          this->__isset.userDn = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -1358,9 +1358,9 @@ uint32_t UserConfigurationData::write(::apache::thrift::protocol::TProtocol* opr
     xfer += oprot->writeBool(this->throttleResources);
     xfer += oprot->writeFieldEnd();
   }
-  if (this->__isset.userDN) {
-    xfer += oprot->writeFieldBegin("userDN", ::apache::thrift::protocol::T_STRING, 9);
-    xfer += oprot->writeString(this->userDN);
+  if (this->__isset.userDn) {
+    xfer += oprot->writeFieldBegin("userDn", ::apache::thrift::protocol::T_STRING, 9);
+    xfer += oprot->writeString(this->userDn);
     xfer += oprot->writeFieldEnd();
   }
   if (this->__isset.generateCert) {
@@ -1383,7 +1383,7 @@ void swap(UserConfigurationData &a, UserConfigurationData &b) {
   swap(a.advanceOutputDataHandling, b.advanceOutputDataHandling);
   swap(a.qosParams, b.qosParams);
   swap(a.throttleResources, b.throttleResources);
-  swap(a.userDN, b.userDN);
+  swap(a.userDn, b.userDn);
   swap(a.generateCert, b.generateCert);
   swap(a.__isset, b.__isset);
 }
@@ -1402,7 +1402,7 @@ uint32_t ErrorDetails::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   using ::apache::thrift::protocol::TProtocolException;
 
-  bool isset_errorID = false;
+  bool isset_errorId = false;
 
   while (true)
   {
@@ -1414,8 +1414,8 @@ uint32_t ErrorDetails::read(::apache::thrift::protocol::TProtocol* iprot) {
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->errorID);
-          isset_errorID = true;
+          xfer += iprot->readString(this->errorId);
+          isset_errorId = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -1511,7 +1511,7 @@ uint32_t ErrorDetails::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   xfer += iprot->readStructEnd();
 
-  if (!isset_errorID)
+  if (!isset_errorId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
 }
@@ -1520,8 +1520,8 @@ uint32_t ErrorDetails::write(::apache::thrift::protocol::TProtocol* oprot) const
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("ErrorDetails");
 
-  xfer += oprot->writeFieldBegin("errorID", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString(this->errorID);
+  xfer += oprot->writeFieldBegin("errorId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->errorId);
   xfer += oprot->writeFieldEnd();
 
   if (this->__isset.creationTime) {
@@ -1579,7 +1579,7 @@ uint32_t ErrorDetails::write(::apache::thrift::protocol::TProtocol* oprot) const
 
 void swap(ErrorDetails &a, ErrorDetails &b) {
   using ::std::swap;
-  swap(a.errorID, b.errorID);
+  swap(a.errorId, b.errorId);
   swap(a.creationTime, b.creationTime);
   swap(a.actualErrorMessage, b.actualErrorMessage);
   swap(a.userFriendlyMessage, b.userFriendlyMessage);
@@ -1605,7 +1605,7 @@ uint32_t JobDetails::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   using ::apache::thrift::protocol::TProtocolException;
 
-  bool isset_jobID = false;
+  bool isset_jobId = false;
   bool isset_jobDescription = false;
 
   while (true)
@@ -1618,8 +1618,8 @@ uint32_t JobDetails::read(::apache::thrift::protocol::TProtocol* iprot) {
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->jobID);
-          isset_jobID = true;
+          xfer += iprot->readString(this->jobId);
+          isset_jobId = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -1709,7 +1709,7 @@ uint32_t JobDetails::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   xfer += iprot->readStructEnd();
 
-  if (!isset_jobID)
+  if (!isset_jobId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_jobDescription)
     throw TProtocolException(TProtocolException::INVALID_DATA);
@@ -1720,8 +1720,8 @@ uint32_t JobDetails::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("JobDetails");
 
-  xfer += oprot->writeFieldBegin("jobID", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString(this->jobID);
+  xfer += oprot->writeFieldBegin("jobId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->jobId);
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldBegin("jobDescription", ::apache::thrift::protocol::T_STRING, 2);
@@ -1778,7 +1778,7 @@ uint32_t JobDetails::write(::apache::thrift::protocol::TProtocol* oprot) const {
 
 void swap(JobDetails &a, JobDetails &b) {
   using ::std::swap;
-  swap(a.jobID, b.jobID);
+  swap(a.jobId, b.jobId);
   swap(a.jobDescription, b.jobDescription);
   swap(a.creationTime, b.creationTime);
   swap(a.jobStatus, b.jobStatus);
@@ -1804,7 +1804,7 @@ uint32_t DataTransferDetails::read(::apache::thrift::protocol::TProtocol* iprot)
 
   using ::apache::thrift::protocol::TProtocolException;
 
-  bool isset_transferID = false;
+  bool isset_transferId = false;
   bool isset_transferDescription = false;
 
   while (true)
@@ -1817,8 +1817,8 @@ uint32_t DataTransferDetails::read(::apache::thrift::protocol::TProtocol* iprot)
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->transferID);
-          isset_transferID = true;
+          xfer += iprot->readString(this->transferId);
+          isset_transferId = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -1856,7 +1856,7 @@ uint32_t DataTransferDetails::read(::apache::thrift::protocol::TProtocol* iprot)
 
   xfer += iprot->readStructEnd();
 
-  if (!isset_transferID)
+  if (!isset_transferId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_transferDescription)
     throw TProtocolException(TProtocolException::INVALID_DATA);
@@ -1867,8 +1867,8 @@ uint32_t DataTransferDetails::write(::apache::thrift::protocol::TProtocol* oprot
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("DataTransferDetails");
 
-  xfer += oprot->writeFieldBegin("transferID", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString(this->transferID);
+  xfer += oprot->writeFieldBegin("transferId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->transferId);
   xfer += oprot->writeFieldEnd();
 
   if (this->__isset.creationTime) {
@@ -1892,7 +1892,7 @@ uint32_t DataTransferDetails::write(::apache::thrift::protocol::TProtocol* oprot
 
 void swap(DataTransferDetails &a, DataTransferDetails &b) {
   using ::std::swap;
-  swap(a.transferID, b.transferID);
+  swap(a.transferId, b.transferId);
   swap(a.creationTime, b.creationTime);
   swap(a.transferDescription, b.transferDescription);
   swap(a.transferStatus, b.transferStatus);
@@ -1913,7 +1913,7 @@ uint32_t TaskDetails::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   using ::apache::thrift::protocol::TProtocolException;
 
-  bool isset_taskID = false;
+  bool isset_taskId = false;
 
   while (true)
   {
@@ -1925,8 +1925,8 @@ uint32_t TaskDetails::read(::apache::thrift::protocol::TProtocol* iprot) {
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->taskID);
-          isset_taskID = true;
+          xfer += iprot->readString(this->taskId);
+          isset_taskId = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -2132,7 +2132,7 @@ uint32_t TaskDetails::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   xfer += iprot->readStructEnd();
 
-  if (!isset_taskID)
+  if (!isset_taskId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
 }
@@ -2141,8 +2141,8 @@ uint32_t TaskDetails::write(::apache::thrift::protocol::TProtocol* oprot) const
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("TaskDetails");
 
-  xfer += oprot->writeFieldBegin("taskID", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString(this->taskID);
+  xfer += oprot->writeFieldBegin("taskId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->taskId);
   xfer += oprot->writeFieldEnd();
 
   if (this->__isset.creationTime) {
@@ -2275,7 +2275,7 @@ uint32_t TaskDetails::write(::apache::thrift::protocol::TProtocol* oprot) const
 
 void swap(TaskDetails &a, TaskDetails &b) {
   using ::std::swap;
-  swap(a.taskID, b.taskID);
+  swap(a.taskId, b.taskId);
   swap(a.creationTime, b.creationTime);
   swap(a.applicationId, b.applicationId);
   swap(a.applicationVersion, b.applicationVersion);
@@ -2764,8 +2764,8 @@ uint32_t Experiment::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   using ::apache::thrift::protocol::TProtocolException;
 
-  bool isset_experimentID = false;
-  bool isset_projectID = false;
+  bool isset_experimentId = false;
+  bool isset_projectId = false;
   bool isset_userName = false;
   bool isset_name = false;
 
@@ -2779,16 +2779,16 @@ uint32_t Experiment::read(::apache::thrift::protocol::TProtocol* iprot) {
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->experimentID);
-          isset_experimentID = true;
+          xfer += iprot->readString(this->experimentId);
+          isset_experimentId = true;
         } else {
           xfer += iprot->skip(ftype);
         }
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->projectID);
-          isset_projectID = true;
+          xfer += iprot->readString(this->projectId);
+          isset_projectId = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -3026,9 +3026,9 @@ uint32_t Experiment::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   xfer += iprot->readStructEnd();
 
-  if (!isset_experimentID)
+  if (!isset_experimentId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
-  if (!isset_projectID)
+  if (!isset_projectId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_userName)
     throw TProtocolException(TProtocolException::INVALID_DATA);
@@ -3041,12 +3041,12 @@ uint32_t Experiment::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Experiment");
 
-  xfer += oprot->writeFieldBegin("experimentID", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString(this->experimentID);
+  xfer += oprot->writeFieldBegin("experimentId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->experimentId);
   xfer += oprot->writeFieldEnd();
 
-  xfer += oprot->writeFieldBegin("projectID", ::apache::thrift::protocol::T_STRING, 2);
-  xfer += oprot->writeString(this->projectID);
+  xfer += oprot->writeFieldBegin("projectId", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->projectId);
   xfer += oprot->writeFieldEnd();
 
   if (this->__isset.creationTime) {
@@ -3197,8 +3197,8 @@ uint32_t Experiment::write(::apache::thrift::protocol::TProtocol* oprot) const {
 
 void swap(Experiment &a, Experiment &b) {
   using ::std::swap;
-  swap(a.experimentID, b.experimentID);
-  swap(a.projectID, b.projectID);
+  swap(a.experimentId, b.experimentId);
+  swap(a.projectId, b.projectId);
   swap(a.creationTime, b.creationTime);
   swap(a.userName, b.userName);
   swap(a.name, b.name);
@@ -3235,8 +3235,8 @@ uint32_t ExperimentSummary::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   using ::apache::thrift::protocol::TProtocolException;
 
-  bool isset_experimentID = false;
-  bool isset_projectID = false;
+  bool isset_experimentId = false;
+  bool isset_projectId = false;
   bool isset_userName = false;
   bool isset_name = false;
 
@@ -3250,16 +3250,16 @@ uint32_t ExperimentSummary::read(::apache::thrift::protocol::TProtocol* iprot) {
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->experimentID);
-          isset_experimentID = true;
+          xfer += iprot->readString(this->experimentId);
+          isset_experimentId = true;
         } else {
           xfer += iprot->skip(ftype);
         }
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->projectID);
-          isset_projectID = true;
+          xfer += iprot->readString(this->projectId);
+          isset_projectId = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -3341,9 +3341,9 @@ uint32_t ExperimentSummary::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   xfer += iprot->readStructEnd();
 
-  if (!isset_experimentID)
+  if (!isset_experimentId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
-  if (!isset_projectID)
+  if (!isset_projectId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_userName)
     throw TProtocolException(TProtocolException::INVALID_DATA);
@@ -3356,12 +3356,12 @@ uint32_t ExperimentSummary::write(::apache::thrift::protocol::TProtocol* oprot)
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("ExperimentSummary");
 
-  xfer += oprot->writeFieldBegin("experimentID", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString(this->experimentID);
+  xfer += oprot->writeFieldBegin("experimentId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->experimentId);
   xfer += oprot->writeFieldEnd();
 
-  xfer += oprot->writeFieldBegin("projectID", ::apache::thrift::protocol::T_STRING, 2);
-  xfer += oprot->writeString(this->projectID);
+  xfer += oprot->writeFieldBegin("projectId", ::apache::thrift::protocol::T_STRING, 2);
+  xfer += oprot->writeString(this->projectId);
   xfer += oprot->writeFieldEnd();
 
   if (this->__isset.creationTime) {
@@ -3412,8 +3412,8 @@ uint32_t ExperimentSummary::write(::apache::thrift::protocol::TProtocol* oprot)
 
 void swap(ExperimentSummary &a, ExperimentSummary &b) {
   using ::std::swap;
-  swap(a.experimentID, b.experimentID);
-  swap(a.projectID, b.projectID);
+  swap(a.experimentId, b.experimentId);
+  swap(a.projectId, b.projectId);
   swap(a.creationTime, b.creationTime);
   swap(a.userName, b.userName);
   swap(a.name, b.name);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.h
index 3f7f2b7..36c5f92 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experimentModel_types.h
@@ -495,9 +495,9 @@ class ApplicationStatus {
 void swap(ApplicationStatus &a, ApplicationStatus &b);
 
 typedef struct _ComputationalResourceScheduling__isset {
-  _ComputationalResourceScheduling__isset() : resourceHostId(false), totalCPUCount(false), nodeCount(false), numberOfThreads(false), queueName(false), wallTimeLimit(false), jobStartTime(false), totalPhysicalMemory(false), computationalProjectAccount(false), chassisName(false) {}
+  _ComputationalResourceScheduling__isset() : resourceHostId(false), totalCpuCount(false), nodeCount(false), numberOfThreads(false), queueName(false), wallTimeLimit(false), jobStartTime(false), totalPhysicalMemory(false), computationalProjectAccount(false), chassisName(false) {}
   bool resourceHostId;
-  bool totalCPUCount;
+  bool totalCpuCount;
   bool nodeCount;
   bool numberOfThreads;
   bool queueName;
@@ -514,13 +514,13 @@ class ComputationalResourceScheduling {
   static const char* ascii_fingerprint; // = "F43E914A611D39345BCC729678C1C696";
   static const uint8_t binary_fingerprint[16]; // = {0xF4,0x3E,0x91,0x4A,0x61,0x1D,0x39,0x34,0x5B,0xCC,0x72,0x96,0x78,0xC1,0xC6,0x96};
 
-  ComputationalResourceScheduling() : resourceHostId(), totalCPUCount(0), nodeCount(0), numberOfThreads(0), queueName(), wallTimeLimit(0), jobStartTime(0), totalPhysicalMemory(0), computationalProjectAccount(), chassisName() {
+  ComputationalResourceScheduling() : resourceHostId(), totalCpuCount(0), nodeCount(0), numberOfThreads(0), queueName(), wallTimeLimit(0), jobStartTime(0), totalPhysicalMemory(0), computationalProjectAccount(), chassisName() {
   }
 
   virtual ~ComputationalResourceScheduling() throw() {}
 
   std::string resourceHostId;
-  int32_t totalCPUCount;
+  int32_t totalCpuCount;
   int32_t nodeCount;
   int32_t numberOfThreads;
   std::string queueName;
@@ -537,9 +537,9 @@ class ComputationalResourceScheduling {
     __isset.resourceHostId = true;
   }
 
-  void __set_totalCPUCount(const int32_t val) {
-    totalCPUCount = val;
-    __isset.totalCPUCount = true;
+  void __set_totalCpuCount(const int32_t val) {
+    totalCpuCount = val;
+    __isset.totalCpuCount = true;
   }
 
   void __set_nodeCount(const int32_t val) {
@@ -588,9 +588,9 @@ class ComputationalResourceScheduling {
       return false;
     else if (__isset.resourceHostId && !(resourceHostId == rhs.resourceHostId))
       return false;
-    if (__isset.totalCPUCount != rhs.__isset.totalCPUCount)
+    if (__isset.totalCpuCount != rhs.__isset.totalCpuCount)
       return false;
-    else if (__isset.totalCPUCount && !(totalCPUCount == rhs.totalCPUCount))
+    else if (__isset.totalCpuCount && !(totalCpuCount == rhs.totalCpuCount))
       return false;
     if (__isset.nodeCount != rhs.__isset.nodeCount)
       return false;
@@ -855,14 +855,14 @@ class QualityOfServiceParams {
 void swap(QualityOfServiceParams &a, QualityOfServiceParams &b);
 
 typedef struct _UserConfigurationData__isset {
-  _UserConfigurationData__isset() : shareExperimentPublicly(true), computationalResourceScheduling(false), advanceInputDataHandling(false), advanceOutputDataHandling(false), qosParams(false), throttleResources(true), userDN(false), generateCert(true) {}
+  _UserConfigurationData__isset() : shareExperimentPublicly(true), computationalResourceScheduling(false), advanceInputDataHandling(false), advanceOutputDataHandling(false), qosParams(false), throttleResources(true), userDn(false), generateCert(true) {}
   bool shareExperimentPublicly;
   bool computationalResourceScheduling;
   bool advanceInputDataHandling;
   bool advanceOutputDataHandling;
   bool qosParams;
   bool throttleResources;
-  bool userDN;
+  bool userDn;
   bool generateCert;
 } _UserConfigurationData__isset;
 
@@ -872,7 +872,7 @@ class UserConfigurationData {
   static const char* ascii_fingerprint; // = "0EA9FCA690C445780E02BCAC89B1D820";
   static const uint8_t binary_fingerprint[16]; // = {0x0E,0xA9,0xFC,0xA6,0x90,0xC4,0x45,0x78,0x0E,0x02,0xBC,0xAC,0x89,0xB1,0xD8,0x20};
 
-  UserConfigurationData() : airavataAutoSchedule(false), overrideManualScheduledParams(false), shareExperimentPublicly(false), throttleResources(false), userDN(), generateCert(false) {
+  UserConfigurationData() : airavataAutoSchedule(false), overrideManualScheduledParams(false), shareExperimentPublicly(false), throttleResources(false), userDn(), generateCert(false) {
   }
 
   virtual ~UserConfigurationData() throw() {}
@@ -885,7 +885,7 @@ class UserConfigurationData {
   AdvancedOutputDataHandling advanceOutputDataHandling;
   QualityOfServiceParams qosParams;
   bool throttleResources;
-  std::string userDN;
+  std::string userDn;
   bool generateCert;
 
   _UserConfigurationData__isset __isset;
@@ -928,9 +928,9 @@ class UserConfigurationData {
     __isset.throttleResources = true;
   }
 
-  void __set_userDN(const std::string& val) {
-    userDN = val;
-    __isset.userDN = true;
+  void __set_userDn(const std::string& val) {
+    userDn = val;
+    __isset.userDn = true;
   }
 
   void __set_generateCert(const bool val) {
@@ -968,9 +968,9 @@ class UserConfigurationData {
       return false;
     else if (__isset.throttleResources && !(throttleResources == rhs.throttleResources))
       return false;
-    if (__isset.userDN != rhs.__isset.userDN)
+    if (__isset.userDn != rhs.__isset.userDn)
       return false;
-    else if (__isset.userDN && !(userDN == rhs.userDN))
+    else if (__isset.userDn && !(userDn == rhs.userDn))
       return false;
     if (__isset.generateCert != rhs.__isset.generateCert)
       return false;
@@ -1009,12 +1009,12 @@ class ErrorDetails {
   static const char* ascii_fingerprint; // = "170CA6E79EB283F31417B9D68071DA33";
   static const uint8_t binary_fingerprint[16]; // = {0x17,0x0C,0xA6,0xE7,0x9E,0xB2,0x83,0xF3,0x14,0x17,0xB9,0xD6,0x80,0x71,0xDA,0x33};
 
-  ErrorDetails() : errorID("DO_NOT_SET_AT_CLIENTS"), creationTime(0), actualErrorMessage(), userFriendlyMessage(), errorCategory((ErrorCategory::type)0), transientOrPersistent(false), correctiveAction((CorrectiveAction::type)0), actionableGroup((ActionableGroup::type)0) {
+  ErrorDetails() : errorId("DO_NOT_SET_AT_CLIENTS"), creationTime(0), actualErrorMessage(), userFriendlyMessage(), errorCategory((ErrorCategory::type)0), transientOrPersistent(false), correctiveAction((CorrectiveAction::type)0), actionableGroup((ActionableGroup::type)0) {
   }
 
   virtual ~ErrorDetails() throw() {}
 
-  std::string errorID;
+  std::string errorId;
   int64_t creationTime;
   std::string actualErrorMessage;
   std::string userFriendlyMessage;
@@ -1026,8 +1026,8 @@ class ErrorDetails {
 
   _ErrorDetails__isset __isset;
 
-  void __set_errorID(const std::string& val) {
-    errorID = val;
+  void __set_errorId(const std::string& val) {
+    errorId = val;
   }
 
   void __set_creationTime(const int64_t val) {
@@ -1072,7 +1072,7 @@ class ErrorDetails {
 
   bool operator == (const ErrorDetails & rhs) const
   {
-    if (!(errorID == rhs.errorID))
+    if (!(errorId == rhs.errorId))
       return false;
     if (__isset.creationTime != rhs.__isset.creationTime)
       return false;
@@ -1138,12 +1138,12 @@ class JobDetails {
   static const char* ascii_fingerprint; // = "114EFEA8CA07DC82CC947D9F47547394";
   static const uint8_t binary_fingerprint[16]; // = {0x11,0x4E,0xFE,0xA8,0xCA,0x07,0xDC,0x82,0xCC,0x94,0x7D,0x9F,0x47,0x54,0x73,0x94};
 
-  JobDetails() : jobID("DO_NOT_SET_AT_CLIENTS"), jobDescription(), creationTime(0), computeResourceConsumed(), jobName(), workingDir() {
+  JobDetails() : jobId("DO_NOT_SET_AT_CLIENTS"), jobDescription(), creationTime(0), computeResourceConsumed(), jobName(), workingDir() {
   }
 
   virtual ~JobDetails() throw() {}
 
-  std::string jobID;
+  std::string jobId;
   std::string jobDescription;
   int64_t creationTime;
   JobStatus jobStatus;
@@ -1155,8 +1155,8 @@ class JobDetails {
 
   _JobDetails__isset __isset;
 
-  void __set_jobID(const std::string& val) {
-    jobID = val;
+  void __set_jobId(const std::string& val) {
+    jobId = val;
   }
 
   void __set_jobDescription(const std::string& val) {
@@ -1200,7 +1200,7 @@ class JobDetails {
 
   bool operator == (const JobDetails & rhs) const
   {
-    if (!(jobID == rhs.jobID))
+    if (!(jobId == rhs.jobId))
       return false;
     if (!(jobDescription == rhs.jobDescription))
       return false;
@@ -1259,20 +1259,20 @@ class DataTransferDetails {
   static const char* ascii_fingerprint; // = "40D4FEC20E3B334AEEBA92DA2AB9E91E";
   static const uint8_t binary_fingerprint[16]; // = {0x40,0xD4,0xFE,0xC2,0x0E,0x3B,0x33,0x4A,0xEE,0xBA,0x92,0xDA,0x2A,0xB9,0xE9,0x1E};
 
-  DataTransferDetails() : transferID("DO_NOT_SET_AT_CLIENTS"), creationTime(0), transferDescription() {
+  DataTransferDetails() : transferId("DO_NOT_SET_AT_CLIENTS"), creationTime(0), transferDescription() {
   }
 
   virtual ~DataTransferDetails() throw() {}
 
-  std::string transferID;
+  std::string transferId;
   int64_t creationTime;
   std::string transferDescription;
   TransferStatus transferStatus;
 
   _DataTransferDetails__isset __isset;
 
-  void __set_transferID(const std::string& val) {
-    transferID = val;
+  void __set_transferId(const std::string& val) {
+    transferId = val;
   }
 
   void __set_creationTime(const int64_t val) {
@@ -1291,7 +1291,7 @@ class DataTransferDetails {
 
   bool operator == (const DataTransferDetails & rhs) const
   {
-    if (!(transferID == rhs.transferID))
+    if (!(transferId == rhs.transferId))
       return false;
     if (__isset.creationTime != rhs.__isset.creationTime)
       return false;
@@ -1343,12 +1343,12 @@ class TaskDetails {
   static const char* ascii_fingerprint; // = "B7529305C4CBCDA0A164DA14865F0E67";
   static const uint8_t binary_fingerprint[16]; // = {0xB7,0x52,0x93,0x05,0xC4,0xCB,0xCD,0xA0,0xA1,0x64,0xDA,0x14,0x86,0x5F,0x0E,0x67};
 
-  TaskDetails() : taskID("DO_NOT_SET_AT_CLIENTS"), creationTime(0), applicationId(), applicationVersion(), applicationDeploymentId(), enableEmailNotification(0) {
+  TaskDetails() : taskId("DO_NOT_SET_AT_CLIENTS"), creationTime(0), applicationId(), applicationVersion(), applicationDeploymentId(), enableEmailNotification(0) {
   }
 
   virtual ~TaskDetails() throw() {}
 
-  std::string taskID;
+  std::string taskId;
   int64_t creationTime;
   std::string applicationId;
   std::string applicationVersion;
@@ -1367,8 +1367,8 @@ class TaskDetails {
 
   _TaskDetails__isset __isset;
 
-  void __set_taskID(const std::string& val) {
-    taskID = val;
+  void __set_taskId(const std::string& val) {
+    taskId = val;
   }
 
   void __set_creationTime(const int64_t val) {
@@ -1448,7 +1448,7 @@ class TaskDetails {
 
   bool operator == (const TaskDetails & rhs) const
   {
-    if (!(taskID == rhs.taskID))
+    if (!(taskId == rhs.taskId))
       return false;
     if (__isset.creationTime != rhs.__isset.creationTime)
       return false;
@@ -1784,13 +1784,13 @@ class Experiment {
   static const char* ascii_fingerprint; // = "2826868ECEA08F4F71C71DEAD5A3270F";
   static const uint8_t binary_fingerprint[16]; // = {0x28,0x26,0x86,0x8E,0xCE,0xA0,0x8F,0x4F,0x71,0xC7,0x1D,0xEA,0xD5,0xA3,0x27,0x0F};
 
-  Experiment() : experimentID("DO_NOT_SET_AT_CLIENTS"), projectID("DEFAULT"), creationTime(0), userName(), name(), description(), applicationId(), applicationVersion(), workflowTemplateId(), workflowTemplateVersion(), gatewayExecutionId(), enableEmailNotification(0), workflowExecutionInstanceId() {
+  Experiment() : experimentId("DO_NOT_SET_AT_CLIENTS"), projectId("DEFAULT"), creationTime(0), userName(), name(), description(), applicationId(), applicationVersion(), workflowTemplateId(), workflowTemplateVersion(), gatewayExecutionId(), enableEmailNotification(0), workflowExecutionInstanceId() {
   }
 
   virtual ~Experiment() throw() {}
 
-  std::string experimentID;
-  std::string projectID;
+  std::string experimentId;
+  std::string projectId;
   int64_t creationTime;
   std::string userName;
   std::string name;
@@ -1813,12 +1813,12 @@ class Experiment {
 
   _Experiment__isset __isset;
 
-  void __set_experimentID(const std::string& val) {
-    experimentID = val;
+  void __set_experimentId(const std::string& val) {
+    experimentId = val;
   }
 
-  void __set_projectID(const std::string& val) {
-    projectID = val;
+  void __set_projectId(const std::string& val) {
+    projectId = val;
   }
 
   void __set_creationTime(const int64_t val) {
@@ -1916,9 +1916,9 @@ class Experiment {
 
   bool operator == (const Experiment & rhs) const
   {
-    if (!(experimentID == rhs.experimentID))
+    if (!(experimentId == rhs.experimentId))
       return false;
-    if (!(projectID == rhs.projectID))
+    if (!(projectId == rhs.projectId))
       return false;
     if (__isset.creationTime != rhs.__isset.creationTime)
       return false;
@@ -2022,13 +2022,13 @@ class ExperimentSummary {
   static const char* ascii_fingerprint; // = "44FD485ABF32F5EB94D6F393F51241B6";
   static const uint8_t binary_fingerprint[16]; // = {0x44,0xFD,0x48,0x5A,0xBF,0x32,0xF5,0xEB,0x94,0xD6,0xF3,0x93,0xF5,0x12,0x41,0xB6};
 
-  ExperimentSummary() : experimentID(), projectID(), creationTime(0), userName(), name(), description(), applicationId() {
+  ExperimentSummary() : experimentId(), projectId(), creationTime(0), userName(), name(), description(), applicationId() {
   }
 
   virtual ~ExperimentSummary() throw() {}
 
-  std::string experimentID;
-  std::string projectID;
+  std::string experimentId;
+  std::string projectId;
   int64_t creationTime;
   std::string userName;
   std::string name;
@@ -2039,12 +2039,12 @@ class ExperimentSummary {
 
   _ExperimentSummary__isset __isset;
 
-  void __set_experimentID(const std::string& val) {
-    experimentID = val;
+  void __set_experimentId(const std::string& val) {
+    experimentId = val;
   }
 
-  void __set_projectID(const std::string& val) {
-    projectID = val;
+  void __set_projectId(const std::string& val) {
+    projectId = val;
   }
 
   void __set_creationTime(const int64_t val) {
@@ -2082,9 +2082,9 @@ class ExperimentSummary {
 
   bool operator == (const ExperimentSummary & rhs) const
   {
-    if (!(experimentID == rhs.experimentID))
+    if (!(experimentId == rhs.experimentId))
       return false;
-    if (!(projectID == rhs.projectID))
+    if (!(projectId == rhs.projectId))
       return false;
     if (__isset.creationTime != rhs.__isset.creationTime)
       return false;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.cpp
index 311ea63..c3f8fb8 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.cpp
@@ -120,7 +120,7 @@ uint32_t Project::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   using ::apache::thrift::protocol::TProtocolException;
 
-  bool isset_projectID = false;
+  bool isset_projectId = false;
   bool isset_owner = false;
   bool isset_name = false;
 
@@ -134,8 +134,8 @@ uint32_t Project::read(::apache::thrift::protocol::TProtocol* iprot) {
     {
       case 1:
         if (ftype == ::apache::thrift::protocol::T_STRING) {
-          xfer += iprot->readString(this->projectID);
-          isset_projectID = true;
+          xfer += iprot->readString(this->projectId);
+          isset_projectId = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -221,7 +221,7 @@ uint32_t Project::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   xfer += iprot->readStructEnd();
 
-  if (!isset_projectID)
+  if (!isset_projectId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_owner)
     throw TProtocolException(TProtocolException::INVALID_DATA);
@@ -234,8 +234,8 @@ uint32_t Project::write(::apache::thrift::protocol::TProtocol* oprot) const {
   uint32_t xfer = 0;
   xfer += oprot->writeStructBegin("Project");
 
-  xfer += oprot->writeFieldBegin("projectID", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString(this->projectID);
+  xfer += oprot->writeFieldBegin("projectId", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->projectId);
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldBegin("owner", ::apache::thrift::protocol::T_STRING, 2);
@@ -289,7 +289,7 @@ uint32_t Project::write(::apache::thrift::protocol::TProtocol* oprot) const {
 
 void swap(Project &a, Project &b) {
   using ::std::swap;
-  swap(a.projectID, b.projectID);
+  swap(a.projectId, b.projectId);
   swap(a.owner, b.owner);
   swap(a.name, b.name);
   swap(a.description, b.description);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.h
index 41593a6..cc88b42 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspaceModel_types.h
@@ -102,12 +102,12 @@ class Project {
   static const char* ascii_fingerprint; // = "AFD8090DE564134035942D450F918628";
   static const uint8_t binary_fingerprint[16]; // = {0xAF,0xD8,0x09,0x0D,0xE5,0x64,0x13,0x40,0x35,0x94,0x2D,0x45,0x0F,0x91,0x86,0x28};
 
-  Project() : projectID("DEFAULT"), owner(), name(), description(), creationTime(0) {
+  Project() : projectId("DEFAULT"), owner(), name(), description(), creationTime(0) {
   }
 
   virtual ~Project() throw() {}
 
-  std::string projectID;
+  std::string projectId;
   std::string owner;
   std::string name;
   std::string description;
@@ -117,8 +117,8 @@ class Project {
 
   _Project__isset __isset;
 
-  void __set_projectID(const std::string& val) {
-    projectID = val;
+  void __set_projectId(const std::string& val) {
+    projectId = val;
   }
 
   void __set_owner(const std::string& val) {
@@ -151,7 +151,7 @@ class Project {
 
   bool operator == (const Project & rhs) const
   {
-    if (!(projectID == rhs.projectID))
+    if (!(projectId == rhs.projectId))
       return false;
     if (!(owner == rhs.owner))
       return false;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Experiment/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Experiment/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Experiment/Types.php
index 753dc13..0b1459b 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Experiment/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Experiment/Types.php
@@ -772,7 +772,7 @@ class ComputationalResourceScheduling {
   static $_TSPEC;
 
   public $resourceHostId = null;
-  public $totalCPUCount = null;
+  public $totalCpuCount = null;
   public $nodeCount = null;
   public $numberOfThreads = null;
   public $queueName = null;
@@ -790,7 +790,7 @@ class ComputationalResourceScheduling {
           'type' => TType::STRING,
           ),
         2 => array(
-          'var' => 'totalCPUCount',
+          'var' => 'totalCpuCount',
           'type' => TType::I32,
           ),
         3 => array(
@@ -831,8 +831,8 @@ class ComputationalResourceScheduling {
       if (isset($vals['resourceHostId'])) {
         $this->resourceHostId = $vals['resourceHostId'];
       }
-      if (isset($vals['totalCPUCount'])) {
-        $this->totalCPUCount = $vals['totalCPUCount'];
+      if (isset($vals['totalCpuCount'])) {
+        $this->totalCpuCount = $vals['totalCpuCount'];
       }
       if (isset($vals['nodeCount'])) {
         $this->nodeCount = $vals['nodeCount'];
@@ -889,7 +889,7 @@ class ComputationalResourceScheduling {
           break;
         case 2:
           if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->totalCPUCount);
+            $xfer += $input->readI32($this->totalCpuCount);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -968,9 +968,9 @@ class ComputationalResourceScheduling {
       $xfer += $output->writeString($this->resourceHostId);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->totalCPUCount !== null) {
-      $xfer += $output->writeFieldBegin('totalCPUCount', TType::I32, 2);
-      $xfer += $output->writeI32($this->totalCPUCount);
+    if ($this->totalCpuCount !== null) {
+      $xfer += $output->writeFieldBegin('totalCpuCount', TType::I32, 2);
+      $xfer += $output->writeI32($this->totalCpuCount);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->nodeCount !== null) {
@@ -1387,7 +1387,7 @@ class UserConfigurationData {
   public $advanceOutputDataHandling = null;
   public $qosParams = null;
   public $throttleResources = false;
-  public $userDN = null;
+  public $userDn = null;
   public $generateCert = false;
 
   public function __construct($vals=null) {
@@ -1430,7 +1430,7 @@ class UserConfigurationData {
           'type' => TType::BOOL,
           ),
         9 => array(
-          'var' => 'userDN',
+          'var' => 'userDn',
           'type' => TType::STRING,
           ),
         10 => array(
@@ -1464,8 +1464,8 @@ class UserConfigurationData {
       if (isset($vals['throttleResources'])) {
         $this->throttleResources = $vals['throttleResources'];
       }
-      if (isset($vals['userDN'])) {
-        $this->userDN = $vals['userDN'];
+      if (isset($vals['userDn'])) {
+        $this->userDn = $vals['userDn'];
       }
       if (isset($vals['generateCert'])) {
         $this->generateCert = $vals['generateCert'];
@@ -1554,7 +1554,7 @@ class UserConfigurationData {
           break;
         case 9:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->userDN);
+            $xfer += $input->readString($this->userDn);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -1631,9 +1631,9 @@ class UserConfigurationData {
       $xfer += $output->writeBool($this->throttleResources);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->userDN !== null) {
-      $xfer += $output->writeFieldBegin('userDN', TType::STRING, 9);
-      $xfer += $output->writeString($this->userDN);
+    if ($this->userDn !== null) {
+      $xfer += $output->writeFieldBegin('userDn', TType::STRING, 9);
+      $xfer += $output->writeString($this->userDn);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->generateCert !== null) {
@@ -1651,7 +1651,7 @@ class UserConfigurationData {
 class ErrorDetails {
   static $_TSPEC;
 
-  public $errorID = "DO_NOT_SET_AT_CLIENTS";
+  public $errorId = "DO_NOT_SET_AT_CLIENTS";
   public $creationTime = null;
   public $actualErrorMessage = null;
   public $userFriendlyMessage = null;
@@ -1665,7 +1665,7 @@ class ErrorDetails {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'errorID',
+          'var' => 'errorId',
           'type' => TType::STRING,
           ),
         2 => array(
@@ -1707,8 +1707,8 @@ class ErrorDetails {
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['errorID'])) {
-        $this->errorID = $vals['errorID'];
+      if (isset($vals['errorId'])) {
+        $this->errorId = $vals['errorId'];
       }
       if (isset($vals['creationTime'])) {
         $this->creationTime = $vals['creationTime'];
@@ -1758,7 +1758,7 @@ class ErrorDetails {
       {
         case 1:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->errorID);
+            $xfer += $input->readString($this->errorId);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -1842,9 +1842,9 @@ class ErrorDetails {
   public function write($output) {
     $xfer = 0;
     $xfer += $output->writeStructBegin('ErrorDetails');
-    if ($this->errorID !== null) {
-      $xfer += $output->writeFieldBegin('errorID', TType::STRING, 1);
-      $xfer += $output->writeString($this->errorID);
+    if ($this->errorId !== null) {
+      $xfer += $output->writeFieldBegin('errorId', TType::STRING, 1);
+      $xfer += $output->writeString($this->errorId);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->creationTime !== null) {
@@ -1909,7 +1909,7 @@ class ErrorDetails {
 class JobDetails {
   static $_TSPEC;
 
-  public $jobID = "DO_NOT_SET_AT_CLIENTS";
+  public $jobId = "DO_NOT_SET_AT_CLIENTS";
   public $jobDescription = null;
   public $creationTime = null;
   public $jobStatus = null;
@@ -1923,7 +1923,7 @@ class JobDetails {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'jobID',
+          'var' => 'jobId',
           'type' => TType::STRING,
           ),
         2 => array(
@@ -1968,8 +1968,8 @@ class JobDetails {
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['jobID'])) {
-        $this->jobID = $vals['jobID'];
+      if (isset($vals['jobId'])) {
+        $this->jobId = $vals['jobId'];
       }
       if (isset($vals['jobDescription'])) {
         $this->jobDescription = $vals['jobDescription'];
@@ -2019,7 +2019,7 @@ class JobDetails {
       {
         case 1:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->jobID);
+            $xfer += $input->readString($this->jobId);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -2106,9 +2106,9 @@ class JobDetails {
   public function write($output) {
     $xfer = 0;
     $xfer += $output->writeStructBegin('JobDetails');
-    if ($this->jobID !== null) {
-      $xfer += $output->writeFieldBegin('jobID', TType::STRING, 1);
-      $xfer += $output->writeString($this->jobID);
+    if ($this->jobId !== null) {
+      $xfer += $output->writeFieldBegin('jobId', TType::STRING, 1);
+      $xfer += $output->writeString($this->jobId);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->jobDescription !== null) {
@@ -2179,7 +2179,7 @@ class JobDetails {
 class DataTransferDetails {
   static $_TSPEC;
 
-  public $transferID = "DO_NOT_SET_AT_CLIENTS";
+  public $transferId = "DO_NOT_SET_AT_CLIENTS";
   public $creationTime = null;
   public $transferDescription = null;
   public $transferStatus = null;
@@ -2188,7 +2188,7 @@ class DataTransferDetails {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'transferID',
+          'var' => 'transferId',
           'type' => TType::STRING,
           ),
         2 => array(
@@ -2207,8 +2207,8 @@ class DataTransferDetails {
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['transferID'])) {
-        $this->transferID = $vals['transferID'];
+      if (isset($vals['transferId'])) {
+        $this->transferId = $vals['transferId'];
       }
       if (isset($vals['creationTime'])) {
         $this->creationTime = $vals['creationTime'];
@@ -2243,7 +2243,7 @@ class DataTransferDetails {
       {
         case 1:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->transferID);
+            $xfer += $input->readString($this->transferId);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -2283,9 +2283,9 @@ class DataTransferDetails {
   public function write($output) {
     $xfer = 0;
     $xfer += $output->writeStructBegin('DataTransferDetails');
-    if ($this->transferID !== null) {
-      $xfer += $output->writeFieldBegin('transferID', TType::STRING, 1);
-      $xfer += $output->writeString($this->transferID);
+    if ($this->transferId !== null) {
+      $xfer += $output->writeFieldBegin('transferId', TType::STRING, 1);
+      $xfer += $output->writeString($this->transferId);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->creationTime !== null) {
@@ -2316,7 +2316,7 @@ class DataTransferDetails {
 class TaskDetails {
   static $_TSPEC;
 
-  public $taskID = "DO_NOT_SET_AT_CLIENTS";
+  public $taskId = "DO_NOT_SET_AT_CLIENTS";
   public $creationTime = null;
   public $applicationId = null;
   public $applicationVersion = null;
@@ -2337,7 +2337,7 @@ class TaskDetails {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'taskID',
+          'var' => 'taskId',
           'type' => TType::STRING,
           ),
         2 => array(
@@ -2436,8 +2436,8 @@ class TaskDetails {
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['taskID'])) {
-        $this->taskID = $vals['taskID'];
+      if (isset($vals['taskId'])) {
+        $this->taskId = $vals['taskId'];
       }
       if (isset($vals['creationTime'])) {
         $this->creationTime = $vals['creationTime'];
@@ -2508,7 +2508,7 @@ class TaskDetails {
       {
         case 1:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->taskID);
+            $xfer += $input->readString($this->taskId);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -2700,9 +2700,9 @@ class TaskDetails {
   public function write($output) {
     $xfer = 0;
     $xfer += $output->writeStructBegin('TaskDetails');
-    if ($this->taskID !== null) {
-      $xfer += $output->writeFieldBegin('taskID', TType::STRING, 1);
-      $xfer += $output->writeString($this->taskID);
+    if ($this->taskId !== null) {
+      $xfer += $output->writeFieldBegin('taskId', TType::STRING, 1);
+      $xfer += $output->writeString($this->taskId);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->creationTime !== null) {
@@ -3455,8 +3455,8 @@ class ValidationResults {
 class Experiment {
   static $_TSPEC;
 
-  public $experimentID = "DO_NOT_SET_AT_CLIENTS";
-  public $projectID = "DEFAULT";
+  public $experimentId = "DO_NOT_SET_AT_CLIENTS";
+  public $projectId = "DEFAULT";
   public $creationTime = null;
   public $userName = null;
   public $name = null;
@@ -3481,11 +3481,11 @@ class Experiment {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'experimentID',
+          'var' => 'experimentId',
           'type' => TType::STRING,
           ),
         2 => array(
-          'var' => 'projectID',
+          'var' => 'projectId',
           'type' => TType::STRING,
           ),
         3 => array(
@@ -3598,11 +3598,11 @@ class Experiment {
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['experimentID'])) {
-        $this->experimentID = $vals['experimentID'];
+      if (isset($vals['experimentId'])) {
+        $this->experimentId = $vals['experimentId'];
       }
-      if (isset($vals['projectID'])) {
-        $this->projectID = $vals['projectID'];
+      if (isset($vals['projectId'])) {
+        $this->projectId = $vals['projectId'];
       }
       if (isset($vals['creationTime'])) {
         $this->creationTime = $vals['creationTime'];
@@ -3685,14 +3685,14 @@ class Experiment {
       {
         case 1:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->experimentID);
+            $xfer += $input->readString($this->experimentId);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 2:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->projectID);
+            $xfer += $input->readString($this->projectId);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -3910,14 +3910,14 @@ class Experiment {
   public function write($output) {
     $xfer = 0;
     $xfer += $output->writeStructBegin('Experiment');
-    if ($this->experimentID !== null) {
-      $xfer += $output->writeFieldBegin('experimentID', TType::STRING, 1);
-      $xfer += $output->writeString($this->experimentID);
+    if ($this->experimentId !== null) {
+      $xfer += $output->writeFieldBegin('experimentId', TType::STRING, 1);
+      $xfer += $output->writeString($this->experimentId);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->projectID !== null) {
-      $xfer += $output->writeFieldBegin('projectID', TType::STRING, 2);
-      $xfer += $output->writeString($this->projectID);
+    if ($this->projectId !== null) {
+      $xfer += $output->writeFieldBegin('projectId', TType::STRING, 2);
+      $xfer += $output->writeString($this->projectId);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->creationTime !== null) {
@@ -4103,8 +4103,8 @@ class Experiment {
 class ExperimentSummary {
   static $_TSPEC;
 
-  public $experimentID = null;
-  public $projectID = null;
+  public $experimentId = null;
+  public $projectId = null;
   public $creationTime = null;
   public $userName = null;
   public $name = null;
@@ -4117,11 +4117,11 @@ class ExperimentSummary {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'experimentID',
+          'var' => 'experimentId',
           'type' => TType::STRING,
           ),
         2 => array(
-          'var' => 'projectID',
+          'var' => 'projectId',
           'type' => TType::STRING,
           ),
         3 => array(
@@ -4161,11 +4161,11 @@ class ExperimentSummary {
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['experimentID'])) {
-        $this->experimentID = $vals['experimentID'];
+      if (isset($vals['experimentId'])) {
+        $this->experimentId = $vals['experimentId'];
       }
-      if (isset($vals['projectID'])) {
-        $this->projectID = $vals['projectID'];
+      if (isset($vals['projectId'])) {
+        $this->projectId = $vals['projectId'];
       }
       if (isset($vals['creationTime'])) {
         $this->creationTime = $vals['creationTime'];
@@ -4212,14 +4212,14 @@ class ExperimentSummary {
       {
         case 1:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->experimentID);
+            $xfer += $input->readString($this->experimentId);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 2:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->projectID);
+            $xfer += $input->readString($this->projectId);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -4298,14 +4298,14 @@ class ExperimentSummary {
   public function write($output) {
     $xfer = 0;
     $xfer += $output->writeStructBegin('ExperimentSummary');
-    if ($this->experimentID !== null) {
-      $xfer += $output->writeFieldBegin('experimentID', TType::STRING, 1);
-      $xfer += $output->writeString($this->experimentID);
+    if ($this->experimentId !== null) {
+      $xfer += $output->writeFieldBegin('experimentId', TType::STRING, 1);
+      $xfer += $output->writeString($this->experimentId);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->projectID !== null) {
-      $xfer += $output->writeFieldBegin('projectID', TType::STRING, 2);
-      $xfer += $output->writeString($this->projectID);
+    if ($this->projectId !== null) {
+      $xfer += $output->writeFieldBegin('projectId', TType::STRING, 2);
+      $xfer += $output->writeString($this->projectId);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->creationTime !== null) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php
index 7ccd55c..aa4718f 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php
@@ -112,7 +112,7 @@ class Group {
 class Project {
   static $_TSPEC;
 
-  public $projectID = "DEFAULT";
+  public $projectId = "DEFAULT";
   public $owner = null;
   public $name = null;
   public $description = null;
@@ -124,7 +124,7 @@ class Project {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'projectID',
+          'var' => 'projectId',
           'type' => TType::STRING,
           ),
         2 => array(
@@ -162,8 +162,8 @@ class Project {
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['projectID'])) {
-        $this->projectID = $vals['projectID'];
+      if (isset($vals['projectId'])) {
+        $this->projectId = $vals['projectId'];
       }
       if (isset($vals['owner'])) {
         $this->owner = $vals['owner'];
@@ -207,7 +207,7 @@ class Project {
       {
         case 1:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->projectID);
+            $xfer += $input->readString($this->projectId);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -287,9 +287,9 @@ class Project {
   public function write($output) {
     $xfer = 0;
     $xfer += $output->writeStructBegin('Project');
-    if ($this->projectID !== null) {
-      $xfer += $output->writeFieldBegin('projectID', TType::STRING, 1);
-      $xfer += $output->writeString($this->projectID);
+    if ($this->projectId !== null) {
+      $xfer += $output->writeFieldBegin('projectId', TType::STRING, 1);
+      $xfer += $output->writeString($this->projectId);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->owner !== null) {


[42/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
Mongo Registry WIP


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

Branch: refs/heads/mongo-registry
Commit: 801489bf3faf8a064619a1e0acb09b070091324c
Parents: 7e97f09
Author: Supun Nakandala <sc...@apache.org>
Authored: Thu May 28 19:44:25 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Thu May 28 19:44:27 2015 +0530

----------------------------------------------------------------------
 .../api/server/util/AppCatalogInitUtil.java     |    6 -
 .../gfac/client/GfacClientFactoryTest.java      |   11 -
 .../airavata/gfac/client/util/Initialize.java   |    2 +-
 .../airavata/gfac/core/utils/GFacUtils.java     |    1 -
 .../client/OrchestratorClientFactoryTest.java   |   13 -
 .../orchestrator/client/util/Initialize.java    |    2 +-
 .../core/OrchestratorTestWithGRAM.java          |   15 -
 .../core/OrchestratorTestWithMyProxyAuth.java   |   16 -
 .../orchestrator/core/util/Initialize.java      |    2 +-
 .../registry/jpa/impl/ExperimentRegistry.java   |    1 +
 .../registry/jpa/impl/ProjectRegistry.java      |    1 +
 .../persistance/registry/jpa/impl/UserReg.java  |    1 -
 .../jpa/resources/ConfigurationResource.java    |    4 -
 .../jpa/resources/ExperimentResource.java       |    1 +
 .../registry/jpa/resources/GatewayResource.java |    1 +
 .../jpa/resources/JobDetailResource.java        |    1 +
 .../resources/NotificationEmailResource.java    |    5 +-
 .../registry/jpa/resources/ProjectResource.java |    1 +
 .../jpa/resources/ProjectUserResource.java      |    6 +-
 .../registry/jpa/resources/StatusResource.java  |    1 +
 .../jpa/resources/TaskDetailResource.java       |    1 +
 .../registry/jpa/resources/Utils.java           |    7 +-
 .../registry/jpa/resources/WorkerResource.java  |    1 +
 .../resources/WorkflowNodeDetailResource.java   |    1 +
 .../jpa/utils/ThriftDataModelConversion.java    |   39 +-
 .../jpa/ExperimentInputResourceTest.java        |    4 +-
 .../registry/jpa/ExperimentResourceTest.java    |    1 -
 .../registry/jpa/GatewayResourceTest.java       |    1 +
 .../registry/jpa/util/Initialize.java           |    1 -
 .../persistance/registry/jpa/JPAConstants.java  |   33 -
 .../persistance/registry/jpa/Resource.java      |   71 -
 .../persistance/registry/jpa/ResourceType.java  |   49 -
 .../persistance/registry/jpa/ResourceUtils.java |  525 ------
 .../registry/jpa/impl/ExperimentRegistry.java   | 1643 ------------------
 .../registry/jpa/impl/GatewayRegistry.java      |  115 --
 .../registry/jpa/impl/LoggingRegistryImpl.java  |   97 --
 .../registry/jpa/impl/ProjectRegistry.java      |  211 ---
 .../registry/jpa/impl/RegistryFactory.java      |   80 -
 .../registry/jpa/impl/RegistryImpl.java         |  735 --------
 .../persistance/registry/jpa/impl/UserReg.java  |   41 -
 .../jpa/model/AdvancedInputDataHandling.java    |  129 --
 .../jpa/model/AdvancedOutputDataHandling.java   |  119 --
 .../registry/jpa/model/ApplicationInput.java    |  173 --
 .../registry/jpa/model/ApplicationInput_PK.java |   65 -
 .../registry/jpa/model/ApplicationOutput.java   |  150 --
 .../jpa/model/ApplicationOutput_PK.java         |   64 -
 .../Computational_Resource_Scheduling.java      |  190 --
 .../registry/jpa/model/Configuration.java       |   80 -
 .../registry/jpa/model/Configuration_PK.java    |   74 -
 .../registry/jpa/model/DataTransferDetail.java  |   88 -
 .../registry/jpa/model/ErrorDetail.java         |  196 ---
 .../registry/jpa/model/Experiment.java          |  211 ---
 .../jpa/model/ExperimentConfigData.java         |  106 --
 .../registry/jpa/model/Experiment_Input.java    |  178 --
 .../registry/jpa/model/Experiment_Input_PK.java |   64 -
 .../registry/jpa/model/Experiment_Output.java   |  151 --
 .../jpa/model/Experiment_Output_PK.java         |   64 -
 .../persistance/registry/jpa/model/Gateway.java |   76 -
 .../registry/jpa/model/Gateway_Worker.java      |   82 -
 .../registry/jpa/model/Gateway_Worker_PK.java   |   64 -
 .../registry/jpa/model/JobDetail.java           |  120 --
 .../registry/jpa/model/JobDetails_PK.java       |   64 -
 .../registry/jpa/model/NodeInput.java           |  171 --
 .../registry/jpa/model/NodeInput_PK.java        |   64 -
 .../registry/jpa/model/NodeOutput.java          |  148 --
 .../registry/jpa/model/NodeOutput_PK.java       |   64 -
 .../registry/jpa/model/Notification_Email.java  |   97 --
 .../persistance/registry/jpa/model/Project.java |  125 --
 .../registry/jpa/model/ProjectUser.java         |   81 -
 .../registry/jpa/model/ProjectUser_PK.java      |   64 -
 .../registry/jpa/model/QosParam.java            |  119 --
 .../persistance/registry/jpa/model/Status.java  |  174 --
 .../registry/jpa/model/TaskDetail.java          |  119 --
 .../persistance/registry/jpa/model/Users.java   |   55 -
 .../registry/jpa/model/WorkflowNodeDetail.java  |  107 --
 .../registry/jpa/mongo/ExperimentRegistry.java  |   28 -
 .../persistance/registry/jpa/mongo/Test.java    |   79 -
 .../conversion/AbstractThriftDeserializer.java  |  152 --
 .../conversion/AbstractThriftSerializer.java    |  122 --
 .../mongo/conversion/ModelConversionHelper.java |  218 ---
 .../idot/InputDataObjectTypeDeserializer.java   |   44 -
 .../idot/InputDataObjectTypeSerializer.java     |   41 -
 .../odot/OutputDataObjectTypeDeserializer.java  |   44 -
 .../odot/OutputDataObjectTypeSerializer.java    |   41 -
 .../experiment/ExperimentDeserializer.java      |   44 -
 .../experiment/ExperimentSerializer.java        |   41 -
 .../AdvancedInputDataHandlingDeserializer.java  |   44 -
 .../AdvancedInputDataHandlingSerializer.java    |   41 -
 .../AdvancedOutputDataHandlingDeserializer.java |   44 -
 .../AdvancedOutputDataHandlingSerializer.java   |   41 -
 .../ApplicationStatusDeserializer.java          |   44 -
 .../appstatus/ApplicationStatusSerializer.java  |   42 -
 ...utationalResourceSchedulingDeserializer.java |   44 -
 ...mputationalResourceSchedulingSerializer.java |   41 -
 .../DataTransferDetailsDeserializer.java        |   44 -
 .../DataTransferDetailsSerializer.java          |   41 -
 .../errdetails/ErrorDetailsDeserializer.java    |   44 -
 .../errdetails/ErrorDetailsSerializer.java      |   41 -
 .../expstatus/ExperimentStatusDeserializer.java |   44 -
 .../expstatus/ExperimentStatusSerializer.java   |   41 -
 .../ExperimentSummaryDeserializer.java          |   44 -
 .../expsummary/ExperimentSummarySerializer.java |   41 -
 .../jobdetails/JobDetailsDeserializer.java      |   44 -
 .../jobdetails/JobDetailsSerializer.java        |   41 -
 .../jobstatus/JobStatusDeserializer.java        |   44 -
 .../jobstatus/JobStatusSerializer.java          |   41 -
 .../QualityOfServiceParamsDeserializer.java     |   44 -
 .../qosp/QualityOfServiceParamsSerializer.java  |   41 -
 .../taskdetails/TaskDetailsDeserializer.java    |   44 -
 .../taskdetails/TaskDetailsSerializer.java      |   41 -
 .../taskstatus/TaskStatusDeserializer.java      |   44 -
 .../taskstatus/TaskStatusSerializer.java        |   41 -
 .../trstatus/TransferStatusDeserializer.java    |   44 -
 .../trstatus/TransferStatusSerializer.java      |   41 -
 .../UserConfigurationDataDeserializer.java      |   44 -
 .../ucdata/UserConfigurationDataSerializer.java |   41 -
 .../ValidationResultsDeserializer.java          |   44 -
 .../ValidationResultsSerializer.java            |   41 -
 .../ValidatorResultDeserializer.java            |   44 -
 .../ValidatorResultSerializer.java              |   41 -
 .../wfnd/WorkflowNodeDetailsDeserializer.java   |   44 -
 .../wfnd/WorkflowNodeDetailsSerializer.java     |   41 -
 .../wfns/WorkflowNodeStatusDeserializer.java    |   44 -
 .../wfns/WorkflowNodeStatusSerializer.java      |   41 -
 .../conversion/gateway/GatewayDeserializer.java |   44 -
 .../conversion/gateway/GatewaySerializer.java   |   41 -
 .../conversion/group/GroupDeserializer.java     |   44 -
 .../mongo/conversion/group/GroupSerializer.java |   41 -
 .../conversion/project/ProjectDeserializer.java |   44 -
 .../conversion/project/ProjectSerializer.java   |   40 -
 .../mongo/conversion/user/UserDeserializer.java |   44 -
 .../mongo/conversion/user/UserSerializer.java   |   40 -
 .../registry/jpa/mongo/dao/ExperimentDao.java   |  374 ----
 .../registry/jpa/mongo/dao/ProjectDao.java      |  189 --
 .../registry/jpa/mongo/utils/MongoUtil.java     |   70 -
 .../jpa/resources/AbstractResource.java         |  317 ----
 .../AdvanceInputDataHandlingResource.java       |  168 --
 .../AdvancedOutputDataHandlingResource.java     |  159 --
 .../jpa/resources/ApplicationInputResource.java |  235 ---
 .../resources/ApplicationOutputResource.java    |  213 ---
 .../ComputationSchedulingResource.java          |  229 ---
 .../jpa/resources/ConfigDataResource.java       |  162 --
 .../jpa/resources/ConfigurationResource.java    |  208 ---
 .../resources/DataTransferDetailResource.java   |  272 ---
 .../jpa/resources/ErrorDetailResource.java      |  229 ---
 .../jpa/resources/ExperimentInputResource.java  |  229 ---
 .../jpa/resources/ExperimentOutputResource.java |  209 ---
 .../jpa/resources/ExperimentResource.java       |  777 ---------
 .../registry/jpa/resources/GatewayResource.java |  436 -----
 .../jpa/resources/JobDetailResource.java        |  361 ----
 .../jpa/resources/NodeInputResource.java        |  231 ---
 .../jpa/resources/NodeOutputResource.java       |  211 ---
 .../resources/NotificationEmailResource.java    |  125 --
 .../registry/jpa/resources/ProjectResource.java |  531 ------
 .../jpa/resources/ProjectUserResource.java      |  123 --
 .../jpa/resources/QosParamResource.java         |  152 --
 .../registry/jpa/resources/StatusResource.java  |  195 ---
 .../jpa/resources/TaskDetailResource.java       |  661 -------
 .../registry/jpa/resources/UserResource.java    |  186 --
 .../registry/jpa/resources/Utils.java           |  824 ---------
 .../registry/jpa/resources/WorkerResource.java  |  908 ----------
 .../resources/WorkflowNodeDetailResource.java   |  473 -----
 .../registry/jpa/utils/QueryGenerator.java      |  128 --
 .../jpa/utils/ThriftDataModelConversion.java    |  714 --------
 .../persistance/registry/mongo/Test.java        |   79 +
 .../conversion/AbstractThriftDeserializer.java  |  152 ++
 .../conversion/AbstractThriftSerializer.java    |  122 ++
 .../mongo/conversion/ModelConversionHelper.java |  218 +++
 .../idot/InputDataObjectTypeDeserializer.java   |   44 +
 .../idot/InputDataObjectTypeSerializer.java     |   41 +
 .../odot/OutputDataObjectTypeDeserializer.java  |   44 +
 .../odot/OutputDataObjectTypeSerializer.java    |   41 +
 .../experiment/ExperimentDeserializer.java      |   44 +
 .../experiment/ExperimentSerializer.java        |   41 +
 .../AdvancedInputDataHandlingDeserializer.java  |   44 +
 .../AdvancedInputDataHandlingSerializer.java    |   41 +
 .../AdvancedOutputDataHandlingDeserializer.java |   44 +
 .../AdvancedOutputDataHandlingSerializer.java   |   41 +
 .../ApplicationStatusDeserializer.java          |   44 +
 .../appstatus/ApplicationStatusSerializer.java  |   42 +
 ...utationalResourceSchedulingDeserializer.java |   44 +
 ...mputationalResourceSchedulingSerializer.java |   41 +
 .../DataTransferDetailsDeserializer.java        |   44 +
 .../DataTransferDetailsSerializer.java          |   41 +
 .../errdetails/ErrorDetailsDeserializer.java    |   44 +
 .../errdetails/ErrorDetailsSerializer.java      |   41 +
 .../expstatus/ExperimentStatusDeserializer.java |   44 +
 .../expstatus/ExperimentStatusSerializer.java   |   41 +
 .../ExperimentSummaryDeserializer.java          |   44 +
 .../expsummary/ExperimentSummarySerializer.java |   41 +
 .../jobdetails/JobDetailsDeserializer.java      |   44 +
 .../jobdetails/JobDetailsSerializer.java        |   41 +
 .../jobstatus/JobStatusDeserializer.java        |   44 +
 .../jobstatus/JobStatusSerializer.java          |   41 +
 .../QualityOfServiceParamsDeserializer.java     |   44 +
 .../qosp/QualityOfServiceParamsSerializer.java  |   41 +
 .../taskdetails/TaskDetailsDeserializer.java    |   44 +
 .../taskdetails/TaskDetailsSerializer.java      |   41 +
 .../taskstatus/TaskStatusDeserializer.java      |   44 +
 .../taskstatus/TaskStatusSerializer.java        |   41 +
 .../trstatus/TransferStatusDeserializer.java    |   44 +
 .../trstatus/TransferStatusSerializer.java      |   41 +
 .../UserConfigurationDataDeserializer.java      |   44 +
 .../ucdata/UserConfigurationDataSerializer.java |   41 +
 .../ValidationResultsDeserializer.java          |   44 +
 .../ValidationResultsSerializer.java            |   41 +
 .../ValidatorResultDeserializer.java            |   44 +
 .../ValidatorResultSerializer.java              |   41 +
 .../wfnd/WorkflowNodeDetailsDeserializer.java   |   44 +
 .../wfnd/WorkflowNodeDetailsSerializer.java     |   41 +
 .../wfns/WorkflowNodeStatusDeserializer.java    |   44 +
 .../wfns/WorkflowNodeStatusSerializer.java      |   41 +
 .../conversion/gateway/GatewayDeserializer.java |   44 +
 .../conversion/gateway/GatewaySerializer.java   |   41 +
 .../conversion/group/GroupDeserializer.java     |   44 +
 .../mongo/conversion/group/GroupSerializer.java |   41 +
 .../conversion/project/ProjectDeserializer.java |   44 +
 .../conversion/project/ProjectSerializer.java   |   40 +
 .../mongo/conversion/user/UserDeserializer.java |   44 +
 .../mongo/conversion/user/UserSerializer.java   |   40 +
 .../registry/mongo/dao/ExperimentDao.java       |  378 ++++
 .../registry/mongo/dao/GatewayDao.java          |  179 ++
 .../registry/mongo/dao/ProjectDao.java          |  189 ++
 .../persistance/registry/mongo/dao/UserDao.java |  124 ++
 .../registry/mongo/impl/RegistryFactory.java    |   44 +
 .../registry/mongo/impl/RegistryImpl.java       |  732 ++++++++
 .../mongo/repository/ExperimentRepository.java  | 1566 +++++++++++++++++
 .../mongo/repository/GatewayRepository.java     |  120 ++
 .../mongo/repository/ProjectRepository.java     |  191 ++
 .../mongo/repository/UserRepository.java        |   65 +
 .../registry/mongo/utils/MongoUtil.java         |   70 +
 .../src/main/resources/META-INF/persistence.xml |   50 +-
 .../registry/mongo/AbstractDaoTest.java         |   37 +
 .../registry/mongo/ExperimentDaoTest.java       |  286 +--
 .../registry/RegistryUseCaseTest.java           |  291 ----
 .../engine/interpretor/WorkflowInterpreter.java |    1 -
 236 files changed, 6620 insertions(+), 21233 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AppCatalogInitUtil.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AppCatalogInitUtil.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AppCatalogInitUtil.java
index 870898b..d0fb5cd 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AppCatalogInitUtil.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AppCatalogInitUtil.java
@@ -23,12 +23,6 @@ package org.apache.airavata.api.server.util;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
-import org.apache.airavata.persistance.registry.jpa.resources.ProjectResource;
-import org.apache.airavata.persistance.registry.jpa.resources.UserResource;
-import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
 import org.apache.derby.drda.NetworkServerControl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java b/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
index 21c137f..2cf5aad 100644
--- a/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
+++ b/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/GfacClientFactoryTest.java
@@ -25,25 +25,14 @@ package org.apache.airavata.gfac.client;
 //import org.apache.airavata.client.api.AiravataAPI;
 //import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 //import org.apache.airavata.client.tools.DocumentCreator;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.AiravataZKUtils;
-import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.gfac.client.util.Initialize;
 import org.apache.airavata.gfac.cpi.GfacService;
 import org.apache.airavata.gfac.server.GfacServer;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.zookeeper.server.ServerCnxnFactory;
-import org.apache.zookeeper.server.ServerConfig;
-import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
-import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.IOException;
-import java.net.URL;
-
 public class GfacClientFactoryTest {
     private final static Logger logger = LoggerFactory.getLogger(GfacClientFactoryTest.class);
 //    private DocumentCreator documentCreator;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java b/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
index 6f3f792..08b2eae 100644
--- a/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
+++ b/modules/gfac/airavata-gfac-service/src/test/java/org/apache/airavata/gfac/client/util/Initialize.java
@@ -22,10 +22,10 @@
 package org.apache.airavata.gfac.client.util;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
+import org.apache.airavata.persistance.registry.mongo.resources.*;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.apache.derby.drda.NetworkServerControl;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
index 2c6cbd4..34490cb 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
@@ -38,7 +38,6 @@ import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.GFacHandlerException;
 import org.apache.airavata.gfac.core.states.GfacExperimentState;
 import org.apache.airavata.gfac.core.states.GfacHandlerState;
-import org.apache.airavata.messaging.core.impl.RabbitMQTaskLaunchConsumer;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.appcatalog.computeresource.*;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
index 18168c7..3902c9d 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
@@ -25,19 +25,6 @@ package org.apache.airavata.orchestrator.client;
 //import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 //import org.apache.airavata.client.tools.DocumentCreator;
 //import org.apache.airavata.client.tools.DocumentCreatorNew;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.common.utils.AiravataZKUtils;
-import org.apache.airavata.common.utils.Constants;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.model.error.AiravataClientConnectException;
-import org.apache.airavata.orchestrator.client.util.Initialize;
-import org.apache.airavata.orchestrator.cpi.OrchestratorService;
-import org.apache.airavata.orchestrator.server.OrchestratorServer;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.registry.cpi.Registry;
-import org.apache.zookeeper.server.ServerCnxnFactory;
-import org.junit.Test;
 
 public class OrchestratorClientFactoryTest {
 /*    private DocumentCreatorNew documentCreator;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/util/Initialize.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/util/Initialize.java b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/util/Initialize.java
index a9eb5a8..be7eb30 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/util/Initialize.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/util/Initialize.java
@@ -22,10 +22,10 @@
 package org.apache.airavata.orchestrator.client.util;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
+import org.apache.airavata.persistance.registry.mongo.resources.*;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.apache.derby.drda.NetworkServerControl;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
index c5263ea..97f55e5 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
@@ -20,21 +20,6 @@
 */
 package org.apache.airavata.orchestrator.core;
 
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.orchestrator.cpi.Orchestrator;
-import org.apache.airavata.orchestrator.cpi.impl.SimpleOrchestratorImpl;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryImpl;
-import org.apache.airavata.registry.cpi.ChildDataType;
-import org.apache.airavata.registry.cpi.ParentDataType;
-import org.apache.airavata.registry.cpi.Registry;
-import org.junit.Assert;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import java.util.*;
-
 public class OrchestratorTestWithGRAM extends BaseOrchestratorTest {
 //    private static final Logger log = LoggerFactory.getLogger(OrchestratorTestWithGRAM.class);
 //

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithMyProxyAuth.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithMyProxyAuth.java
index c155f9c..9c39b3f 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithMyProxyAuth.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithMyProxyAuth.java
@@ -20,22 +20,6 @@
 */
 package org.apache.airavata.orchestrator.core;
 
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.model.util.ExperimentModelUtil;
-import org.apache.airavata.model.workspace.experiment.*;
-import org.apache.airavata.orchestrator.cpi.Orchestrator;
-import org.apache.airavata.orchestrator.cpi.impl.SimpleOrchestratorImpl;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.registry.cpi.ParentDataType;
-import org.apache.airavata.registry.cpi.Registry;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import java.util.ArrayList;
-import java.util.List;
-
 public class OrchestratorTestWithMyProxyAuth extends BaseOrchestratorTest {
 //    private static final Logger log = LoggerFactory.getLogger(NewOrchestratorTest.class);
 //

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/Initialize.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/Initialize.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/Initialize.java
index 29a8f2c..e29efde 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/Initialize.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/Initialize.java
@@ -22,10 +22,10 @@
 package org.apache.airavata.orchestrator.core.util;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
+import org.apache.airavata.persistance.registry.mongo.resources.*;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.apache.derby.drda.NetworkServerControl;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
index a6909f1..494cd63 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
@@ -31,6 +31,7 @@ import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
+import org.apache.airavata.persistance.registry.mongo.resources.*;
 import org.apache.airavata.persistance.registry.jpa.utils.ThriftDataModelConversion;
 import org.apache.airavata.registry.cpi.CompositeIdentifier;
 import org.apache.airavata.registry.cpi.RegistryException;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
index 928fe64..e506422 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
@@ -26,6 +26,7 @@ import org.apache.airavata.model.workspace.Project;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
+import org.apache.airavata.persistance.registry.mongo.resources.*;
 import org.apache.airavata.persistance.registry.jpa.utils.ThriftDataModelConversion;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.apache.airavata.registry.cpi.ResultOrderType;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java
index ef544b2..7920200 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java
@@ -24,7 +24,6 @@ package org.apache.airavata.persistance.registry.jpa.impl;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.resources.UserResource;
 import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
 import org.apache.airavata.registry.cpi.RegistryException;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
index ef84988..9e2ebfd 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
@@ -21,19 +21,15 @@
 package org.apache.airavata.persistance.registry.jpa.resources;
 
 import java.sql.Timestamp;
-import java.util.ArrayList;
 import java.util.List;
-import java.util.concurrent.locks.Lock;
 
 import javax.persistence.EntityManager;
-import javax.persistence.Query;
 
 import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.model.Configuration;
 import org.apache.airavata.persistance.registry.jpa.model.Configuration_PK;
-import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
index 1d7b58c..a64372e 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
@@ -31,6 +31,7 @@ import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.mongo.model.*;
 import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.apache.airavata.registry.cpi.utils.StatusType;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
index d0cb0c4..4d90ab8 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
@@ -30,6 +30,7 @@ import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.mongo.model.*;
 import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
index 6e6d2ee..e2b7eae 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
@@ -25,6 +25,7 @@ import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.mongo.model.*;
 import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.apache.airavata.registry.cpi.utils.StatusType;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NotificationEmailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NotificationEmailResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NotificationEmailResource.java
index 5ac864f..e8f353d 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NotificationEmailResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NotificationEmailResource.java
@@ -24,7 +24,10 @@ package org.apache.airavata.persistance.registry.jpa.resources;
 import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.jpa.model.Experiment;
+import org.apache.airavata.persistance.registry.jpa.model.Notification_Email;
+import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
+import org.apache.airavata.persistance.registry.mongo.model.*;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java
index 4dc4160..d10a624 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java
@@ -24,6 +24,7 @@ import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.mongo.model.*;
 import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.apache.airavata.registry.cpi.ResultOrderType;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java
index 336a9ee..e4115a9 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java
@@ -24,7 +24,11 @@ package org.apache.airavata.persistance.registry.jpa.resources;
 import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.jpa.model.Project;
+import org.apache.airavata.persistance.registry.jpa.model.ProjectUser;
+import org.apache.airavata.persistance.registry.jpa.model.ProjectUser_PK;
+import org.apache.airavata.persistance.registry.jpa.model.Users;
+import org.apache.airavata.persistance.registry.mongo.model.*;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/StatusResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/StatusResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/StatusResource.java
index 169e1c7..bd2d9f0 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/StatusResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/StatusResource.java
@@ -25,6 +25,7 @@ import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.mongo.model.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.airavata.registry.cpi.RegistryException;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java
index 791c9f9..66de51e 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java
@@ -25,6 +25,7 @@ import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.mongo.model.*;
 import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.apache.airavata.registry.cpi.utils.StatusType;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
index 69ada6d..86e252f 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
@@ -26,6 +26,7 @@ import org.apache.airavata.persistance.registry.jpa.JPAConstants;
 import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.mongo.model.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -215,7 +216,7 @@ public class Utils {
                     throw new IllegalArgumentException("Object should be a Experiment.");
                 }
             case NOTIFICATION_EMAIL:
-                if (o instanceof  Notification_Email){
+                if (o instanceof Notification_Email){
                     return createNotificationEmail((Notification_Email)o);
                 }else {
                     logger.error("Object should be a Experiment.", new IllegalArgumentException());
@@ -229,7 +230,7 @@ public class Utils {
                     throw new IllegalArgumentException("Object should be a Experiment input data.");
                 }
             case EXPERIMENT_OUTPUT:
-                if (o instanceof  Experiment_Output){
+                if (o instanceof Experiment_Output){
                     return createExperimentOutput((Experiment_Output)o);
                 }else {
                     logger.error("Object should be a Experiment output data.", new IllegalArgumentException());
@@ -243,7 +244,7 @@ public class Utils {
                      throw new IllegalArgumentException("Object should be a Workflow node data.");
                  }
             case TASK_DETAIL:
-                if (o instanceof  TaskDetail){
+                if (o instanceof TaskDetail){
                     return createTaskDetail((TaskDetail)o);
                 }else {
                     logger.error("Object should be a task detail data.", new IllegalArgumentException());

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
index 8be98c3..cdd3dff 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
@@ -26,6 +26,7 @@ import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.mongo.model.*;
 import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
 import org.apache.airavata.registry.cpi.ResultOrderType;
 import org.apache.airavata.registry.cpi.utils.Constants;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowNodeDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowNodeDetailResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowNodeDetailResource.java
index 9d2869d..8100b31 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowNodeDetailResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowNodeDetailResource.java
@@ -25,6 +25,7 @@ import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.mongo.model.*;
 import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
 import org.apache.airavata.registry.cpi.utils.StatusType;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
index ef3152f..0dbb860 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
@@ -21,40 +21,12 @@
 
 package org.apache.airavata.persistance.registry.jpa.utils;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.airavata.common.utils.StringUtil;
-import org.apache.airavata.model.appcatalog.appinterface.*;
+import org.apache.airavata.model.appcatalog.appinterface.DataType;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.workspace.Gateway;
 import org.apache.airavata.model.workspace.Project;
-import org.apache.airavata.model.workspace.experiment.ActionableGroup;
-import org.apache.airavata.model.workspace.experiment.AdvancedInputDataHandling;
-import org.apache.airavata.model.workspace.experiment.AdvancedOutputDataHandling;
-import org.apache.airavata.model.workspace.experiment.ApplicationStatus;
-import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
-import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
-import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
-import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.model.workspace.experiment.ErrorDetails;
-import org.apache.airavata.model.workspace.experiment.ExecutionUnit;
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.model.workspace.experiment.ExperimentState;
-import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
-import org.apache.airavata.model.workspace.experiment.ExperimentSummary;
-import org.apache.airavata.model.workspace.experiment.JobDetails;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.apache.airavata.model.workspace.experiment.JobStatus;
-import org.apache.airavata.model.workspace.experiment.QualityOfServiceParams;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.model.workspace.experiment.TaskState;
-import org.apache.airavata.model.workspace.experiment.TaskStatus;
-import org.apache.airavata.model.workspace.experiment.TransferState;
-import org.apache.airavata.model.workspace.experiment.TransferStatus;
-import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
-import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
-import org.apache.airavata.model.workspace.experiment.WorkflowNodeState;
-import org.apache.airavata.model.workspace.experiment.WorkflowNodeStatus;
+import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
@@ -62,6 +34,9 @@ import org.apache.airavata.registry.cpi.RegistryException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.ArrayList;
+import java.util.List;
+
 public class ThriftDataModelConversion {
     private final static Logger logger = LoggerFactory.getLogger(ThriftDataModelConversion.class);
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentInputResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentInputResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentInputResourceTest.java
index a46e196..3c8fec6 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentInputResourceTest.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentInputResourceTest.java
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import org.apache.airavata.persistance.registry.jpa.resources.*;
+import org.apache.airavata.persistance.registry.jpa.resources.ExperimentInputResource;
+import org.apache.airavata.persistance.registry.jpa.resources.ExperimentResource;
+import org.apache.airavata.persistance.registry.mongo.resources.*;
 import org.junit.After;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentResourceTest.java
index eb620e9..45f4817 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentResourceTest.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentResourceTest.java
@@ -24,7 +24,6 @@ package org.apache.airavata.persistance.registry.jpa;
 import static org.junit.Assert.*;
 
 import java.sql.Timestamp;
-import java.util.Calendar;
 import java.util.Date;
 
 import org.apache.airavata.persistance.registry.jpa.resources.ExperimentResource;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GatewayResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GatewayResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GatewayResourceTest.java
index 022b197..1330cee 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GatewayResourceTest.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GatewayResourceTest.java
@@ -25,6 +25,7 @@ import static org.junit.Assert.*;
 
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
+import org.apache.airavata.persistance.registry.mongo.resources.*;
 import org.junit.After;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/util/Initialize.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/util/Initialize.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/util/Initialize.java
index 6bb5a5e..c721737 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/util/Initialize.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/util/Initialize.java
@@ -22,7 +22,6 @@
 package org.apache.airavata.persistance.registry.jpa.util;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/JPAConstants.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/JPAConstants.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/JPAConstants.java
deleted file mode 100644
index deb3ba2..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/JPAConstants.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.persistance.registry.jpa;
-
-public class JPAConstants {
-	public static final String KEY_JDBC_URL = "registry.jdbc.url";
-	public static final String KEY_JDBC_USER = "registry.jdbc.user";
-	public static final String KEY_JDBC_PASSWORD = "registry.jdbc.password";
-	public static final String KEY_JDBC_DRIVER = "registry.jdbc.driver";
-	public static final String KEY_DERBY_START_ENABLE = "start.derby.server.mode";
-    public static final String VALIDATION_QUERY = "validationQuery";
-    public static final String JPA_CACHE_SIZE = "jpa.cache.size";
-    public static final String ENABLE_CACHING = "cache.enable";
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/Resource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/Resource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/Resource.java
deleted file mode 100644
index 640f771..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/Resource.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa;
-
-import org.apache.airavata.registry.cpi.RegistryException;
-
-import java.util.List;
-
-public interface Resource {
-    /**
-     * This method will create associate resource objects for the given resource type.
-     * @param type child resource type
-     * @return associate child resource
-     */
-    Resource create(ResourceType type) throws RegistryException, RegistryException;
-
-    /**
-     * This method will remove the given child resource from the database
-     * @param type child resource type
-     * @param name child resource name
-     */
-    void remove(ResourceType type, Object name) throws RegistryException;
-
-    /**
-     *  This method will return the given child resource from the database
-     * @param type child resource type
-     * @param name child resource name
-     * @return associate child resource
-     */
-    Resource get(ResourceType type, Object name) throws RegistryException;
-
-    /**
-     * This method will list all the child resources for the given resource type
-     * @param type child resource type
-     * @return list of child resources of the given child resource type
-     */
-    List<Resource> get(ResourceType type) throws RegistryException;
-
-    /**
-     * This method will saveExperiment the resource to the database.
-     */
-    void save() throws RegistryException;
-
-    /**
-     * This method will check whether an entry from the given resource type and resource name
-     * exists in the database
-     * @param type child resource type
-     * @param name child resource name
-     * @return whether the entry exists in the database or not
-     */
-    boolean isExists(ResourceType type, Object name) throws RegistryException;
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceType.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceType.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceType.java
deleted file mode 100644
index 0a38664..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceType.java
+++ /dev/null
@@ -1,49 +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.persistance.registry.jpa;
-
-public enum ResourceType {
-    GATEWAY,
-    PROJECT,
-    USER,
-    PROJECT_USER,
-    CONFIGURATION,
-    GATEWAY_WORKER,
-    EXPERIMENT,
-    NOTIFICATION_EMAIL,
-    EXPERIMENT_INPUT,
-    EXPERIMENT_OUTPUT,
-    WORKFLOW_NODE_DETAIL,
-    TASK_DETAIL,
-    ERROR_DETAIL,
-    APPLICATION_INPUT,
-    APPLICATION_OUTPUT,
-    NODE_INPUT,
-    NODE_OUTPUT,
-    JOB_DETAIL,
-    DATA_TRANSFER_DETAIL,
-    STATUS,
-    CONFIG_DATA,
-    COMPUTATIONAL_RESOURCE_SCHEDULING,
-    ADVANCE_INPUT_DATA_HANDLING,
-    ADVANCE_OUTPUT_DATA_HANDLING,
-    QOS_PARAM
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
deleted file mode 100644
index 4b6fc80..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
+++ /dev/null
@@ -1,525 +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.persistance.registry.jpa;
-
-import org.apache.airavata.persistance.registry.jpa.model.*;
-import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-import javax.persistence.Query;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class ResourceUtils {
-    private final static Logger logger = LoggerFactory.getLogger(ResourceUtils.class);
-    private static final String PERSISTENCE_UNIT_NAME = "airavata_data";
-    protected static EntityManagerFactory factory;
-
-    public static void reset(){
-    	factory=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();
-            System.out.println(connectionProperties);
-            Map<String, String> properties = new HashMap<String, String>();
-            properties.put("openjpa.ConnectionDriverName", "org.apache.commons.dbcp.BasicDataSource");
-            properties.put("openjpa.ConnectionProperties", connectionProperties);
-            properties.put("openjpa.DynamicEnhancementAgent", "true");
-            properties.put("openjpa.RuntimeUnenhancedClasses", "unsupported");
-            properties.put("openjpa.DataCache","" + Utils.isCachingEnabled() + "(CacheSize=" + Utils.getJPACacheSize() + ", SoftReferenceSize=0)");
-            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.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);
-        }
-		return factory.createEntityManager();
-    }
-
-    /**
-     * @param gatewayId
-     * @return
-     */
-    public static Resource createGateway(String gatewayId) throws RegistryException {
-        if (!isGatewayExist(gatewayId)) {
-            GatewayResource gatewayResource = new GatewayResource();
-            gatewayResource.setGatewayId(gatewayId);
-            return gatewayResource;
-        }else {
-            return getGateway(gatewayId);
-        }
-    }
-
-    public static UserResource createUser(String username, String password) throws RegistryException {
-        if (!isUserExist(username)) {
-            UserResource userResource = new UserResource();
-            userResource.setUserName(username);
-            userResource.setPassword(password);
-            return userResource;
-        }else {
-            return (UserResource)getUser(username);
-        }
-
-    }
-
-    public static Resource getGateway(String gatewayId) throws RegistryException{
-        EntityManager em = null;
-        try {
-            if (isGatewayExist(gatewayId)) {
-                em = getEntityManager();
-                Gateway gateway = em.find(Gateway.class, gatewayId);
-                GatewayResource gatewayResource = (GatewayResource)Utils.getResource(ResourceType.GATEWAY, gateway);
-                em.close();
-                return gatewayResource;
-            }
-        }catch (Exception e){
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return null;
-    }
-
-    public static void addUser (String userName, String password) throws RegistryException{
-        UserResource resource = new UserResource();
-        resource.setUserName(userName);
-        resource.setPassword(password);
-        resource.save();
-    }
-
-    public static boolean isUserExist (String username) throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = getEntityManager();
-            em.getTransaction().begin();
-            QueryGenerator generator = new QueryGenerator(AbstractResource.USERS);
-            generator.setParameter(AbstractResource.UserConstants.USERNAME, username);
-            Query q = generator.selectQuery(em);
-            int size = q.getResultList().size();
-            em.getTransaction().commit();
-            em.close();
-            return size>0;
-        } catch (Exception e){
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-
-    public static Resource getUser(String userName) throws RegistryException{
-        EntityManager em = null;
-        try {
-            if (isUserExist(userName)) {
-                em = getEntityManager();
-                Users user =  em.find(Users.class, userName);
-                UserResource userResource = (UserResource)Utils.getResource(ResourceType.USER, user);
-                em.close();
-                return userResource;
-            }
-        }catch (Exception e){
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return null;
-
-    }
-
-    public static Resource getWorker(String gatewayId, String userName) throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = getEntityManager();
-            Gateway_Worker gatewayWorker = em.find(Gateway_Worker.class, new Gateway_Worker_PK(gatewayId, userName));
-            WorkerResource workerResource = (WorkerResource) Utils.getResource(ResourceType.GATEWAY_WORKER, gatewayWorker);
-            em.close();
-            return workerResource;
-        }catch (Exception e){
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-
-
-    }
-
-
-    /**
-     * @param gatewayId
-     * @return
-     */
-    public static boolean isGatewayExist(String gatewayId) throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = getEntityManager();
-            em.getTransaction().begin();
-            QueryGenerator generator = new QueryGenerator(AbstractResource.GATEWAY);
-            generator.setParameter(AbstractResource.GatewayConstants.GATEWAY_ID, gatewayId);
-            Query q = generator.selectQuery(em);
-            int size = q.getResultList().size();
-            em.getTransaction().commit();
-            em.close();
-            return size>0;
-        }catch (Exception e){
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-
-    }
-
-    public static List<Resource> getAllGateways() throws RegistryException{
-        List<Resource> resourceList = new ArrayList<Resource>();
-        EntityManager em = null;
-        try {
-            em = getEntityManager();
-            em.getTransaction().begin();
-            QueryGenerator generator = new QueryGenerator(AbstractResource.GATEWAY);
-            Query q = generator.selectQuery(em);
-            List results = q.getResultList();
-            if (results.size() != 0) {
-                for (Object result : results) {
-                    Gateway gateway = (Gateway) result;
-                    GatewayResource gatewayResource =
-                            (GatewayResource) Utils.getResource(ResourceType.GATEWAY, gateway);
-                    resourceList.add(gatewayResource);
-                }
-            }
-            em.getTransaction().commit();
-            em.close();
-        }catch (Exception e){
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return resourceList;
-    }
-
-    /**
-     * @param gatewayId
-     * @return
-     */
-    public static boolean removeGateway(String gatewayId) {
-        EntityManager em = null;
-        try {
-            em = getEntityManager();
-            em.getTransaction().begin();
-            QueryGenerator generator = new QueryGenerator(AbstractResource.GATEWAY);
-            generator.setParameter(AbstractResource.GatewayConstants.GATEWAY_ID, gatewayId);
-            Query q = generator.deleteQuery(em);
-            q.executeUpdate();
-            em.getTransaction().commit();
-            em.close();
-            return true;
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            return false;
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     * @param gatewayResource
-     * @param userResource
-     */
-    public static WorkerResource addGatewayWorker(GatewayResource gatewayResource, UserResource userResource) throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = getEntityManager();
-            em.getTransaction().begin();
-            if (!isGatewayExist(gatewayResource.getGatewayName())){
-                gatewayResource.save();
-            }
-            if (!isUserExist(userResource.getUserName())){
-                userResource.save();
-            }
-            Gateway gateway = em.find(Gateway.class, gatewayResource.getGatewayId());
-            Users user = em.find(Users.class, userResource.getUserName());
-            Gateway_Worker gatewayWorker = new Gateway_Worker();
-            gatewayWorker.setGateway(gateway);
-            gatewayWorker.setUser(user);
-            em.persist(gatewayWorker);
-            em.getTransaction().commit();
-            em.close();
-            return (WorkerResource)Utils.getResource(ResourceType.GATEWAY_WORKER, gatewayWorker);
-        } catch (Exception e){
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     * @param gatewayResource
-     * @param userResource
-     * @return
-     */
-    public static boolean removeGatewayWorker(GatewayResource gatewayResource, UserResource userResource) {
-        EntityManager em = null;
-        try {
-            em = getEntityManager();
-            em.getTransaction().begin();
-            QueryGenerator generator = new QueryGenerator(AbstractResource.GATEWAY_WORKER);
-            generator.setParameter(AbstractResource.GatewayWorkerConstants.GATEWAY_ID,
-                    gatewayResource.getGatewayName());
-            generator.setParameter(AbstractResource.UserConstants.USERNAME, userResource.getUserName());
-            Query q = generator.deleteQuery(em);
-            q.executeUpdate();
-            em.getTransaction().commit();
-            em.close();
-            return true;
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            return false;
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-
-    }
-
-    /**
-     * @param configKey
-     * @return
-     */
-    public static List<ConfigurationResource> getConfigurations(String configKey){
-        List<ConfigurationResource> list = new ArrayList<ConfigurationResource>();
-        EntityManager em = null;
-        try {
-            em = getEntityManager();
-            em.getTransaction().begin();
-            QueryGenerator generator = new QueryGenerator(AbstractResource.CONFIGURATION);
-            generator.setParameter(AbstractResource.ConfigurationConstants.CONFIG_KEY, configKey);
-            Query q = generator.selectQuery(em);
-            List<?> resultList = q.getResultList();
-            if (resultList.size() != 0) {
-                for (Object result : resultList) {
-                    ConfigurationResource configurationResource = createConfigurationResourceObject(result);
-                    list.add(configurationResource);
-                }
-            }
-            em.getTransaction().commit();
-            em.close();
-        }catch (Exception e) {
-            logger.error(e.getMessage(), e);
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return list;
-    }
-
-    /**
-     * @param configKey
-     * @return
-     */
-    public static ConfigurationResource getConfiguration(String configKey){
-        List<ConfigurationResource> configurations = getConfigurations(configKey);
-        return (configurations != null && configurations.size() > 0) ? configurations.get(0) : null;
-    }
-
-    /**
-     * @param configKey
-     * @return
-     */
-    public static boolean isConfigurationExist(String configKey){
-        List<ConfigurationResource> configurations = getConfigurations(configKey);
-        return (configurations != null && configurations.size() > 0);
-    }
-
-    /**
-     * @param configKey
-     * @return
-     */
-    public static ConfigurationResource createConfiguration(String configKey) {
-        ConfigurationResource config = new ConfigurationResource();
-        config.setConfigKey(configKey);
-        return config;
-    }
-
-    /**
-     * @param result
-     * @return
-     */
-    private static ConfigurationResource createConfigurationResourceObject(
-            Object result) {
-        Configuration configuration = (Configuration) result;
-        ConfigurationResource configurationResource = new ConfigurationResource(configuration.getConfig_key(), configuration.getConfig_val());
-        configurationResource.setExpireDate(configuration.getExpire_date());
-        return configurationResource;
-    }
-
-    /**
-     * @param configkey
-     * @param configValue
-     */
-    public static void removeConfiguration(String configkey, String configValue) throws RegistryException{
-        QueryGenerator queryGenerator = new QueryGenerator(AbstractResource.CONFIGURATION);
-        queryGenerator.setParameter(AbstractResource.ConfigurationConstants.CONFIG_KEY, configkey);
-        queryGenerator.setParameter(AbstractResource.ConfigurationConstants.CONFIG_VAL, configValue);
-        EntityManager em = null;
-        try {
-            if(isConfigurationExists(configkey, configValue)){
-                em = getEntityManager();
-                em.getTransaction().begin();
-                Query q = queryGenerator.deleteQuery(em);
-                q.executeUpdate();
-                em.getTransaction().commit();
-                em.close();
-            }
-        }catch (Exception e){
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     * @param configkey
-     */
-    public static void removeConfiguration(String configkey) throws RegistryException{
-        QueryGenerator queryGenerator = new QueryGenerator(AbstractResource.CONFIGURATION);
-        queryGenerator.setParameter(AbstractResource.ConfigurationConstants.CONFIG_KEY, configkey);
-        EntityManager em = null;
-        try {
-            if(isConfigurationExist(configkey)){
-                em = getEntityManager();
-                em.getTransaction().begin();
-                Query q = queryGenerator.deleteQuery(em);
-                q.executeUpdate();
-                em.getTransaction().commit();
-                em.close();
-            }
-        }catch (Exception e){
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    public static boolean isConfigurationExists(String configKey, String configVal) throws RegistryException{
-        EntityManager em = null;
-        try{
-            //Currently categoryID is hardcoded value
-            em = ResourceUtils.getEntityManager();
-            Configuration existing = em.find(Configuration.class, new Configuration_PK(configKey, configVal, AbstractResource.ConfigurationConstants.CATEGORY_ID_DEFAULT_VALUE));
-            em.close();
-            return existing!= null;
-        } catch (Exception e){
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}


[31/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowNodeDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowNodeDetailResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowNodeDetailResource.java
deleted file mode 100644
index 9d2869d..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowNodeDetailResource.java
+++ /dev/null
@@ -1,473 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.*;
-import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-import org.apache.airavata.registry.cpi.utils.StatusType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.airavata.registry.cpi.RegistryException;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.List;
-
-public class WorkflowNodeDetailResource extends AbstractResource {
-    private static final Logger logger = LoggerFactory.getLogger(WorkflowNodeDetailResource.class);
-    private ExperimentResource experimentResource;
-    private String nodeInstanceId;
-    private Timestamp creationTime;
-    private String nodeName;
-    private String executionUnit;
-    private String executionUnitData;
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    public String getNodeInstanceId() {
-        return nodeInstanceId;
-    }
-
-    public void setNodeInstanceId(String nodeInstanceId) {
-        this.nodeInstanceId = nodeInstanceId;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public String getNodeName() {
-        return nodeName;
-    }
-
-    public void setNodeName(String nodeName) {
-        this.nodeName = nodeName;
-    }
-
-    public Resource create(ResourceType type) throws RegistryException{
-        switch (type){
-            case TASK_DETAIL:
-                TaskDetailResource taskDetailResource = new TaskDetailResource();
-                taskDetailResource.setWorkflowNodeDetailResource(this);
-                return taskDetailResource;
-            case ERROR_DETAIL:
-                ErrorDetailResource errorDetailResource = new ErrorDetailResource();
-                errorDetailResource.setNodeDetail(this);
-                return errorDetailResource;
-            case NODE_INPUT:
-                NodeInputResource nodeInputResource = new NodeInputResource();
-                nodeInputResource.setNodeDetailResource(this);
-                return nodeInputResource;
-            case NODE_OUTPUT:
-                NodeOutputResource nodeOutputResource = new NodeOutputResource();
-                nodeOutputResource.setNodeDetailResource(this);
-                return nodeOutputResource;
-            case STATUS:
-                StatusResource statusResource = new StatusResource();
-                statusResource.setWorkflowNodeDetail(this);
-                return statusResource;
-            default:
-                logger.error("Unsupported resource type for workflow node detail resource.", new IllegalArgumentException());
-                throw new IllegalArgumentException("Unsupported resource type for workflow node detail resource.");
-        }
-    }
-
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-            QueryGenerator generator;
-            switch (type) {
-                case TASK_DETAIL:
-                    generator = new QueryGenerator(TASK_DETAIL);
-                    generator.setParameter(TaskDetailConstants.TASK_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case ERROR_DETAIL:
-                    generator = new QueryGenerator(ERROR_DETAIL);
-                    generator.setParameter(ErrorDetailConstants.NODE_INSTANCE_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case NODE_INPUT:
-                    generator = new QueryGenerator(NODE_INPUT);
-                    generator.setParameter(NodeInputConstants.NODE_INSTANCE_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case NODE_OUTPUT:
-                    generator = new QueryGenerator(NODE_OUTPUT);
-                    generator.setParameter(NodeOutputConstants.NODE_INSTANCE_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.NODE_INSTANCE_ID, name);
-                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.WORKFLOW_NODE.toString());
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                default:
-                    logger.error("Unsupported resource type for experiment resource.", new IllegalArgumentException());
-                    break;
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    public Resource get(ResourceType type, Object name) throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            QueryGenerator generator;
-            Query q;
-            switch (type) {
-                case TASK_DETAIL:
-                    generator = new QueryGenerator(TASK_DETAIL);
-                    generator.setParameter(TaskDetailConstants.TASK_ID, name);
-                    q = generator.selectQuery(em);
-                    TaskDetail taskDetail = (TaskDetail) q.getSingleResult();
-                    TaskDetailResource taskDetailResource = (TaskDetailResource) Utils.getResource(ResourceType.TASK_DETAIL, taskDetail);
-                    em.getTransaction().commit();
-                    em.close();
-                    return taskDetailResource;
-                case ERROR_DETAIL:
-                    generator = new QueryGenerator(ERROR_DETAIL);
-                    generator.setParameter(ErrorDetailConstants.NODE_INSTANCE_ID, name);
-                    q = generator.selectQuery(em);
-                    ErrorDetail errorDetail = (ErrorDetail) q.getSingleResult();
-                    ErrorDetailResource errorDetailResource = (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
-                    em.getTransaction().commit();
-                    em.close();
-                    return errorDetailResource;
-                case NODE_INPUT:
-                    generator = new QueryGenerator(NODE_INPUT);
-                    generator.setParameter(NodeInputConstants.NODE_INSTANCE_ID, name);
-                    q = generator.selectQuery(em);
-                    NodeInput nodeInput = (NodeInput) q.getSingleResult();
-                    NodeInputResource nodeInputResource = (NodeInputResource) Utils.getResource(ResourceType.NODE_INPUT, nodeInput);
-                    em.getTransaction().commit();
-                    em.close();
-                    return nodeInputResource;
-                case NODE_OUTPUT:
-                    generator = new QueryGenerator(NODE_OUTPUT);
-                    generator.setParameter(NodeOutputConstants.NODE_INSTANCE_ID, name);
-                    q = generator.selectQuery(em);
-                    NodeOutput nodeOutput = (NodeOutput) q.getSingleResult();
-                    NodeOutputResource nodeOutputResource = (NodeOutputResource) Utils.getResource(ResourceType.NODE_OUTPUT, nodeOutput);
-                    em.getTransaction().commit();
-                    em.close();
-                    return nodeOutputResource;
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.NODE_INSTANCE_ID, name);
-                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.WORKFLOW_NODE.toString());
-                    q = generator.selectQuery(em);
-                    Status status = (Status) q.getSingleResult();
-                    StatusResource statusResource = (StatusResource) Utils.getResource(ResourceType.STATUS, status);
-                    em.getTransaction().commit();
-                    em.close();
-                    return statusResource;
-                default:
-                    em.getTransaction().commit();
-                    em.close();
-                    logger.error("Unsupported resource type for workflow node resource.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Unsupported resource type for workflow node resource.");
-            }
-        } catch (Exception e) {
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        List<Resource> resourceList = new ArrayList<Resource>();
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-            QueryGenerator generator;
-            List results;
-            switch (type) {
-                case TASK_DETAIL:
-                    generator = new QueryGenerator(TASK_DETAIL);
-                    generator.setParameter(TaskDetailConstants.NODE_INSTANCE_ID, nodeInstanceId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            TaskDetail taskDetail = (TaskDetail) result;
-                            TaskDetailResource taskDetailResource =
-                                    (TaskDetailResource) Utils.getResource(ResourceType.TASK_DETAIL, taskDetail);
-                            resourceList.add(taskDetailResource);
-                        }
-                    }
-                    break;
-                case ERROR_DETAIL:
-                    generator = new QueryGenerator(ERROR_DETAIL);
-                    generator.setParameter(ErrorDetailConstants.NODE_INSTANCE_ID, nodeInstanceId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            ErrorDetail errorDetail = (ErrorDetail) result;
-                            ErrorDetailResource errorDetailResource =
-                                    (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
-                            resourceList.add(errorDetailResource);
-                        }
-                    }
-                    break;
-                case NODE_INPUT:
-                    generator = new QueryGenerator(NODE_INPUT);
-                    generator.setParameter(NodeInputConstants.NODE_INSTANCE_ID, nodeInstanceId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            NodeInput nodeInput = (NodeInput) result;
-                            NodeInputResource nodeInputResource =
-                                    (NodeInputResource) Utils.getResource(ResourceType.NODE_INPUT, nodeInput);
-                            resourceList.add(nodeInputResource);
-                        }
-                    }
-                    break;
-                case NODE_OUTPUT:
-                    generator = new QueryGenerator(NODE_OUTPUT);
-                    generator.setParameter(NodeOutputConstants.NODE_INSTANCE_ID, nodeInstanceId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            NodeOutput nodeOutput = (NodeOutput) result;
-                            NodeOutputResource nodeOutputResource =
-                                    (NodeOutputResource) Utils.getResource(ResourceType.NODE_OUTPUT, nodeOutput);
-                            resourceList.add(nodeOutputResource);
-                        }
-                    }
-                    break;
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.NODE_INSTANCE_ID, nodeInstanceId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Status status = (Status) result;
-                            StatusResource statusResource =
-                                    (StatusResource) Utils.getResource(ResourceType.STATUS, status);
-                            resourceList.add(statusResource);
-                        }
-                    }
-                    break;
-                default:
-                    em.getTransaction().commit();
-                    em.close();
-                    logger.error("Unsupported resource type for workflow node details resource.", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-//            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return resourceList;
-    }
-
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            WorkflowNodeDetail existingNode = em.find(WorkflowNodeDetail.class, nodeInstanceId);
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            WorkflowNodeDetail workflowNodeDetail = new WorkflowNodeDetail();
-            workflowNodeDetail.setNodeId(nodeInstanceId);
-            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
-            workflowNodeDetail.setExperiment(experiment);
-            workflowNodeDetail.setExpId(experimentResource.getExpID());
-            workflowNodeDetail.setCreationTime(creationTime);
-            workflowNodeDetail.setNodeName(nodeName);
-            workflowNodeDetail.setExecutionUnit(getExecutionUnit());
-            workflowNodeDetail.setExecutionUnitData(getExecutionUnitData());
-
-            if (existingNode != null) {
-                existingNode.setExperiment(experiment);
-                existingNode.setExpId(experimentResource.getExpID());
-                existingNode.setCreationTime(creationTime);
-                existingNode.setNodeName(nodeName);
-                existingNode.setExecutionUnit(getExecutionUnit());
-                existingNode.setExecutionUnitData(getExecutionUnitData());
-                workflowNodeDetail = em.merge(existingNode);
-            } else {
-                em.persist(workflowNodeDetail);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    public List<NodeInputResource> getNodeInputs() throws RegistryException{
-        List<NodeInputResource> nodeInputResourceList = new ArrayList<NodeInputResource>();
-        List<Resource> resources = get(ResourceType.NODE_INPUT);
-        for (Resource resource : resources) {
-            NodeInputResource nodeInputResource = (NodeInputResource) resource;
-            nodeInputResourceList.add(nodeInputResource);
-        }
-        return nodeInputResourceList;
-    }
-
-    public List<NodeOutputResource> getNodeOutputs() throws RegistryException{
-        List<NodeOutputResource> outputResources = new ArrayList<NodeOutputResource>();
-        List<Resource> resources = get(ResourceType.NODE_OUTPUT);
-        for (Resource resource : resources) {
-            NodeOutputResource nodeOutputResource = (NodeOutputResource) resource;
-            outputResources.add(nodeOutputResource);
-        }
-        return outputResources;
-    }
-
-    public StatusResource getWorkflowNodeStatus() throws RegistryException{
-        List<Resource> resources = get(ResourceType.STATUS);
-        for (Resource resource : resources) {
-            StatusResource nodeStatus = (StatusResource) resource;
-            if(nodeStatus.getStatusType().equals(StatusType.WORKFLOW_NODE.toString())){
-                if (nodeStatus.getState() == null || nodeStatus.getState().equals("") ){
-                    nodeStatus.setState("UNKNOWN");
-                }
-                return nodeStatus;
-            }
-        }
-        return null;
-    }
-
-    public StatusResource getTaskStatus(String taskId) throws RegistryException{
-        List<Resource> resources = get(ResourceType.STATUS);
-        for (Resource resource : resources) {
-            StatusResource taskStatus = (StatusResource) resource;
-            if(taskStatus.getStatusType().equals(StatusType.TASK.toString()) && taskStatus.getTaskDetailResource().getTaskId().equals(taskId)){
-                if (taskStatus.getState() == null || taskStatus.getState().equals("") ){
-                    taskStatus.setState("UNKNOWN");
-                }
-                return taskStatus;
-            } 
-        }
-        return null;
-    }
-
-    public List<TaskDetailResource> getTaskDetails() throws RegistryException{
-        List<TaskDetailResource> taskDetailResources = new ArrayList<TaskDetailResource>();
-        List<Resource> resources = get(ResourceType.TASK_DETAIL);
-        for (Resource resource : resources) {
-            TaskDetailResource taskDetailResource = (TaskDetailResource) resource;
-            taskDetailResources.add(taskDetailResource);
-        }
-        return taskDetailResources;
-    }
-
-    public List<ErrorDetailResource> getErrorDetails() throws RegistryException{
-        List<ErrorDetailResource> errorDetails = new ArrayList<ErrorDetailResource>();
-        List<Resource> resources = get(ResourceType.ERROR_DETAIL);
-        for (Resource resource : resources) {
-            ErrorDetailResource errorDetailResource = (ErrorDetailResource) resource;
-            errorDetails.add(errorDetailResource);
-        }
-        return errorDetails;
-    }
-
-    public TaskDetailResource getTaskDetail(String taskId) throws RegistryException{
-        return (TaskDetailResource)get(ResourceType.TASK_DETAIL, taskId);
-    }
-
-	public String getExecutionUnit() {
-		return executionUnit;
-	}
-
-	public void setExecutionUnit(String executionUnit) {
-		this.executionUnit = executionUnit;
-	}
-
-	public String getExecutionUnitData() {
-		return executionUnitData;
-	}
-
-	public void setExecutionUnitData(String executionUnitData) {
-		this.executionUnitData = executionUnitData;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/QueryGenerator.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/QueryGenerator.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/QueryGenerator.java
deleted file mode 100644
index b0ebe45..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/QueryGenerator.java
+++ /dev/null
@@ -1,128 +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.persistance.registry.jpa.utils;
-
-import org.apache.airavata.registry.cpi.ResultOrderType;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-import java.util.HashMap;
-import java.util.Map;
-
-public class QueryGenerator {
-	private String tableName;
-	private Map<String,Object> matches=new HashMap<String, Object>();
-	private static final String SELECT_OBJ="p";
-	private static final String DELETE_OBJ="p";
-	private static final String TABLE_OBJ="p";
-//	
-//	public QueryGenerator(String tableName) {
-//		setTableName(tableName);
-//	}
-	
-	public QueryGenerator(String tableName, Object[]...params) {
-		setTableName(tableName);
-		for (Object[] param : params) {
-			addMatch(param[0].toString(), param[1]);
-		}
-	}
-	
-	public String getTableName() {
-		return tableName;
-	}
-	public void setTableName(String tableName) {
-		this.tableName = tableName;
-	}
-	public void addMatch(String colName, Object matchValue){
-		matches.put(colName, matchValue);
-	}
-	
-	public void setParameter(String colName, Object matchValue){
-		addMatch(colName, matchValue);
-	}
-
-    /**
-     * Select query
-     * @param entityManager
-     * @return
-     */
-	public Query selectQuery(EntityManager entityManager){
-        String queryString="SELECT "+ SELECT_OBJ + " FROM " +getTableName()+" "+TABLE_OBJ;
-        return generateQueryWithParameters(entityManager, queryString);
-    }
-
-    /**
-     * Select query with pagination
-     * @param entityManager
-     * @param orderByColumn
-     * @param resultOrderType
-     * @return
-     */
-    public Query selectQuery(EntityManager entityManager, String orderByColumn,
-                             ResultOrderType resultOrderType){
-        String order = (resultOrderType == ResultOrderType.ASC) ? "ASC" : "DESC";
-        String orderByClause = " ORDER BY " + SELECT_OBJ + "." + orderByColumn + " " + order;
-        String queryString="SELECT "+ SELECT_OBJ + " FROM " +getTableName()+" "+TABLE_OBJ;
-        return generateQueryWithParameters(entityManager, queryString, orderByClause);
-    }
-
-//    public Query countQuery(EntityManager entityManager){
-//        SELECT COUNT(p.host_descriptor_ID) FROM Host_Descriptor p WHERE p.gateway_name =:gate_ID and p.host_descriptor_ID =:host_desc_name")
-//        String queryString="SELECT COUNT("+ SELECT_OBJ + " FROM " +getTableName()+" "+TABLE_OBJ;
-//        return generateQueryWithParameters(entityManager, queryString);
-//    }
-	
-	public Query deleteQuery(EntityManager entityManager){
-		String queryString="Delete FROM "+getTableName()+" "+TABLE_OBJ;
-		return generateQueryWithParameters(entityManager, queryString);
-	}
-
-	private Query generateQueryWithParameters(EntityManager entityManager,
-			String queryString) {
-		return generateQueryWithParameters(entityManager, queryString, "");
-	}
-
-    private Query generateQueryWithParameters(EntityManager entityManager,
-                                              String queryString, String orderByClause) {
-        Map<String,Object> queryParameters=new HashMap<String, Object>();
-        if (matches.size()>0){
-            String matchString = "";
-            int paramCount=0;
-            for (String colName : matches.keySet()) {
-                String paramName="param"+paramCount;
-                queryParameters.put(paramName, matches.get(colName));
-                if (!matchString.equals("")){
-                    matchString+=" AND ";
-                }
-                matchString+=TABLE_OBJ+"."+colName+" =:"+paramName;
-                paramCount++;
-            }
-            queryString+=" WHERE "+matchString;
-        }
-        queryString += orderByClause;
-        Query query = entityManager.createQuery(queryString);
-        for (String paramName : queryParameters.keySet()) {
-            query.setParameter(paramName, queryParameters.get(paramName));
-        }
-        return query;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
deleted file mode 100644
index ef3152f..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
+++ /dev/null
@@ -1,714 +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.persistance.registry.jpa.utils;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.airavata.common.utils.StringUtil;
-import org.apache.airavata.model.appcatalog.appinterface.*;
-import org.apache.airavata.model.workspace.Gateway;
-import org.apache.airavata.model.workspace.Project;
-import org.apache.airavata.model.workspace.experiment.ActionableGroup;
-import org.apache.airavata.model.workspace.experiment.AdvancedInputDataHandling;
-import org.apache.airavata.model.workspace.experiment.AdvancedOutputDataHandling;
-import org.apache.airavata.model.workspace.experiment.ApplicationStatus;
-import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
-import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
-import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
-import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.model.workspace.experiment.ErrorDetails;
-import org.apache.airavata.model.workspace.experiment.ExecutionUnit;
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.model.workspace.experiment.ExperimentState;
-import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
-import org.apache.airavata.model.workspace.experiment.ExperimentSummary;
-import org.apache.airavata.model.workspace.experiment.JobDetails;
-import org.apache.airavata.model.workspace.experiment.JobState;
-import org.apache.airavata.model.workspace.experiment.JobStatus;
-import org.apache.airavata.model.workspace.experiment.QualityOfServiceParams;
-import org.apache.airavata.model.workspace.experiment.TaskDetails;
-import org.apache.airavata.model.workspace.experiment.TaskState;
-import org.apache.airavata.model.workspace.experiment.TaskStatus;
-import org.apache.airavata.model.workspace.experiment.TransferState;
-import org.apache.airavata.model.workspace.experiment.TransferStatus;
-import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
-import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
-import org.apache.airavata.model.workspace.experiment.WorkflowNodeState;
-import org.apache.airavata.model.workspace.experiment.WorkflowNodeStatus;
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ThriftDataModelConversion {
-    private final static Logger logger = LoggerFactory.getLogger(ThriftDataModelConversion.class);
-
-    public static Project getProject (ProjectResource pr) throws RegistryException {
-        if (pr != null) {
-            Project project = new Project();
-            project.setProjectId(pr.getId());
-            project.setName(pr.getName());
-            if (pr.getCreationTime()!=null) {
-				project.setCreationTime(pr.getCreationTime().getTime());
-			}
-			project.setDescription(pr.getDescription());
-            project.setOwner(pr.getWorker().getUser());
-            List<ProjectUserResource> projectUserList = pr.getProjectUserList();
-            List<String> sharedUsers = new ArrayList<String>();
-            if (projectUserList != null && !projectUserList.isEmpty()){
-                for (ProjectUserResource resource : projectUserList){
-                    sharedUsers.add(resource.getUserName());
-                }
-            }
-            project.setSharedUsers(sharedUsers);
-            return project;
-        }
-        return null;
-    }
-
-    public static Gateway getGateway (GatewayResource resource){
-        Gateway gateway = new Gateway();
-        gateway.setGatewayId(resource.getGatewayId());
-        gateway.setGatewayName(resource.getGatewayName());
-        gateway.setDomain(resource.getDomain());
-        gateway.setEmailAddress(resource.getEmailAddress());
-        return gateway;
-    }
-
-    public static List<Gateway> getAllGateways (List<Resource> gatewayList){
-        List<Gateway> gateways = new ArrayList<Gateway>();
-        for (Resource resource : gatewayList){
-            gateways.add(getGateway((GatewayResource)resource));
-        }
-        return gateways;
-    }
-
-
-    public static Experiment getExperiment(ExperimentResource experimentResource) throws RegistryException {
-        if (experimentResource != null){
-            Experiment experiment = new Experiment();
-            if (experimentResource.getProject()!= null){
-                experiment.setProjectId(experimentResource.getProject().getId());
-            }
-            experiment.setExperimentId(experimentResource.getExpID());
-            experiment.setCreationTime(experimentResource.getCreationTime().getTime());
-            experiment.setUserName(experimentResource.getExecutionUser());
-            experiment.setName(experimentResource.getExpName());
-            experiment.setDescription(experimentResource.getDescription());
-            experiment.setApplicationId(experimentResource.getApplicationId());
-            experiment.setApplicationVersion(experimentResource.getApplicationVersion());
-            experiment.setWorkflowTemplateId(experimentResource.getWorkflowTemplateId());
-            experiment.setEnableEmailNotification(experimentResource.isEnableEmailNotifications());
-            experiment.setGatewayExecutionId(experimentResource.getGatewayExecutionId());
-            if (experiment.isEnableEmailNotification()){
-                List<NotificationEmailResource> notificationEmails = experimentResource.getNotificationEmails();
-                experiment.setEmailAddresses(getEmailAddresses(notificationEmails));
-            }
-            experiment.setWorkflowTemplateVersion(experimentResource.getWorkflowTemplateVersion());
-            experiment.setWorkflowExecutionInstanceId(experimentResource.getWorkflowExecutionId());
-            List<ExperimentInputResource> experimentInputs = experimentResource.getExperimentInputs();
-            experiment.setExperimentInputs(getExpInputs(experimentInputs));
-            List<ExperimentOutputResource> experimentOutputs = experimentResource.getExperimentOutputs();
-            experiment.setExperimentOutputs(getExpOutputs(experimentOutputs));
-            StatusResource experimentStatus = experimentResource.getExperimentStatus();
-            if (experimentStatus != null){
-                experiment.setExperimentStatus(getExperimentStatus(experimentStatus));
-            }
-            List<StatusResource> changeList = experimentResource.getWorkflowNodeStatuses();
-            if (changeList != null && !changeList.isEmpty()){
-                experiment.setStateChangeList(getWorkflowNodeStatusList(changeList));
-            }
-
-            List<WorkflowNodeDetailResource> workflowNodeDetails = experimentResource.getWorkflowNodeDetails();
-            if (workflowNodeDetails != null && !workflowNodeDetails.isEmpty()){
-                experiment.setWorkflowNodeDetailsList(getWfNodeList(workflowNodeDetails));
-            }
-            List<ErrorDetailResource> errorDetails = experimentResource.getErrorDetails();
-            if (errorDetails!= null && !errorDetails.isEmpty()){
-                experiment.setErrors(getErrorDetailList(errorDetails));
-            }
-            String expID = experimentResource.getExpID();
-            if (experimentResource.isExists(ResourceType.CONFIG_DATA, expID)){
-                ConfigDataResource userConfigData = experimentResource.getUserConfigData(expID);
-                experiment.setUserConfigurationData(getUserConfigData(userConfigData));
-            }
-            return experiment;
-        }
-        return null;
-    }
-
-    public static ExperimentSummary getExperimentSummary(ExperimentResource experimentResource) throws RegistryException {
-        if (experimentResource != null){
-            ExperimentSummary experimentSummary = new ExperimentSummary();
-            if (experimentResource.getProject()!= null){
-                experimentSummary.setProjectId(experimentResource.getProject().getId());
-            }
-            experimentSummary.setExperimentId(experimentResource.getExpID());
-            experimentSummary.setCreationTime(experimentResource.getCreationTime().getTime());
-            experimentSummary.setUserName(experimentResource.getExecutionUser());
-            experimentSummary.setName(experimentResource.getExpName());
-            experimentSummary.setDescription(experimentResource.getDescription());
-            experimentSummary.setApplicationId(experimentResource.getApplicationId());
-            StatusResource experimentStatus = experimentResource.getExperimentStatus();
-            if (experimentStatus != null){
-                experimentSummary.setExperimentStatus(getExperimentStatus(experimentStatus));
-            }
-            List<ErrorDetailResource> errorDetails = experimentResource.getErrorDetails();
-            if (errorDetails!= null && !errorDetails.isEmpty()){
-                experimentSummary.setErrors(getErrorDetailList(errorDetails));
-            }
-            return experimentSummary;
-        }
-        return null;
-    }
-
-    public static InputDataObjectType getInput(Object object){
-        if (object != null){
-            InputDataObjectType dataObjectType = new InputDataObjectType();
-            if (object instanceof  ExperimentInputResource){
-                ExperimentInputResource expInput = (ExperimentInputResource) object;
-                dataObjectType.setName(expInput.getExperimentKey());
-                dataObjectType.setValue(expInput.getValue());
-                if (expInput.getDataType() != null){
-                    dataObjectType.setType(DataType.valueOf(expInput.getDataType()));
-                }
-                dataObjectType.setMetaData(expInput.getMetadata());
-                dataObjectType.setApplicationArgument(expInput.getAppArgument());
-                dataObjectType.setStandardInput(expInput.isStandardInput());
-                dataObjectType.setUserFriendlyDescription(expInput.getUserFriendlyDesc());
-                dataObjectType.setInputOrder(expInput.getInputOrder());
-                dataObjectType.setIsRequired(expInput.getRequired());
-                dataObjectType.setRequiredToAddedToCommandLine(expInput.getRequiredToCMD());
-                dataObjectType.setDataStaged(expInput.isDataStaged());
-                return dataObjectType;
-            }else if (object instanceof NodeInputResource){
-                NodeInputResource nodeInputResource = (NodeInputResource)object;
-                dataObjectType.setName(nodeInputResource.getInputKey());
-                dataObjectType.setValue(nodeInputResource.getValue());
-                if (nodeInputResource.getDataType() != null){
-                    dataObjectType.setType(DataType.valueOf(nodeInputResource.getDataType()));
-                }
-                dataObjectType.setMetaData(nodeInputResource.getMetadata());
-                dataObjectType.setApplicationArgument(nodeInputResource.getAppArgument());
-                dataObjectType.setStandardInput(nodeInputResource.isStandardInput());
-                dataObjectType.setUserFriendlyDescription(nodeInputResource.getUserFriendlyDesc());
-                dataObjectType.setInputOrder(nodeInputResource.getInputOrder());
-                dataObjectType.setIsRequired(nodeInputResource.getRequired());
-                dataObjectType.setRequiredToAddedToCommandLine(nodeInputResource.getRequiredToCMD());
-                dataObjectType.setDataStaged(nodeInputResource.isDataStaged());
-                return dataObjectType;
-            }else if (object instanceof ApplicationInputResource){
-                ApplicationInputResource inputResource = (ApplicationInputResource)object;
-                dataObjectType.setName(inputResource.getInputKey());
-                dataObjectType.setValue(inputResource.getValue());
-                if (inputResource.getDataType() != null){
-                    dataObjectType.setType(DataType.valueOf(inputResource.getDataType()));
-                }
-                dataObjectType.setMetaData(inputResource.getMetadata());
-                dataObjectType.setApplicationArgument(inputResource.getAppArgument());
-                dataObjectType.setStandardInput(inputResource.isStandardInput());
-                dataObjectType.setUserFriendlyDescription(inputResource.getUserFriendlyDesc());
-                dataObjectType.setInputOrder(inputResource.getInputOrder());
-                dataObjectType.setIsRequired(inputResource.isRequired());
-                dataObjectType.setRequiredToAddedToCommandLine(inputResource.isRequiredToCMD());
-                dataObjectType.setDataStaged(inputResource.isDataStaged());
-                return dataObjectType;
-            }else {
-                return null;
-            }
-        }
-        return null;
-    }
-
-    public static OutputDataObjectType getOutput(Object object){
-        if (object != null){
-            OutputDataObjectType dataObjectType = new OutputDataObjectType();
-            if (object instanceof ExperimentOutputResource){
-                ExperimentOutputResource expOutput = (ExperimentOutputResource)object;
-                dataObjectType.setName(expOutput.getExperimentKey());
-                dataObjectType.setValue(expOutput.getValue());
-                if (expOutput.getDataType() != null){
-                    dataObjectType.setType(DataType.valueOf(expOutput.getDataType()));
-                }
-                dataObjectType.setIsRequired(expOutput.getRequired());
-                dataObjectType.setRequiredToAddedToCommandLine(expOutput.getRequiredToCMD());
-                dataObjectType.setDataMovement(expOutput.isDataMovement());
-                dataObjectType.setLocation(expOutput.getDataNameLocation());
-                dataObjectType.setSearchQuery(expOutput.getSearchQuery());
-                dataObjectType.setApplicationArgument(expOutput.getAppArgument());
-                return dataObjectType;
-            }else if (object instanceof NodeOutputResource){
-                NodeOutputResource nodeOutputResource = (NodeOutputResource)object;
-                dataObjectType.setName(nodeOutputResource.getOutputKey());
-                dataObjectType.setValue(nodeOutputResource.getValue());
-                if (nodeOutputResource.getDataType() != null){
-                    dataObjectType.setType(DataType.valueOf(nodeOutputResource.getDataType()));
-                }
-                dataObjectType.setIsRequired(nodeOutputResource.getRequired());
-                dataObjectType.setRequiredToAddedToCommandLine(nodeOutputResource.getRequiredToCMD());
-                dataObjectType.setDataMovement(nodeOutputResource.isDataMovement());
-                dataObjectType.setLocation(nodeOutputResource.getDataNameLocation());
-                dataObjectType.setSearchQuery(nodeOutputResource.getSearchQuery());
-                dataObjectType.setApplicationArgument(nodeOutputResource.getAppArgument());
-                return dataObjectType;
-            }else if (object instanceof ApplicationOutputResource){
-                ApplicationOutputResource outputResource = (ApplicationOutputResource)object;
-                dataObjectType.setName(outputResource.getOutputKey());
-                dataObjectType.setValue(outputResource.getValue());
-                dataObjectType.setIsRequired(outputResource.isRequired());
-                dataObjectType.setRequiredToAddedToCommandLine(outputResource.isRequiredToCMD());
-                if (outputResource.getDataType() != null){
-                    dataObjectType.setType(DataType.valueOf(outputResource.getDataType()));
-                }
-                dataObjectType.setDataMovement(outputResource.isDataMovement());
-                dataObjectType.setLocation(outputResource.getDataNameLocation());
-                dataObjectType.setSearchQuery(outputResource.getSearchQuery());
-                dataObjectType.setApplicationArgument(outputResource.getAppArgument());
-                return dataObjectType;
-            }else {
-                return null;
-            }
-        }
-        return null;
-    }
-
-    public static List<String> getEmailAddresses (List<NotificationEmailResource> resourceList){
-        List<String> emailAddresses = new ArrayList<String>();
-        if (resourceList != null && !resourceList.isEmpty()){
-            for (NotificationEmailResource emailResource : resourceList){
-                emailAddresses.add(emailResource.getEmailAddress());
-            }
-        }
-        return emailAddresses;
-    }
-
-    public static List<InputDataObjectType> getExpInputs (List<ExperimentInputResource> exInputList){
-        List<InputDataObjectType> expInputs = new ArrayList<InputDataObjectType>();
-        if (exInputList != null && !exInputList.isEmpty()){
-            for (ExperimentInputResource inputResource : exInputList){
-                InputDataObjectType exInput = getInput(inputResource);
-                expInputs.add(exInput);
-            }
-        }
-        return expInputs;
-    }
-
-    public static List<OutputDataObjectType> getExpOutputs (List<ExperimentOutputResource> experimentOutputResourceList){
-        List<OutputDataObjectType> exOutputs = new ArrayList<OutputDataObjectType>();
-        if (experimentOutputResourceList != null && !experimentOutputResourceList.isEmpty()){
-            for (ExperimentOutputResource outputResource : experimentOutputResourceList){
-                OutputDataObjectType output = getOutput(outputResource);
-                exOutputs.add(output);
-            }
-        }
-        return exOutputs;
-    }
-
-    public static List<InputDataObjectType> getNodeInputs (List<NodeInputResource> nodeInputResources){
-        List<InputDataObjectType> nodeInputs = new ArrayList<InputDataObjectType>();
-        if (nodeInputResources != null && !nodeInputResources.isEmpty()){
-            for (NodeInputResource inputResource : nodeInputResources){
-                InputDataObjectType nodeInput = getInput(inputResource);
-                nodeInputs.add(nodeInput);
-            }
-        }
-        return nodeInputs;
-    }
-
-    public static List<OutputDataObjectType> getNodeOutputs (List<NodeOutputResource> nodeOutputResourceList){
-        List<OutputDataObjectType> nodeOutputs = new ArrayList<OutputDataObjectType>();
-        if (nodeOutputResourceList != null && !nodeOutputResourceList.isEmpty()){
-            for (NodeOutputResource outputResource : nodeOutputResourceList){
-                OutputDataObjectType output = getOutput(outputResource);
-                nodeOutputs.add(output);
-            }
-        }
-        return nodeOutputs;
-    }
-
-    public static List<InputDataObjectType> getApplicationInputs (List<ApplicationInputResource> applicationInputResources){
-        List<InputDataObjectType> appInputs = new ArrayList<InputDataObjectType>();
-        if (applicationInputResources != null && !applicationInputResources.isEmpty()){
-            for (ApplicationInputResource inputResource : applicationInputResources){
-                InputDataObjectType appInput = getInput(inputResource);
-                appInputs.add(appInput);
-            }
-        }
-        return appInputs;
-    }
-
-    public static List<OutputDataObjectType> getApplicationOutputs (List<ApplicationOutputResource> outputResources){
-        List<OutputDataObjectType> appOutputs = new ArrayList<OutputDataObjectType>();
-        if (outputResources != null && !outputResources.isEmpty()){
-            for (ApplicationOutputResource outputResource : outputResources){
-                OutputDataObjectType output = getOutput(outputResource);
-                appOutputs.add(output);
-            }
-        }
-        return appOutputs;
-    }
-
-    public static ExperimentStatus getExperimentStatus(StatusResource status){
-        if (status != null){
-            ExperimentStatus experimentStatus = new ExperimentStatus();
-            if (status.getState() == null || status.getState().equals("")){
-                status.setState("UNKNOWN");
-            }
-            experimentStatus.setExperimentState(ExperimentState.valueOf(status.getState()));
-            experimentStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
-            return experimentStatus;
-        }
-        return null;
-    }
-
-    public static WorkflowNodeStatus getWorkflowNodeStatus (StatusResource status){
-        if (status != null){
-            WorkflowNodeStatus workflowNodeStatus = new WorkflowNodeStatus();
-            if (status.getState() == null || status.getState().equals("")){
-                status.setState("UNKNOWN");
-            }
-            workflowNodeStatus.setWorkflowNodeState(WorkflowNodeState.valueOf(status.getState()));
-            workflowNodeStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
-            return workflowNodeStatus;
-        }
-        return null;
-    }
-
-    public static TaskStatus getTaskStatus (StatusResource status){
-        if (status != null){
-            TaskStatus taskStatus = new TaskStatus();
-            if (status.getState() == null || status.getState().equals("")){
-                status.setState("UNKNOWN");
-            }
-            taskStatus.setExecutionState(TaskState.valueOf(status.getState()));
-            taskStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
-            return taskStatus;
-        }
-        return null;
-    }
-
-    public static JobStatus getJobStatus (StatusResource status){
-        if (status != null){
-            JobStatus jobStatus = new JobStatus();
-            if (status.getState() == null || status.getState().equals("")){
-                status.setState("UNKNOWN");
-            }
-            jobStatus.setJobState(JobState.valueOf(status.getState()));
-            jobStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
-            return jobStatus;
-        }
-        return null;
-    }
-
-    public static TransferStatus getTransferStatus (StatusResource status){
-        if (status != null){
-            TransferStatus transferStatus = new TransferStatus();
-            if (status.getState() == null || status.getState().equals("")){
-                status.setState("UNKNOWN");
-            }
-            transferStatus.setTransferState(TransferState.valueOf(status.getState()));
-            transferStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
-            return transferStatus;
-        }
-        return null;
-    }
-
-    public static ApplicationStatus getApplicationStatus (StatusResource status){
-        if (status != null){
-            ApplicationStatus applicationStatus = new ApplicationStatus();
-            if (status.getState() == null || status.getState().equals("")){
-                status.setState("UNKNOWN");
-            }
-            applicationStatus.setApplicationState(status.getState());
-            applicationStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
-            return applicationStatus;
-        }
-        return null;
-    }
-
-    public static List<WorkflowNodeStatus> getWorkflowNodeStatusList(List<StatusResource> statuses){
-        List<WorkflowNodeStatus> wfNodeStatuses = new ArrayList<WorkflowNodeStatus>();
-        if (statuses != null && !statuses.isEmpty()){
-            for (StatusResource statusResource : statuses){
-                wfNodeStatuses.add(getWorkflowNodeStatus(statusResource));
-            }
-        }
-        return wfNodeStatuses;
-    }
-
-    public static WorkflowNodeDetails getWorkflowNodeDetails(WorkflowNodeDetailResource nodeDetailResource) throws RegistryException {
-        if (nodeDetailResource != null){
-            WorkflowNodeDetails wfNode = new WorkflowNodeDetails();
-            wfNode.setNodeInstanceId(nodeDetailResource.getNodeInstanceId());
-            wfNode.setCreationTime(nodeDetailResource.getCreationTime().getTime());
-            wfNode.setNodeName(nodeDetailResource.getNodeName());
-            List<NodeInputResource> nodeInputs = nodeDetailResource.getNodeInputs();
-            wfNode.setNodeInputs(getNodeInputs(nodeInputs));
-            List<NodeOutputResource> nodeOutputs = nodeDetailResource.getNodeOutputs();
-            wfNode.setNodeOutputs(getNodeOutputs(nodeOutputs));
-            List<TaskDetailResource> taskDetails = nodeDetailResource.getTaskDetails();
-            wfNode.setTaskDetailsList(getTaskDetailsList(taskDetails));
-            wfNode.setWorkflowNodeStatus(getWorkflowNodeStatus(nodeDetailResource.getWorkflowNodeStatus()));
-            List<ErrorDetailResource> errorDetails = nodeDetailResource.getErrorDetails();
-            wfNode.setErrors(getErrorDetailList(errorDetails));
-            wfNode.setExecutionUnit(ExecutionUnit.valueOf(nodeDetailResource.getExecutionUnit()));
-            wfNode.setExecutionUnitData(nodeDetailResource.getExecutionUnitData());
-            return wfNode;
-        }
-        return null;
-    }
-
-    public static List<WorkflowNodeDetails> getWfNodeList (List<WorkflowNodeDetailResource> resources) throws RegistryException {
-        List<WorkflowNodeDetails> workflowNodeDetailsList = new ArrayList<WorkflowNodeDetails>();
-        if (resources != null && !resources.isEmpty()){
-            for (WorkflowNodeDetailResource resource : resources){
-                workflowNodeDetailsList.add(getWorkflowNodeDetails(resource));
-            }
-        }
-        return workflowNodeDetailsList;
-    }
-
-    public static TaskDetails getTaskDetail (TaskDetailResource taskDetailResource) throws RegistryException {
-        if (taskDetailResource != null){
-            TaskDetails taskDetails = new TaskDetails();
-            String taskId = taskDetailResource.getTaskId();
-            taskDetails.setTaskId(taskId);
-            taskDetails.setApplicationId(taskDetailResource.getApplicationId());
-            taskDetails.setApplicationVersion(taskDetailResource.getApplicationVersion());
-            List<ApplicationInputResource> applicationInputs = taskDetailResource.getApplicationInputs();
-            taskDetails.setApplicationInputs(getApplicationInputs(applicationInputs));
-            List<ApplicationOutputResource> applicationOutputs = taskDetailResource.getApplicationOutputs();
-            taskDetails.setApplicationOutputs(getApplicationOutputs(applicationOutputs));
-            taskDetails.setEnableEmailNotification(taskDetailResource.isEnableEmailNotifications());
-            if (taskDetails.isEnableEmailNotification()){
-                List<NotificationEmailResource> notificationEmails = taskDetailResource.getNotificationEmails();
-                taskDetails.setEmailAddresses(getEmailAddresses(notificationEmails));
-            }
-            taskDetails.setApplicationDeploymentId(taskDetailResource.getApplicationDeploymentId());
-            if (taskDetailResource.isExists(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING, taskId)){
-                ComputationSchedulingResource computationScheduling = taskDetailResource.getComputationScheduling(taskId);
-                taskDetails.setTaskScheduling(getComputationalResourceScheduling(computationScheduling));
-            }
-
-            if (taskDetailResource.isExists(ResourceType.ADVANCE_INPUT_DATA_HANDLING, taskId)){
-                AdvanceInputDataHandlingResource inputDataHandling = taskDetailResource.getInputDataHandling(taskId);
-                taskDetails.setAdvancedInputDataHandling(getAdvanceInputDataHandling(inputDataHandling));
-            }
-
-            if (taskDetailResource.isExists(ResourceType.ADVANCE_OUTPUT_DATA_HANDLING, taskId)){
-                AdvancedOutputDataHandlingResource outputDataHandling = taskDetailResource.getOutputDataHandling(taskId);
-                taskDetails.setAdvancedOutputDataHandling(getAdvanceOutputDataHandling(outputDataHandling));
-            }
-
-            taskDetails.setTaskStatus(getTaskStatus(taskDetailResource.getTaskStatus()));
-            List<JobDetailResource> jobDetailList = taskDetailResource.getJobDetailList();
-            taskDetails.setJobDetailsList(getJobDetailsList(jobDetailList));
-            taskDetails.setErrors(getErrorDetailList(taskDetailResource.getErrorDetailList()));
-            taskDetails.setDataTransferDetailsList(getDataTransferlList(taskDetailResource.getDataTransferDetailList()));
-            return taskDetails;
-        }
-        return null;
-    }
-
-    public static List<TaskDetails> getTaskDetailsList (List<TaskDetailResource> resources) throws RegistryException {
-        List<TaskDetails> taskDetailsList = new ArrayList<TaskDetails>();
-        if (resources != null && !resources.isEmpty()){
-            for (TaskDetailResource resource : resources){
-                taskDetailsList.add(getTaskDetail(resource));
-            }
-        }
-        return taskDetailsList;
-    }
-
-    public static List<JobDetails> getJobDetailsList(List<JobDetailResource> jobs) throws RegistryException {
-        List<JobDetails> jobDetailsList = new ArrayList<JobDetails>();
-        if (jobs != null && !jobs.isEmpty()){
-            for (JobDetailResource resource : jobs){
-                jobDetailsList.add(getJobDetail(resource));
-            }
-        }
-        return jobDetailsList;
-    }
-
-
-    public static JobDetails getJobDetail(JobDetailResource jobDetailResource) throws RegistryException {
-        if (jobDetailResource != null){
-            JobDetails jobDetails = new JobDetails();
-            jobDetails.setJobId(jobDetailResource.getJobId());
-            jobDetails.setJobDescription(jobDetailResource.getJobDescription());
-            jobDetails.setCreationTime(jobDetailResource.getCreationTime().getTime());
-            StatusResource jobStatus = jobDetailResource.getJobStatus();
-            jobDetails.setJobStatus(getJobStatus(jobStatus));
-            jobDetails.setJobName(jobDetailResource.getJobName());
-            jobDetails.setWorkingDir(jobDetailResource.getWorkingDir());
-            StatusResource applicationStatus = jobDetailResource.getApplicationStatus();
-            jobDetails.setApplicationStatus(getApplicationStatus(applicationStatus));
-            List<ErrorDetailResource> errorDetails = jobDetailResource.getErrorDetails();
-            jobDetails.setErrors(getErrorDetailList(errorDetails));
-            jobDetails.setComputeResourceConsumed(jobDetailResource.getComputeResourceConsumed());
-            return jobDetails;
-        }
-        return null;
-    }
-
-    public static ErrorDetails getErrorDetails (ErrorDetailResource resource){
-        if (resource != null){
-            ErrorDetails errorDetails = new ErrorDetails();
-            errorDetails.setErrorId(String.valueOf(resource.getErrorId()));
-            errorDetails.setCreationTime(resource.getCreationTime().getTime());
-            errorDetails.setActualErrorMessage(resource.getActualErrorMsg());
-            errorDetails.setUserFriendlyMessage(resource.getUserFriendlyErrorMsg());
-            errorDetails.setErrorCategory(ErrorCategory.valueOf(resource.getErrorCategory()));
-            errorDetails.setTransientOrPersistent(resource.isTransientPersistent());
-            errorDetails.setCorrectiveAction(CorrectiveAction.valueOf(resource.getCorrectiveAction()));
-            errorDetails.setActionableGroup(ActionableGroup.valueOf(resource.getActionableGroup()));
-            return errorDetails;
-        }
-        return null;
-    }
-
-    public static List<ErrorDetails> getErrorDetailList (List<ErrorDetailResource> errorDetailResources){
-        List<ErrorDetails> errorDetailsList = new ArrayList<ErrorDetails>();
-        if (errorDetailResources != null && !errorDetailResources.isEmpty()){
-            for (ErrorDetailResource errorDetailResource : errorDetailResources){
-                errorDetailsList.add(getErrorDetails(errorDetailResource));
-            }
-        }
-        return errorDetailsList;
-    }
-
-    public static DataTransferDetails getDataTransferDetail (DataTransferDetailResource resource) throws RegistryException {
-        if (resource != null){
-            DataTransferDetails details = new DataTransferDetails();
-            details.setTransferId(resource.getTransferId());
-            details.setCreationTime(resource.getCreationTime().getTime());
-            details.setTransferDescription(resource.getTransferDescription());
-            details.setTransferStatus(getTransferStatus(resource.getDataTransferStatus()));
-            return details;
-        }
-        return null;
-    }
-
-    public static List<DataTransferDetails> getDataTransferlList (List<DataTransferDetailResource> resources) throws RegistryException {
-        List<DataTransferDetails> transferDetailsList = new ArrayList<DataTransferDetails>();
-        if (resources != null && !resources.isEmpty()){
-            for (DataTransferDetailResource resource : resources){
-                transferDetailsList.add(getDataTransferDetail(resource));
-            }
-        }
-        return transferDetailsList;
-    }
-
-
-    public static UserConfigurationData getUserConfigData (ConfigDataResource resource) throws RegistryException {
-        if (resource != null){
-            UserConfigurationData data = new UserConfigurationData();
-            data.setAiravataAutoSchedule(resource.isAiravataAutoSchedule());
-            data.setOverrideManualScheduledParams(resource.isOverrideManualParams());
-            data.setShareExperimentPublicly(resource.isShareExp());
-            data.setUserDn(resource.getUserDn());
-            data.setGenerateCert(resource.isGenerateCert());
-            ExperimentResource experimentResource = resource.getExperimentResource();
-            String expID = experimentResource.getExpID();
-            if (experimentResource.isExists(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING, expID)){
-                ComputationSchedulingResource computationScheduling = experimentResource.getComputationScheduling(expID);
-                data.setComputationalResourceScheduling(getComputationalResourceScheduling(computationScheduling));
-            }
-
-            if (experimentResource.isExists(ResourceType.ADVANCE_INPUT_DATA_HANDLING, expID)){
-                AdvanceInputDataHandlingResource inputDataHandling = experimentResource.getInputDataHandling(expID);
-                data.setAdvanceInputDataHandling(getAdvanceInputDataHandling(inputDataHandling));
-            }
-
-            if (experimentResource.isExists(ResourceType.ADVANCE_OUTPUT_DATA_HANDLING, expID)){
-                AdvancedOutputDataHandlingResource outputDataHandling = experimentResource.getOutputDataHandling(expID);
-                data.setAdvanceOutputDataHandling(getAdvanceOutputDataHandling(outputDataHandling));
-            }
-
-            if (experimentResource.isExists(ResourceType.QOS_PARAM, expID)){
-                QosParamResource qoSparams = experimentResource.getQOSparams(expID);
-                data.setQosParams(getQOSParams(qoSparams));
-            }
-            return data;
-        }
-        return null;
-    }
-
-
-    public static ComputationalResourceScheduling getComputationalResourceScheduling (ComputationSchedulingResource csr){
-        if (csr != null){
-            ComputationalResourceScheduling scheduling = new ComputationalResourceScheduling();
-            scheduling.setResourceHostId(csr.getResourceHostId());
-            scheduling.setTotalCpuCount(csr.getCpuCount());
-            scheduling.setNodeCount(csr.getNodeCount());
-            scheduling.setNumberOfThreads(csr.getNumberOfThreads());
-            scheduling.setQueueName(csr.getQueueName());
-            scheduling.setWallTimeLimit(csr.getWalltimeLimit());
-            scheduling.setJobStartTime((int)csr.getJobStartTime().getTime());
-            scheduling.setTotalPhysicalMemory(csr.getPhysicalMemory());
-            scheduling.setComputationalProjectAccount(csr.getProjectName());
-            scheduling.setChassisName(csr.getChessisName());
-            return scheduling;
-        }
-        return null;
-    }
-
-    public static AdvancedInputDataHandling getAdvanceInputDataHandling(AdvanceInputDataHandlingResource adhr){
-        if (adhr != null){
-            AdvancedInputDataHandling adih = new AdvancedInputDataHandling();
-            adih.setStageInputFilesToWorkingDir(adhr.isStageInputFiles());
-            adih.setParentWorkingDirectory(adhr.getWorkingDirParent());
-            adih.setUniqueWorkingDirectory(adhr.getWorkingDir());
-            adih.setCleanUpWorkingDirAfterJob(adhr.isCleanAfterJob());
-            return adih;
-        }
-        return null;
-    }
-
-    public static AdvancedOutputDataHandling getAdvanceOutputDataHandling(AdvancedOutputDataHandlingResource adodh){
-        if (adodh != null){
-            AdvancedOutputDataHandling outputDataHandling = new AdvancedOutputDataHandling();
-            outputDataHandling.setOutputDataDir(adodh.getOutputDataDir());
-            outputDataHandling.setDataRegistryURL(adodh.getDataRegUrl());
-            outputDataHandling.setPersistOutputData(adodh.isPersistOutputData());
-            return outputDataHandling;
-        }
-        return null;
-    }
-
-    public static QualityOfServiceParams getQOSParams (QosParamResource qos){
-        if (qos != null){
-            QualityOfServiceParams qosParams = new QualityOfServiceParams();
-            qosParams.setStartExecutionAt(qos.getStartExecutionAt());
-            qosParams.setExecuteBefore(qos.getExecuteBefore());
-            qosParams.setNumberofRetries(qos.getNoOfRetries());
-            return qosParams;
-        }
-        return null;
-    }
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/Test.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/Test.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/Test.java
new file mode 100644
index 0000000..cb935e1
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/Test.java
@@ -0,0 +1,79 @@
+/*
+ *
+ * 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.persistance.registry.mongo;
+
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.persistance.registry.mongo.impl.RegistryFactory;
+import org.apache.airavata.persistance.registry.mongo.dao.ExperimentDao;
+import org.apache.airavata.persistance.registry.mongo.utils.MongoUtil;
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.RegistryModelType;
+import org.junit.Assert;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+
+public class Test {
+    private final static Logger logger = LoggerFactory.getLogger(Test.class);
+
+    public static void main(String[] args) throws RegistryException, IOException {
+        Registry registry = RegistryFactory.getDefaultRegistry();
+//        String experiemtnId = "SLM-Espresso-Stampede_45667ea8-aae3-4a8e-807d-a16312035c35";
+//        long time1 = System.currentTimeMillis();
+//        Experiment experiement = (Experiment) registry.getExperiment(RegistryModelType.EXPERIMENT, experiemtnId);
+//        long time2 = System.currentTimeMillis();
+//        System.out.println(time2-time1);
+//
+//        ExperimentDao experimentDao = new ExperimentDao();
+//        experimentDao.createExperiment(experiement);
+//        time1 = System.currentTimeMillis();
+//        Experiment persistedExperiment = experimentDao.getExperiment(experiement.getExperimentId());
+//        time2 = System.currentTimeMillis();
+//        System.out.println(time2-time1);
+//
+//        Assert.assertEquals(experiement, persistedExperiment);
+
+        MongoUtil.dropAiravataRegistry();
+
+        ExperimentDao experimentDao = new ExperimentDao();
+        BufferedReader reader = new BufferedReader(new FileReader("/home/supun/Downloads/EXPERIMENT.csv"));
+        String temp = reader.readLine();
+        int i = 1;
+        while(temp != null && !temp.isEmpty()){
+            try{
+                Experiment experiement = (Experiment) registry.get(RegistryModelType.EXPERIMENT, temp.trim());
+                experimentDao.createExperiment(experiement);
+                Experiment persistedExperiment = experimentDao.getExperiment(experiement.getExperimentId());
+                Assert.assertEquals(experiement, persistedExperiment);
+                System.out.println(i+" :"+experiement.getExperimentId());
+                i++;
+            }catch (Exception e){
+                System.out.println(temp);
+                e.printStackTrace();
+            }
+            temp = reader.readLine();
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/AbstractThriftDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/AbstractThriftDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/AbstractThriftDeserializer.java
new file mode 100644
index 0000000..e6774d8
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/AbstractThriftDeserializer.java
@@ -0,0 +1,152 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.*;
+import com.fasterxml.jackson.databind.node.JsonNodeType;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.fasterxml.jackson.databind.type.TypeFactory;
+import com.google.common.base.CaseFormat;
+import org.apache.thrift.TBase;
+import org.apache.thrift.TException;
+import org.apache.thrift.TFieldIdEnum;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.lang.reflect.ParameterizedType;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * This abstract class represents a generic de-serializer for converting JSON to Thrift-based entities.
+ *
+ * @param <E> An implementation of the {@link org.apache.thrift.TFieldIdEnum} interface.
+ * @param <T> An implementation of the {@link org.apache.thrift.TBase} interface.
+ */
+public abstract class AbstractThriftDeserializer<E extends TFieldIdEnum, T extends TBase<T, E>> extends JsonDeserializer<T> {
+
+    private static Logger log = LoggerFactory.getLogger(AbstractThriftDeserializer.class);
+
+    @Override
+    public T deserialize(final JsonParser jp, final DeserializationContext ctxt) throws IOException, JsonProcessingException {
+        final T instance = newInstance();
+        final ObjectMapper mapper = (ObjectMapper)jp.getCodec();
+        final ObjectNode rootNode = (ObjectNode)mapper.readTree(jp);
+        final Iterator<Map.Entry<String, JsonNode>> iterator = rootNode.fields();
+
+        while(iterator.hasNext()) {
+            final Map.Entry<String, JsonNode> currentField = iterator.next();
+            try {
+                /*
+                 * If the current node is not a null value, process it.  Otherwise,
+                 * skip it.  Jackson will treat the null as a 0 for primitive
+                 * number types, which in turn will make Thrift think the field
+                 * has been set. Also we ignore the MongoDB specific _id field
+                 */
+                if(!currentField.getKey().equalsIgnoreCase("_id")
+                        && currentField.getValue().getNodeType() != JsonNodeType.NULL) {
+                    final E field = getField(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_UNDERSCORE, currentField.getKey()));
+                    final JsonParser parser = currentField.getValue().traverse();
+                    parser.setCodec(mapper);
+                    final Object value = mapper.readValue(parser, generateValueType(instance, field));
+                    if(value != null) {
+                        log.debug(String.format("Field %s produced value %s of type %s.",
+                                currentField.getKey(), value, value.getClass().getName()));
+                        instance.setFieldValue(field, value);
+                    } else {
+                        log.debug("Field {} contains a null value.  Skipping...", currentField.getKey());
+                    }
+                } else {
+                    log.debug("Field {} contains a null value.  Skipping...", currentField.getKey());
+                }
+            } catch (final NoSuchFieldException | IllegalArgumentException e) {
+                log.error("Unable to de-serialize field '{}'.", currentField.getKey(), e);
+                ctxt.mappingException(e.getMessage());
+            }
+        }
+
+        try {
+            // Validate that the instance contains all required fields.
+            validate(instance);
+        } catch (final TException e) {
+            log.error(String.format("Unable to deserialize JSON '%s' to type '%s'.",
+                    jp.getValueAsString(), instance.getClass().getName(), e));
+            ctxt.mappingException(e.getMessage());
+        }
+
+        return instance;
+    }
+
+    /**
+     * Returns the {@code <E>} enumerated value that represents the target
+     * field in the Thrift entity referenced in the JSON document.
+     * @param fieldName The name of the Thrift entity target field.
+     * @return The {@code <E>} enumerated value that represents the target
+     *   field in the Thrift entity referenced in the JSON document.
+     */
+    protected abstract E getField(String fieldName);
+
+    /**
+     * Creates a new instance of the Thrift entity class represented by this deserializer.
+     * @return A new instance of the Thrift entity class represented by this deserializer.
+     */
+    protected abstract T newInstance();
+
+    /**
+     * Validates that the Thrift entity instance contains all required fields after deserialization.
+     * @param instance A Thrift entity instance.
+     * @throws org.apache.thrift.TException if unable to validate the instance.
+     */
+    protected abstract void validate(T instance) throws TException;
+
+    /**
+     * Generates a {@link JavaType} that matches the target Thrift field represented by the provided
+     * {@code <E>} enumerated value.  If the field's type includes generics, the generics will
+     * be added to the generated {@link JavaType} to support proper conversion.
+     * @param thriftInstance The Thrift-generated class instance that will be converted to/from JSON.
+     * @param field A {@code <E>} enumerated value that represents a field in a Thrift-based entity.
+     * @return The {@link JavaType} representation of the type associated with the field.
+     * @throws NoSuchFieldException if unable to determine the field's type.
+     * @throws SecurityException if unable to determine the field's type.
+     */
+    protected JavaType generateValueType(final T thriftInstance, final E field) throws NoSuchFieldException, SecurityException {
+        final TypeFactory typeFactory = TypeFactory.defaultInstance();
+
+        final Field declaredField = thriftInstance.getClass().getDeclaredField(field.getFieldName());
+        if(declaredField.getType().equals(declaredField.getGenericType())) {
+            log.debug("Generating JavaType for type '{}'.", declaredField.getType());
+            return typeFactory.constructType(declaredField.getType());
+        } else {
+            final ParameterizedType type = (ParameterizedType)declaredField.getGenericType();
+            final Class<?>[] parameterizedTypes = new Class<?>[type.getActualTypeArguments().length];
+            for(int i=0; i<type.getActualTypeArguments().length; i++) {
+                parameterizedTypes[i] = (Class<?>)type.getActualTypeArguments()[i];
+            }
+            log.debug("Generating JavaType for type '{}' with generics '{}'", declaredField.getType(), parameterizedTypes);
+            return typeFactory.constructParametricType(declaredField.getType(), parameterizedTypes);
+        }
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/AbstractThriftSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/AbstractThriftSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/AbstractThriftSerializer.java
new file mode 100644
index 0000000..54f491b
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/AbstractThriftSerializer.java
@@ -0,0 +1,122 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.google.common.base.CaseFormat;
+import org.apache.thrift.TBase;
+import org.apache.thrift.TFieldIdEnum;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Collection;
+
+/**
+ * This abstract class represents a generic serializer for converting Thrift-based entities
+ * to JSON.
+ *
+ * @param <E> An implementation of the {@link org.apache.thrift.TFieldIdEnum} interface.
+ * @param <T> An implementation of the {@link org.apache.thrift.TBase} interface.
+ */
+public abstract class AbstractThriftSerializer<E extends TFieldIdEnum, T extends TBase<T, E>>
+        extends JsonSerializer<T> {
+
+    private static final Logger log = LoggerFactory.getLogger(AbstractThriftSerializer.class);
+
+    @Override
+    public Class<T> handledType() {
+        return getThriftClass();
+    }
+
+    @Override
+    public void serialize(final T value, final JsonGenerator jgen, final SerializerProvider provider)
+            throws IOException, JsonProcessingException {
+        jgen.writeStartObject();
+        for(final E field : getFieldValues()) {
+            if(value.isSet(field)) {
+                final Object fieldValue = value.getFieldValue(field);
+                if(fieldValue != null) {
+                    log.debug("Adding field {} to the JSON string...",
+                            CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName())
+                    );
+
+                    jgen.writeFieldName(CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName()));
+                    if(fieldValue instanceof Short) {
+                        jgen.writeNumber((Short)fieldValue);
+                    } else if(fieldValue instanceof Integer) {
+                        jgen.writeNumber((Integer)fieldValue);
+                    } else if(fieldValue instanceof Long) {
+                        jgen.writeNumber((Long)fieldValue);
+                    } else if(fieldValue instanceof Double) {
+                        jgen.writeNumber((Double)fieldValue);
+                    } else if(fieldValue instanceof Float) {
+                        jgen.writeNumber((Float)fieldValue);
+                    } else if(fieldValue instanceof Boolean) {
+                        jgen.writeBoolean((Boolean)fieldValue);
+                    } else if(fieldValue instanceof String) {
+                        jgen.writeString(fieldValue.toString());
+                    } else if(fieldValue instanceof Collection) {
+                        log.debug("Array opened for field {}.",
+                                CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName())
+                        );
+                        jgen.writeStartArray();
+                        for(final Object arrayObject : (Collection<?>)fieldValue) {
+                                jgen.writeObject(arrayObject);
+                        }
+                        jgen.writeEndArray();
+                        log.debug("Array closed for field {}.",
+                                CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName())
+                        );
+                    } else {
+                        jgen.writeObject(fieldValue);
+                    }
+                } else {
+                    log.debug("Skipping converting field {} to JSON:  value is null!",
+                            CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName())
+                    );
+                }
+            } else {
+                log.debug("Skipping converting field {} to JSON:  field has not been set!",
+                        CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName())
+                );
+            }
+        }
+        jgen.writeEndObject();
+    }
+
+    /**
+     * Returns an array of {@code <E>} enumerated values that represent the fields present in the
+     * Thrift class associated with this serializer.
+     * @return The array of {@code <E>} enumerated values that represent the fields present in the
+     *   Thrift class.
+     */
+    protected abstract E[] getFieldValues();
+
+    /**
+     * Returns the {@code <T>} implementation class associated with this serializer.
+     * @return The {@code <T>} implementation class
+     */
+    protected abstract Class<T> getThriftClass();
+}
\ No newline at end of file


[24/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
Mongo Registry WIP


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

Branch: refs/heads/mongo-registry
Commit: 945161ea138dc9576f8f2bc6ce7452cc386821b0
Parents: 847f2d9
Author: Supun Nakandala <sc...@apache.org>
Authored: Wed May 27 23:15:35 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Wed May 27 23:15:35 2015 +0530

----------------------------------------------------------------------
 .../registry/jpa/impl/ExperimentRegistry.java   | 230 ++++---------------
 .../registry/jpa/impl/ProjectRegistry.java      | 148 +++---------
 .../persistance/registry/jpa/mongo/Test.java    |   2 -
 .../registry/jpa/mongo/dao/ExperimentDao.java   |  76 ++++--
 .../registry/jpa/mongo/dao/ProjectDao.java      | 189 +++++++++++++++
 .../registry/mongo/ExperimentDaoTest.java       |  30 ++-
 6 files changed, 338 insertions(+), 337 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/945161ea/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
index e7791fa..e6f7c4c 100644
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
@@ -23,7 +23,6 @@ package org.apache.airavata.persistance.registry.jpa.impl;
 
 import org.apache.airavata.common.logger.AiravataLogger;
 import org.apache.airavata.common.logger.AiravataLoggerFactory;
-import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
@@ -37,7 +36,6 @@ import org.apache.airavata.registry.cpi.RegistryModelType;
 import org.apache.airavata.registry.cpi.ResultOrderType;
 import org.apache.airavata.registry.cpi.utils.Constants;
 
-import java.sql.Timestamp;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -253,7 +251,7 @@ public class ExperimentRegistry {
         try {
             TaskDetails taskDetails = experimentDao.getTaskDetail((String) ids.getTopLevelIdentifier());
             for (JobDetails jobDetails : taskDetails.getJobDetailsList()) {
-                if (jobDetails.getJobId().equals((String) ids.getSecondLevelIdentifier())) {
+                if (jobDetails.getJobId().equals(ids.getSecondLevelIdentifier())) {
                     jobDetails.setApplicationStatus(status);
                     experimentDao.updateTaskDetail(taskDetails);
                     return;
@@ -512,94 +510,26 @@ public class ExperimentRegistry {
         }
     }
 
-    //Todo
     public String addErrorDetails(ErrorDetails error, Object id) throws RegistryException {
         try {
-            ErrorDetailResource errorResource = null;
-            ExperimentResource experiment;
-            TaskDetailResource taskDetail;
-            WorkflowNodeDetailResource workflowNode;
-            // figure out the id is an experiment, node task or job
-            if (id instanceof String) {
-                // FIXME : for .12 we only saveExperiment task related errors
-//                if (isExperimentExist((String) id)) {
-//                    experiment = gatewayResource.getExperiment((String) id);
-//                    errorResource = (ErrorDetailResource) experiment.create(ResourceType.ERROR_DETAIL);
-//                } else if (isWFNodeExist((String) id)) {
-//                    experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
-//                    workflowNode = experiment.getWorkflowNode((String) id);
-//                    errorResource = (ErrorDetailResource) workflowNode.create(ResourceType.ERROR_DETAIL);
-//                    errorResource.setExperimentResource(workflowNode.getExperimentResource());
-//                } else
-                if (isTaskDetailExist((String) id)) {
-                    experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
-                    workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
-                    taskDetail = workflowNode.getTaskDetail((String) id);
-                    errorResource = (ErrorDetailResource) taskDetail.create(ResourceType.ERROR_DETAIL);
-                    if (error.getErrorId() != null && !error.getErrorId().equals(experimentModelConstants.DEFAULT_ID)) {
-                        List<ErrorDetailResource> errorDetailList = taskDetail.getErrorDetailList();
-                        if (errorDetailList != null && !errorDetailList.isEmpty()) {
-                            for (ErrorDetailResource errorDetailResource : errorDetailList) {
-                                if (errorDetailResource.getErrorId() == Integer.parseInt(error.getErrorId())) {
-                                    errorResource = errorDetailResource;
-                                }
-                            }
-                        }
-                    }
-                    errorResource.setTaskDetailResource(taskDetail);
-                    errorResource.setNodeDetail(taskDetail.getWorkflowNodeDetailResource());
-                    errorResource.setExperimentResource(taskDetail.getWorkflowNodeDetailResource().getExperimentResource());
-                } else {
-//                    logger.error("The id provided is not an experiment id or a workflow id or a task id..");
-                }
+            // FIXME : for .12 we only saveExperiment task related errors
+            if(id instanceof String){
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) id);
+                taskDetails.getErrors().add(error);
+                experimentDao.updateTaskDetail(taskDetails);
+                return (String) id;
             } else if (id instanceof CompositeIdentifier) {
                 CompositeIdentifier cid = (CompositeIdentifier) id;
-                if (isJobDetailExist(cid)) {
-                    experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
-                    workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
-                    taskDetail = workflowNode.getTaskDetail((String) cid.getTopLevelIdentifier());
-                    JobDetailResource jobDetail = taskDetail.getJobDetail((String) cid.getSecondLevelIdentifier());
-                    errorResource = (ErrorDetailResource) jobDetail.create(ResourceType.ERROR_DETAIL);
-                    if (error.getErrorId() != null && !error.getErrorId().equals(experimentModelConstants.DEFAULT_ID)) {
-                        List<ErrorDetailResource> errorDetailList = taskDetail.getErrorDetailList();
-                        if (errorDetailList != null && !errorDetailList.isEmpty()) {
-                            for (ErrorDetailResource errorDetailResource : errorDetailList) {
-                                if (errorDetailResource.getErrorId() == Integer.parseInt(error.getErrorId())) {
-                                    errorResource = errorDetailResource;
-                                }
-                            }
-                        }
+                TaskDetails taskDetails = experimentDao.getTaskDetail((String) cid.getTopLevelIdentifier());
+                for(JobDetails jobDetails: taskDetails.getJobDetailsList()){
+                    if(jobDetails.getJobId().equals(cid.getSecondLevelIdentifier())){
+                        jobDetails.getErrors().add(error);
+                        experimentDao.updateTaskDetail(taskDetails);
+                        return (String) cid.getSecondLevelIdentifier();
                     }
-                    errorResource.setTaskDetailResource(taskDetail);
-                    errorResource.setNodeDetail(taskDetail.getWorkflowNodeDetailResource());
-                    errorResource.setExperimentResource(taskDetail.getWorkflowNodeDetailResource().getExperimentResource());
-                } else {
-                    logger.error("The id provided is not a job in the system..");
                 }
             } else {
-//                logger.error("The id provided is not an experiment id or a workflow id or a task id or a composite " +
-//                        "identifier for job..");
-            }
-            if (errorResource != null) {
-                errorResource.setCreationTime(AiravataUtils.getTime(error.getCreationTime()));
-                errorResource.setActualErrorMsg(error.getActualErrorMessage());
-                errorResource.setUserFriendlyErrorMsg(error.getUserFriendlyMessage());
-                if (error.getErrorCategory() != null) {
-                    errorResource.setErrorCategory(error.getErrorCategory().toString());
-                }
-                errorResource.setTransientPersistent(error.isTransientOrPersistent());
-                if (error.getCorrectiveAction() != null) {
-                    errorResource.setCorrectiveAction(error.getCorrectiveAction().toString());
-                } else {
-                    errorResource.setCorrectiveAction(CorrectiveAction.CONTACT_SUPPORT.toString());
-                }
-                if (error.getActionableGroup() != null) {
-                    errorResource.setActionableGroup(error.getActionableGroup().toString());
-                } else {
-                    errorResource.setActionableGroup(ActionableGroup.GATEWAYS_ADMINS.toString());
-                }
-                errorResource.save();
-                return String.valueOf(errorResource.getErrorId());
+                logger.error("Unsupported data type...");
             }
         } catch (Exception e) {
             logger.error("Unable to add error details...", e);
@@ -729,7 +659,6 @@ public class ExperimentRegistry {
         }
     }
 
-    //Todo
     /**
      * Method to getExperiment matching experiment list
      *
@@ -739,58 +668,9 @@ public class ExperimentRegistry {
      * @throws RegistryException
      */
     public List<Experiment> getExperimentList(String fieldName, Object value) throws RegistryException {
-        List<Experiment> experiments = new ArrayList();
-        try {
-            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
-                WorkerResource resource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
-                resource.setUser((String) value);
-                List<ExperimentResource> resources = resource.getExperiments();
-                for (ExperimentResource experimentResource : resources) {
-                    Experiment experiment = ThriftDataModelConversion.getExperiment(experimentResource);
-                    experiments.add(experiment);
-                }
-                return experiments;
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.PROJECT_ID)) {
-                ProjectResource project = workerResource.getProject((String) value);
-                List<ExperimentResource> resources = project.getExperiments();
-                for (ExperimentResource resource : resources) {
-                    Experiment experiment = ThriftDataModelConversion.getExperiment(resource);
-                    experiments.add(experiment);
-                }
-                return experiments;
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
-                List<ExperimentResource> resources = gatewayResource.getExperiments();
-                for (ExperimentResource resource : resources) {
-                    Experiment experiment = ThriftDataModelConversion.getExperiment(resource);
-                    experiments.add(experiment);
-                }
-                return experiments;
-            }
-            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_NODE_LIST)) {
-                if (value instanceof List<?>) {
-                    return getExperimentList(fieldName, ((List<?>) value).get(0));
-                } else if (value instanceof WorkflowNodeDetails) {
-                    //WorkflowNodeDetailResource nodeDetailResource = getWorkflowNodeDetailResource(((WorkflowNodeDetails) value).getNodeInstanceId());
-//                    if (nodeDetailResource != null) {
-//                        return Arrays.asList(new Experiment[]{ThriftDataModelConversion
-//                                .getExperiment(nodeDetailResource
-//                                        .getExperimentResource())});
-//                    }
-                } else {
-                    logger.error("Unsupported field value to retrieve workflow node detail list...");
-                }
-
-            } else {
-                logger.error("Unsupported field name to retrieve experiment list...");
-            }
-        } catch (Exception e) {
-            logger.error("Error while getting experiment list...", e);
-            throw new RegistryException(e);
-        }
-        return experiments;
+        return getExperimentList(fieldName, value, -1, -1, null, null);
     }
 
-    //Todo
     /**
      * Method to getExperiment matching experiment list with pagination and ordering
      *
@@ -806,28 +686,32 @@ public class ExperimentRegistry {
     public List<Experiment> getExperimentList(String fieldName, Object value, int limit, int offset,
                                               Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
         List<Experiment> experiments = new ArrayList();
+        Map<String, String> filters = new HashMap();
         try {
             if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
-                WorkerResource resource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
-                resource.setUser((String) value);
-                List<ExperimentResource> resources = resource.getExperiments(limit, offset,
-                        orderByIdentifier, resultOrderType);
-                for (ExperimentResource experimentResource : resources) {
-                    Experiment experiment = ThriftDataModelConversion.getExperiment(experimentResource);
-                    experiments.add(experiment);
-                }
-                return experiments;
+                filters.put(fieldName, (String)value);
+                return experimentDao.searchExperiments(filters, limit, offset, orderByIdentifier, resultOrderType);
             } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.PROJECT_ID)) {
-                ProjectResource project = workerResource.getProject((String) value);
-                List<ExperimentResource> resources = project.getExperiments(limit, offset,
-                        Constants.FieldConstants.ExperimentConstants.CREATION_TIME, ResultOrderType.DESC);
-                for (ExperimentResource resource : resources) {
-                    Experiment experiment = ThriftDataModelConversion.getExperiment(resource);
-                    experiments.add(experiment);
+                filters.put(fieldName, (String)value);
+                return experimentDao.searchExperiments(filters, limit, offset, orderByIdentifier, resultOrderType);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
+                filters.put(fieldName, (String)value);
+                return experimentDao.searchExperiments(filters, limit, offset, orderByIdentifier, resultOrderType);
+            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_NODE_LIST)) {
+                if (value instanceof List<?>) {
+                    return getExperimentList(fieldName, ((List<?>) value).get(0));
+                } else if (value instanceof WorkflowNodeDetails) {
+                    List<Experiment> experimentList = new ArrayList();
+                    experimentList.add(experimentDao.getParentExperimentOfWFNode(
+                            ((WorkflowNodeDetails)value).getNodeInstanceId())
+                    );
+                } else {
+                    logger.error("Unsupported field value to retrieve workflow node detail list...");
                 }
-                return experiments;
+
+            } else {
+                logger.error("Unsupported field name to retrieve experiment list...");
             }
-            logger.error("Unsupported field name to retrieve experiment list...");
         } catch (Exception e) {
             logger.error("Error while getting experiment list...", e);
             throw new RegistryException(e);
@@ -846,13 +730,9 @@ public class ExperimentRegistry {
                 if (value instanceof List<?>) {
                     return getWFNodeDetails(fieldName, ((List<?>) value).get(0));
                 } else if (value instanceof TaskDetails) {
-                    //Fixme
-//                    TaskDetailResource taskDetailResource = getTaskDetailResource(((TaskDetails) value).getTaskId());
-//                    if (taskDetailResource != null) {
-//                        return Arrays.asList(new WorkflowNodeDetails[]{ThriftDataModelConversion
-//                                .getWorkflowNodeDetails(taskDetailResource
-//                                        .getWorkflowNodeDetailResource())});
-//                    }
+                    List<WorkflowNodeDetails> workflowNodeDetailsList = new ArrayList();
+                    workflowNodeDetailsList.add(experimentDao.getParentWFNodeOfTask(((TaskDetails)value).getTaskId()));
+                    return workflowNodeDetailsList;
                 } else {
                     logger.error("Unsupported field value to retrieve workflow node detail list...");
                 }
@@ -1269,27 +1149,14 @@ public class ExperimentRegistry {
         }
     }
 
-    //Todo
     public List<String> getExperimentIds(String fieldName, Object value) throws RegistryException {
         List<String> expIDs = new ArrayList();
         try {
-            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
-                if (gatewayResource == null) {
-                    logger.error("You should use an existing gateway in order to retrieve experiments..");
-                    return null;
-                } else {
-                    List<ExperimentResource> resources = gatewayResource.getExperiments();
-                    for (ExperimentResource resource : resources) {
-                        String expID = resource.getExpID();
-                        expIDs.add(expID);
-                    }
-                }
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
-                List<ExperimentResource> resources = workerResource.getExperiments();
-                expIDs.addAll(resources.stream().map(ExperimentResource::getExpID).collect(Collectors.toList()));
-            } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.PROJECT_ID)) {
-                List<ExperimentResource> resources = workerResource.getExperiments();
-                expIDs.addAll(resources.stream().map(ExperimentResource::getExpID).collect(Collectors.toList()));
+            if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)
+                        || fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)
+                        || fieldName.equals(Constants.FieldConstants.ExperimentConstants.PROJECT_ID)) {
+                getExperimentList(fieldName, value).stream().forEach(ex->expIDs.add(ex.getExperimentId()));
+                return expIDs;
             }
         } catch (Exception e) {
             logger.error("Error while retrieving experiment ids..", e);
@@ -1326,7 +1193,6 @@ public class ExperimentRegistry {
         return transferIds;
     }
 
-
     public void removeExperiment(String experimentId) throws RegistryException {
         try {
             Experiment experiment = new Experiment();
@@ -1721,10 +1587,14 @@ public class ExperimentRegistry {
         experimentList.stream().forEach(experiment->{
             ExperimentSummary expSummary = new ExperimentSummary();
             expSummary.setExperimentId(experiment.getExperimentId());
+            expSummary.setProjectId(experiment.getProjectId());
             expSummary.setName(experiment.getName());
             expSummary.setDescription(experiment.getDescription());
+            expSummary.setUserName(experiment.getUserName());
             expSummary.setCreationTime(experiment.getCreationTime());
-            //Todo
+            expSummary.setApplicationId(experiment.getApplicationId());
+            expSummary.setExperimentStatus(experiment.getExperimentStatus());
+            expSummary.setErrors(experiment.getErrors());
             experimentSummaries.add(expSummary);
         });
         return experimentSummaries;
@@ -1770,4 +1640,4 @@ public class ExperimentRegistry {
                 return false;
         }
     }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/945161ea/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
index 928fe64..620c535 100644
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
@@ -21,12 +21,13 @@
 
 package org.apache.airavata.persistance.registry.jpa.impl;
 
-import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.model.workspace.Project;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.persistance.registry.jpa.utils.ThriftDataModelConversion;
+import org.apache.airavata.persistance.registry.jpa.mongo.dao.ProjectDao;
+import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
+import org.apache.airavata.persistance.registry.jpa.resources.UserResource;
+import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.apache.airavata.registry.cpi.ResultOrderType;
 import org.apache.airavata.registry.cpi.utils.Constants;
@@ -40,7 +41,11 @@ public class ProjectRegistry {
     private WorkerResource workerResource;
     private final static Logger logger = LoggerFactory.getLogger(ProjectRegistry.class);
 
+    private ProjectDao projectDao;
+
     public ProjectRegistry(GatewayResource gatewayResource, UserResource user) throws RegistryException {
+        this.projectDao = new ProjectDao();
+
         if (!ResourceUtils.isGatewayExist(gatewayResource.getGatewayId())){
             this.gatewayResource = gatewayResource;
         }else {
@@ -55,50 +60,17 @@ public class ProjectRegistry {
     }
 
     public String addProject (Project project, String gatewayId) throws RegistryException{
-        String projectId;
         try {
             if (!ResourceUtils.isUserExist(project.getOwner())){
                 ResourceUtils.addUser(project.getOwner(), null);
             }
-            ProjectResource projectResource = new ProjectResource();
-            projectId = getProjectId(project.getName());
-            projectResource.setId(projectId);
-            project.setProjectId(projectId);
-            projectResource.setName(project.getName());
-            projectResource.setDescription(project.getDescription());
-            projectResource.setCreationTime(AiravataUtils.getTime(project.getCreationTime()));
-            GatewayResource gateway = (GatewayResource)ResourceUtils.getGateway(gatewayId);
-            projectResource.setGateway(gateway);
-            WorkerResource worker = new WorkerResource(project.getOwner(), workerResource.getGateway());
-            projectResource.setWorker(worker);
-            projectResource.save();
-            ProjectUserResource resource = (ProjectUserResource)projectResource.create(
-                    ResourceType.PROJECT_USER);
-            resource.setProjectId(project.getProjectId());
-            resource.setUserName(project.getOwner());
-            resource.save();
-            List<String> sharedGroups = project.getSharedGroups();
-            if (sharedGroups != null && !sharedGroups.isEmpty()){
-                for (String group : sharedGroups){
-                    //TODO - add shared groups
-                    logger.info("Groups are not supported at the moment...");
-                }
-            }
-
-            List<String> sharedUsers = project.getSharedUsers();
-            if (sharedUsers != null && !sharedUsers.isEmpty()){
-                for (String username : sharedUsers){
-                    ProjectUserResource pr = (ProjectUserResource)projectResource.
-                            create(ResourceType.PROJECT_USER);
-                    pr.setUserName(username);
-                    pr.save();
-                }
-            }
+            project.setProjectId(getProjectId(project.getName()));
+            projectDao.createProject(project);
+            return project.getProjectId();
         }catch (Exception e){
             logger.error("Error while saving project to registry", e);
            throw new RegistryException(e);
         }
-        return projectId;
     }
 
     private String getProjectId (String projectName){
@@ -108,11 +80,6 @@ public class ProjectRegistry {
 
     public void updateProject (Project project, String projectId) throws RegistryException{
         try {
-            ProjectResource existingProject = workerResource.getProject(projectId);
-            existingProject.setDescription(project.getDescription());
-            existingProject.setName(project.getName());
-            existingProject.setCreationTime(AiravataUtils.getTime(project.getCreationTime()));
-//            existingProject.setGateway(gatewayResource);
             UserResource user = (UserResource)ResourceUtils.getUser(project.getOwner());
             if (!gatewayResource.isExists(ResourceType.GATEWAY_WORKER, user.getUserName())){
                 workerResource = ResourceUtils.addGatewayWorker(gatewayResource, user);
@@ -120,31 +87,7 @@ public class ProjectRegistry {
                 workerResource = (WorkerResource)ResourceUtils.getWorker(
                         gatewayResource.getGatewayName(), user.getUserName());
             }
-            WorkerResource worker = new WorkerResource(project.getOwner(), gatewayResource);
-            existingProject.setWorker(worker);
-            existingProject.save();
-            ProjectUserResource resource = (ProjectUserResource)existingProject.create(
-                    ResourceType.PROJECT_USER);
-            resource.setProjectId(projectId);
-            resource.setUserName(project.getOwner());
-            resource.save();
-            List<String> sharedGroups = project.getSharedGroups();
-            if (sharedGroups != null && !sharedGroups.isEmpty()){
-                for (String group : sharedGroups){
-                    //TODO - add shared groups
-                    logger.info("Groups are not supported at the moment...");
-                }
-            }
-
-            List<String> sharedUsers = project.getSharedUsers();
-            if (sharedUsers != null && !sharedUsers.isEmpty()){
-                for (String username : sharedUsers){
-                    ProjectUserResource pr = (ProjectUserResource)existingProject.create(
-                            ResourceType.PROJECT_USER);
-                    pr.setUserName(username);
-                    pr.save();
-                }
-            }
+            projectDao.updateProject(project);
         }catch (Exception e){
             logger.error("Error while saving project to registry", e);
            throw new RegistryException(e);
@@ -153,15 +96,11 @@ public class ProjectRegistry {
 
     public Project getProject (String projectId) throws RegistryException{
         try {
-            ProjectResource project = workerResource.getProject(projectId);
-            if (project != null){
-                return ThriftDataModelConversion.getProject(project);
-            }
+            return projectDao.getProject(projectId);
         }catch (Exception e){
             logger.error("Error while retrieving project from registry", e);
            throw new RegistryException(e);
         }
-        return null;
     }
 
     /**
@@ -188,23 +127,14 @@ public class ProjectRegistry {
      */
     public List<Project> getProjectList (String fieldName, Object value, int limit, int offset,
                                          Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException{
-        List<Project> projects = new ArrayList<Project>();
         try {
-            if (fieldName.equals(Constants.FieldConstants.ProjectConstants.OWNER)){
-                workerResource.setUser((String)value);
-                List<ProjectResource> projectList = workerResource.getProjects();
-                if (projectList != null && !projectList.isEmpty()){
-                    for (ProjectResource pr : projectList){
-                        projects.add(ThriftDataModelConversion.getProject(pr));
-                    }
-                }
-                return projects;
-            }
+                Map<String, String> filters = new HashMap();
+                filters.put(fieldName, (String)value);
+                return  projectDao.searchProjects(filters, limit, offset, orderByIdentifier, resultOrderType);
         }catch (Exception e){
             logger.error("Error while retrieving project from registry", e);
             throw new RegistryException(e);
         }
-        return projects;
     }
 
     /**
@@ -233,48 +163,23 @@ public class ProjectRegistry {
      */
     public List<Project> searchProjects(Map<String, String> filters, int limit,
             int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
-        Map<String, String> fil = new HashMap<String, String>();
-        if (filters != null && filters.size() != 0){
-            List<Project> projects = new ArrayList<Project>();
-            try {
-                for (String field : filters.keySet()){
-                    if (field.equals(Constants.FieldConstants.ProjectConstants.PROJECT_NAME)){
-                        fil.put(AbstractResource.ProjectConstants.PROJECT_NAME, filters.get(field));
-                    }else if (field.equals(Constants.FieldConstants.ProjectConstants.OWNER)){
-                        fil.put(AbstractResource.ProjectConstants.USERNAME, filters.get(field));
-                    }else if (field.equals(Constants.FieldConstants.ProjectConstants.DESCRIPTION)){
-                        fil.put(AbstractResource.ProjectConstants.DESCRIPTION, filters.get(field));
-                    }else if (field.equals(Constants.FieldConstants.ProjectConstants.GATEWAY_ID)){
-                        fil.put(AbstractResource.ProjectConstants.GATEWAY_ID, filters.get(field));
-                    }
-                }
-                List<ProjectResource> projectResources = workerResource
-                        .searchProjects(fil, limit, offset, orderByIdentifier, resultOrderType);
-                if (projectResources != null && !projectResources.isEmpty()){
-                    for (ProjectResource pr : projectResources){
-                        projects.add(ThriftDataModelConversion.getProject(pr));
-                    }
-                }
-                return projects;
+          try {
+                return  projectDao.searchProjects(filters, limit, offset, orderByIdentifier, resultOrderType);
             }catch (Exception e){
                 logger.error("Error while retrieving project from registry", e);
                 throw new RegistryException(e);
             }
-        }
-        return null;
+
     }
 
     public List<String> getProjectIds (String fieldName, Object value) throws RegistryException{
         List<String> projectIds = new ArrayList<String>();
         try {
             if (fieldName.equals(Constants.FieldConstants.ProjectConstants.OWNER)){
-                workerResource.setUser((String)value);
-                List<ProjectResource> projectList = workerResource.getProjects();
-                if (projectList != null && !projectList.isEmpty()){
-                    for (ProjectResource pr : projectList){
-                        projectIds.add(pr.getName());
-                    }
-                }
+                Map<String, String> filters = new HashMap();
+                filters.put(fieldName, (String)value);
+                projectDao.searchProjects(filters, -1, -1, null, null).stream()
+                .forEach(pr->projectIds.add(pr.getProjectId()));
                 return projectIds;
             }
         }catch (Exception e){
@@ -286,7 +191,9 @@ public class ProjectRegistry {
 
     public void removeProject (String projectId) throws RegistryException {
         try {
-            workerResource.removeProject(projectId);
+            Project project = new Project();
+            project.setProjectId(projectId);
+            projectDao.deleteProject(project);
         } catch (Exception e) {
             logger.error("Error while removing the project..", e);
            throw new RegistryException(e);
@@ -295,11 +202,10 @@ public class ProjectRegistry {
 
     public boolean isProjectExist(String projectId) throws RegistryException {
         try {
-            return workerResource.isProjectExists(projectId);
+            return projectDao.getProject(projectId) != null;
         } catch (Exception e) {
             logger.error("Error while retrieving project...", e);
            throw new RegistryException(e);
         }
     }
-
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/945161ea/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/Test.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/Test.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/Test.java
index 4f0dcca..4e04940 100644
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/Test.java
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/Test.java
@@ -20,7 +20,6 @@
 */
 package org.apache.airavata.persistance.registry.jpa.mongo;
 
-import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.model.workspace.experiment.Experiment;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
 import org.apache.airavata.persistance.registry.jpa.mongo.dao.ExperimentDao;
@@ -40,7 +39,6 @@ public class Test {
     private final static Logger logger = LoggerFactory.getLogger(Test.class);
 
     public static void main(String[] args) throws RegistryException, IOException {
-        AiravataUtils.setExecutionAsServer();
         Registry registry = RegistryFactory.getDefaultRegistry();
 //        String experiemtnId = "SLM-Espresso-Stampede_45667ea8-aae3-4a8e-807d-a16312035c35";
 //        long time1 = System.currentTimeMillis();

http://git-wip-us.apache.org/repos/asf/airavata/blob/945161ea/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ExperimentDao.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ExperimentDao.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ExperimentDao.java
index 85375ed..af15716 100644
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ExperimentDao.java
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ExperimentDao.java
@@ -47,14 +47,15 @@ public class ExperimentDao{
     private ModelConversionHelper modelConversionHelper;
 
     private static final String EXPERIMENT_ID = "experiment_id";
-    private static final String EXPERIMENT_NAME= "experiment_name";
-    private static final String EXPERIMENT_DESCRIPTION = "experiment_description";
+    private static final String EXPERIMENT_NAME= "name";
+    private static final String EXPERIMENT_DESCRIPTION = "description";
     private static final String USER_NAME = "user_name";
     private static final String GATEWAY = "gateway_execution_id";
     private static final String APPLICATION_ID = "application_id";
     private static final String EXPERIMENT_STATUS_STATE = "experiment_status.experiment_state";
     private static final String CREATION_TIME = "creation_time";
 
+    //Todo Nested Indexes - Its good if we can get rid of them
     private static final String WORKFLOW_NODE_ID = "workflow_node_details_list.node_instance_id";
     private static final String TASK_ID = "workflow_node_details_list.task_details_list.task_id";
 
@@ -62,7 +63,7 @@ public class ExperimentDao{
     public ExperimentDao(){
         collection = MongoUtil.getAiravataRegistry().getCollection(EXPERIMENTS_COLLECTION_NAME);
         modelConversionHelper = new ModelConversionHelper();
-        //collection.dropIndexes();
+        collection.dropIndexes();
         initIndexes();
     }
 
@@ -74,11 +75,11 @@ public class ExperimentDao{
         collection.createIndex(new BasicDBObject(WORKFLOW_NODE_ID, 1));
         collection.createIndex(new BasicDBObject(TASK_ID, 1));
 
-        //Defining a full-text index on experiment name and experiment description
-        BasicDBObject object = new BasicDBObject();
-        object.put(EXPERIMENT_NAME, "text");
-        object.put(EXPERIMENT_DESCRIPTION, "text");
-        collection.createIndex (object);
+//        //Defining a full-text index on experiment name and experiment description
+//        BasicDBObject object = new BasicDBObject();
+//        object.put(EXPERIMENT_NAME, "text");
+//        object.put(EXPERIMENT_DESCRIPTION, "text");
+//        collection.createIndex (object);
     }
 
     public List<Experiment> getAllExperiments() throws RegistryException{
@@ -153,15 +154,15 @@ public class ExperimentDao{
         BasicDBObjectBuilder queryBuilder = BasicDBObjectBuilder.start();
         for (String field : filters.keySet()) {
             if (field.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_NAME)) {
-                //Fixme This is expensive operation
-                queryBuilder.add(EXPERIMENT_NAME, "/.*" + filters.get(field) + "/.*");
+                queryBuilder.add(EXPERIMENT_NAME, new BasicDBObject(
+                        "$regex", ".*" + filters.get(field) + ".*"));
             } else if (field.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
                 queryBuilder.add(USER_NAME, filters.get(field));
             } else if (field.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
                 queryBuilder.add(GATEWAY, filters.get(field));
             } else if (field.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_DESC)) {
-                //Fixme This is expensive operation
-                queryBuilder.add(EXPERIMENT_DESCRIPTION, "/.*" + filters.get(field) + "/.*");
+                queryBuilder.add(EXPERIMENT_DESCRIPTION, new BasicDBObject(
+                        "$regex", ".*" + filters.get(field) + ".*"));
             } else if (field.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_ID)) {
                 queryBuilder.add(APPLICATION_ID, filters.get(field));
             } else if (field.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_STATUS)) {
@@ -218,7 +219,7 @@ public class ExperimentDao{
     }
 
     public void updateWFNode(WorkflowNodeDetails workflowNodeDetail) throws RegistryException{
-        Experiment experiment = getExperimentOfWFNode(workflowNodeDetail.getNodeInstanceId());
+        Experiment experiment = getParentExperimentOfWFNode(workflowNodeDetail.getNodeInstanceId());
         for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
             if(wfnd.getNodeInstanceId().equals(workflowNodeDetail.getNodeInstanceId())){
                 experiment.getWorkflowNodeDetailsList().remove(wfnd);
@@ -230,7 +231,7 @@ public class ExperimentDao{
     }
 
     public void deleteWFNode(WorkflowNodeDetails workflowNodeDetail) throws RegistryException{
-        Experiment experiment = getExperimentOfWFNode(workflowNodeDetail.getNodeInstanceId());
+        Experiment experiment = getParentExperimentOfWFNode(workflowNodeDetail.getNodeInstanceId());
         for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
             if(wfnd.getNodeInstanceId().equals(workflowNodeDetail.getNodeInstanceId())){
                 experiment.getWorkflowNodeDetailsList().remove(wfnd);
@@ -241,7 +242,7 @@ public class ExperimentDao{
     }
 
     public WorkflowNodeDetails getWFNode(String nodeId) throws RegistryException{
-        Experiment experiment = getExperimentOfWFNode(nodeId);
+        Experiment experiment = getParentExperimentOfWFNode(nodeId);
         for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
             if(wfnd.getNodeInstanceId().equals(nodeId)){
                 return wfnd;
@@ -250,9 +251,8 @@ public class ExperimentDao{
         return null;
     }
 
-
     public void createTaskDetail(String nodeId, TaskDetails taskDetail) throws RegistryException{
-        Experiment experiment = getExperimentOfWFNode(nodeId);
+        Experiment experiment = getParentExperimentOfWFNode(nodeId);
         for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
             if(wfnd.getNodeInstanceId().equals(nodeId)){
                 wfnd.getTaskDetailsList().add(taskDetail);
@@ -263,7 +263,7 @@ public class ExperimentDao{
     }
 
     public void updateTaskDetail(TaskDetails taskDetail) throws RegistryException{
-        Experiment experiment = getExperimentOfTask(taskDetail.getTaskId());
+        Experiment experiment = getParentExperimentOfTask(taskDetail.getTaskId());
         for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
             for(TaskDetails taskDetails: wfnd.getTaskDetailsList()){
                 if(taskDetails.getTaskId().equals(taskDetail)){
@@ -277,7 +277,7 @@ public class ExperimentDao{
     }
 
     public void deleteTaskDetail(TaskDetails taskDetail) throws RegistryException{
-        Experiment experiment = getExperimentOfTask(taskDetail.getTaskId());
+        Experiment experiment = getParentExperimentOfTask(taskDetail.getTaskId());
         for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
             for(TaskDetails taskDetails: wfnd.getTaskDetailsList()){
                 if(taskDetails.getTaskId().equals(taskDetail)){
@@ -290,7 +290,7 @@ public class ExperimentDao{
     }
 
     public TaskDetails getTaskDetail(String taskId) throws RegistryException{
-        Experiment experiment = getExperimentOfTask(taskId);
+        Experiment experiment = getParentExperimentOfTask(taskId);
         for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
             for(TaskDetails taskDetails: wfnd.getTaskDetailsList()){
                 if(taskDetails.getTaskId().equals(taskId)){
@@ -303,12 +303,12 @@ public class ExperimentDao{
 
 
     /**
-     * Method to getExperiment the parent Experiment of a given workflow node instance id
+     * Method to get parent Experiment of the given workflow node instance id
      * @param nodeInstanceId
      * @return
      * @throws RegistryException
      */
-    public Experiment getExperimentOfWFNode(String nodeInstanceId) throws RegistryException{
+    public Experiment getParentExperimentOfWFNode(String nodeInstanceId) throws RegistryException{
         try {
             DBObject criteria = new BasicDBObject(WORKFLOW_NODE_ID, nodeInstanceId);
             DBObject doc = collection.findOne(criteria);
@@ -324,12 +324,12 @@ public class ExperimentDao{
     }
 
     /**
-     * Method to getExperiment the parent experiment of a given task id
+     * Method to get the parent experiment of the given task id
      * @param taskId
      * @return
      * @throws RegistryException
      */
-    public Experiment getExperimentOfTask(String taskId) throws RegistryException{
+    public Experiment getParentExperimentOfTask(String taskId) throws RegistryException{
         try {
             DBObject criteria = new BasicDBObject(TASK_ID, taskId);
             DBObject doc = collection.findOne(criteria);
@@ -343,4 +343,32 @@ public class ExperimentDao{
         }
         return null;
     }
+
+    /**
+     * Method to get the parent workflow node of the given task id
+     * @param taskId
+     * @return
+     * @throws RegistryException
+     */
+    public WorkflowNodeDetails getParentWFNodeOfTask(String taskId) throws RegistryException{
+        try {
+            DBObject criteria = new BasicDBObject(TASK_ID, taskId);
+            DBObject doc = collection.findOne(criteria);
+            if(doc != null){
+                String json = doc.toString();
+                Experiment experiment = (Experiment)modelConversionHelper.deserializeObject(
+                        Experiment.class, json);
+                for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
+                    for(TaskDetails taskDetails: wfnd.getTaskDetailsList()){
+                        if(taskDetails.getTaskId().equals(taskId)){
+                            return wfnd;
+                        }
+                    }
+                }
+            }
+        } catch (IOException e) {
+            throw new RegistryException(e);
+        }
+        return null;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/945161ea/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ProjectDao.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ProjectDao.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ProjectDao.java
new file mode 100644
index 0000000..e3ea7eb
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ProjectDao.java
@@ -0,0 +1,189 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.dao;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.mongodb.*;
+import com.mongodb.util.JSON;
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.ModelConversionHelper;
+import org.apache.airavata.persistance.registry.jpa.mongo.utils.MongoUtil;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.ResultOrderType;
+import org.apache.airavata.registry.cpi.utils.Constants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class ProjectDao {
+    private final static Logger logger = LoggerFactory.getLogger(ProjectDao.class);
+
+    private static final String PROJECTS_COLLECTION_NAME = "projects";
+    private DBCollection collection;
+    private ModelConversionHelper modelConversionHelper;
+
+    private static final String PROJECT_ID = "project_id";
+    private static final String PROJECT_NAME = "name";
+    private static final String PROJECT_DESCRIPTION = "description";
+    private static final String PROJECT_OWNER = "owner";
+    private static final String PROJECT_CREATION_TIME = "creation_time";
+
+    public ProjectDao(){
+        collection = MongoUtil.getAiravataRegistry().getCollection(PROJECTS_COLLECTION_NAME);
+        modelConversionHelper = new ModelConversionHelper();
+        collection.dropIndexes();
+        initIndexes();
+    }
+
+    /**
+     * If indexes are already defined this will simply ignore them
+     */
+    private void initIndexes(){
+        collection.createIndex(new BasicDBObject(PROJECT_ID, 1), new BasicDBObject("unique", true));
+        collection.createIndex(new BasicDBObject(PROJECT_NAME, 1));
+        collection.createIndex(new BasicDBObject(PROJECT_OWNER, 1));
+        collection.createIndex(new BasicDBObject(PROJECT_DESCRIPTION, 1));
+        collection.createIndex(new BasicDBObject(PROJECT_CREATION_TIME, 1));
+    }
+
+    public List<Project> getAllProjects() throws RegistryException{
+        List<Project> projectList = new ArrayList();
+        DBCursor cursor = collection.find();
+        for(DBObject document: cursor){
+            try {
+                projectList.add((Project) modelConversionHelper.deserializeObject(
+                        Project.class, document.toString()));
+            } catch (IOException e) {
+                throw new RegistryException(e);
+            }
+        }
+        return projectList;
+    }
+
+    public void createProject(Project project) throws RegistryException{
+        try {
+            WriteResult result = collection.insert((DBObject) JSON.parse(
+                    modelConversionHelper.serializeObject(project)));
+            logger.debug("No of inserted results "+ result.getN());
+        } catch (JsonProcessingException e) {
+            throw new RegistryException(e);
+        }
+    }
+
+    /**
+     * The following operation replaces the document with item equal to
+     * the given project id. The newly replaced document will only
+     * contain the the _id field and the fields in the replacement document.
+     * @param project
+     * @throws org.apache.airavata.registry.cpi.RegistryException
+     */
+    public void updateProject(Project project) throws RegistryException{
+        try {
+            DBObject query = BasicDBObjectBuilder.start().add(
+                    PROJECT_ID, project.getProjectId()).get();
+            WriteResult result = collection.update(query, (DBObject) JSON.parse(
+                    modelConversionHelper.serializeObject(project)));
+            logger.debug("No of updated results "+ result.getN());
+        } catch (JsonProcessingException e) {
+            throw new RegistryException(e);
+        }
+    }
+
+    public void deleteProject(Project project) throws RegistryException{
+        DBObject query = BasicDBObjectBuilder.start().add(
+                PROJECT_ID, project.getProjectId()).get();
+        WriteResult result = collection.remove(query);
+        logger.debug("No of removed experiments " + result.getN());
+    }
+
+    public Project getProject(String projectId) throws RegistryException{
+        try {
+            DBObject criteria = new BasicDBObject(PROJECT_ID, projectId);
+            DBObject doc = collection.findOne(criteria);
+            if(doc != null){
+                String json = doc.toString();
+                return (Project)modelConversionHelper.deserializeObject(
+                        Project.class, json);
+            }
+        } catch (IOException e) {
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<Project> searchProjects(Map<String, String> filters, int limit,
+        int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException{
+        List<Project> projectList = new ArrayList();
+        BasicDBObjectBuilder queryBuilder = BasicDBObjectBuilder.start();
+        for (String field : filters.keySet()) {
+//            if (field.equals(Constants.FieldConstants.ProjectConstants.PROJECT_NAME)){
+//                fil.put(AbstractResource.ProjectConstants.PROJECT_NAME, filters.get(field));
+//            }else if (field.equals(Constants.FieldConstants.ProjectConstants.OWNER)){
+//                fil.put(AbstractResource.ProjectConstants.USERNAME, filters.get(field));
+//            }else if (field.equals(Constants.FieldConstants.ProjectConstants.DESCRIPTION)){
+//                fil.put(AbstractResource.ProjectConstants.DESCRIPTION, filters.get(field));
+//            }else if (field.equals(Constants.FieldConstants.ProjectConstants.GATEWAY_ID)){
+//                fil.put(AbstractResource.ProjectConstants.GATEWAY_ID, filters.get(field));
+//            }
+        }
+
+        //handling pagination and ordering. ordering is allowed only on PROJECT_CREATION_TIME
+        DBCursor cursor;
+        if(limit > 0 && offset >= 0) {
+            if(orderByIdentifier != null && orderByIdentifier.equals(
+                    Constants.FieldConstants.ProjectConstants.CREATION_TIME)){
+                if(resultOrderType.equals(ResultOrderType.ASC)) {
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(PROJECT_CREATION_TIME, 1))
+                            .skip(offset).limit(limit);
+                }else{
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(PROJECT_CREATION_TIME, -1))
+                            .skip(offset).limit(limit);
+                }
+            }else {
+                cursor = collection.find(queryBuilder.get()).skip(offset).limit(limit);
+            }
+        }else{
+            if(resultOrderType != null && resultOrderType.equals(
+                    Constants.FieldConstants.ProjectConstants.CREATION_TIME)){
+                if(resultOrderType.equals(ResultOrderType.ASC)) {
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(PROJECT_CREATION_TIME, 1));
+                }else{
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(PROJECT_CREATION_TIME, -1));
+                }
+            }else {
+                cursor = collection.find(queryBuilder.get());
+            }
+        }
+        for(DBObject document: cursor){
+            try {
+                projectList.add((Project) modelConversionHelper.deserializeObject(
+                        Project.class, document.toString()));
+            } catch (IOException e) {
+                throw new RegistryException(e);
+            }
+        }
+        return projectList;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/945161ea/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/ExperimentDaoTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/ExperimentDaoTest.java b/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/ExperimentDaoTest.java
index 6b4d5cf..1def159 100644
--- a/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/ExperimentDaoTest.java
+++ b/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/ExperimentDaoTest.java
@@ -22,7 +22,6 @@ package org.apache.airavata.persistence.registry.mongo;
 
 import com.mongodb.MongoClient;
 import junit.framework.Assert;
-import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
 import org.apache.airavata.model.workspace.experiment.*;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
@@ -31,6 +30,8 @@ import org.apache.airavata.persistance.registry.jpa.mongo.utils.MongoUtil;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.apache.airavata.registry.cpi.RegistryModelType;
+import org.apache.airavata.registry.cpi.ResultOrderType;
+import org.apache.airavata.registry.cpi.utils.Constants;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -40,7 +41,9 @@ import org.slf4j.LoggerFactory;
 import java.io.BufferedReader;
 import java.io.FileReader;
 import java.io.IOException;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 
 public class ExperimentDaoTest {
@@ -112,7 +115,6 @@ public class ExperimentDaoTest {
 
     @Test
     public void test() throws RegistryException, IOException {
-        AiravataUtils.setExecutionAsServer();
         Registry registry = RegistryFactory.getDefaultRegistry();
         MongoUtil.dropAiravataRegistry();
 
@@ -149,7 +151,6 @@ public class ExperimentDaoTest {
 //        long time2 = System.currentTimeMillis();
 //        System.out.println(time2-time1);
 //        Assert.assertNotNull(experiment);
-        AiravataUtils.setExecutionAsServer();
 
         ExperimentDao experimentDao = new ExperimentDao();
         BufferedReader reader = new BufferedReader(new FileReader("/home/supun/Downloads/WORKFLOW_NODE_DETAIL.csv"));
@@ -159,7 +160,7 @@ public class ExperimentDaoTest {
         long time1 = System.currentTimeMillis();
         while(temp != null && !temp.isEmpty()){
             try{
-                Experiment experiment = experimentDao.getExperimentOfWFNode(temp.trim());
+                Experiment experiment = experimentDao.getParentExperimentOfWFNode(temp.trim());
                 if(experiment != null) {
                     System.out.println(i + " :" + experiment.getExperimentId());
                     count++;
@@ -190,7 +191,6 @@ public class ExperimentDaoTest {
 //        AiravataUtils.setExecutionAsServer();
 //        Registry registry = RegistryFactory.getDefaultRegistry();
 //        MongoUtil.dropAiravataRegistry();
-        AiravataUtils.setExecutionAsServer();
 
         ExperimentDao experimentDao = new ExperimentDao();
         BufferedReader reader = new BufferedReader(new FileReader("/home/supun/Downloads/TASK_DETAIL.csv"));
@@ -200,7 +200,7 @@ public class ExperimentDaoTest {
         long time1 = System.currentTimeMillis();
         while(temp != null && !temp.isEmpty()){
             try{
-                Experiment experiment = experimentDao.getExperimentOfTask(temp.trim());
+                Experiment experiment = experimentDao.getParentExperimentOfTask(temp.trim());
                 if(experiment != null) {
                     //System.out.println(i + " :" + experiment.getExperimentId());
                     count++;
@@ -224,7 +224,6 @@ public class ExperimentDaoTest {
         String nodeId = "tempNode_758b52ba-091b-43a5-a7b7-4c3a239c5d1e";
         String newNodeId = "newNode_758b52ba-091b-43a5-a7b7-4c3a2325d1e";
         String expId = "AlamoTest3_3965f4e2-0213-4434-9c3f-fe898b018666";
-        AiravataUtils.setExecutionAsServer();
         ExperimentDao experimentDao = new ExperimentDao();
         WorkflowNodeDetails wfNode = experimentDao.getWFNode("newNode_758b52ba-091b-43a5-a7b7-4c3a239c5d1e");
         Assert.assertTrue(wfNode.getNodeInstanceId().equals("newNode_758b52ba-091b-43a5-a7b7-4c3a239c5d1e"));
@@ -250,8 +249,7 @@ public class ExperimentDaoTest {
 
     @Test
     public void testTask() throws RegistryException {
-        String taskId = "tempNode_f43e1a37-5aec-4061-ae15-111a050b98e0";
-        AiravataUtils.setExecutionAsServer();
+        String taskId = "tempNode_58e1b2e4-f7d6-4543-9281-43dcb58e2c1a";
         ExperimentDao experimentDao = new ExperimentDao();
         TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
         Assert.assertTrue(taskDetails.getTaskId().equals(taskId));
@@ -261,8 +259,20 @@ public class ExperimentDaoTest {
         taskDetails = experimentDao.getTaskDetail(taskId);
         Assert.assertTrue(taskDetails.getTaskId().equals(taskId));
 
-        String expid = "AlamoTest1_6107d1f0-d64e-4690-8686-71ce87c4ad24";
+        String expid = "alamotest2_5420547e-877a-4a9c-8752-377c2806906c";
         Experiment experiment = experimentDao.getExperiment(expid);
         System.out.println();
     }
+
+    @Test
+    public void testSearch() throws RegistryException{
+        Map<String, String> filters = new HashMap();
+        filters.put(Constants.FieldConstants.ExperimentConstants.USER_NAME, "Eroma123");
+        filters.put(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_DESC, "Test");
+        List<Experiment> result = experimentDao.searchExperiments(
+                filters, 10, 2, Constants.FieldConstants.ExperimentConstants.CREATION_TIME, ResultOrderType.DESC);
+        Assert.assertNotNull(result);
+        Assert.assertTrue(result.size()==10);
+        Assert.assertTrue(result.get(0).getCreationTime() > result.get(9).getCreationTime());
+    }
 }
\ No newline at end of file


[08/44] airavata git commit: adding pom file

Posted by sc...@apache.org.
adding pom file


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

Branch: refs/heads/mongo-registry
Commit: fed06c28000fc759a49169095817c88f2014f60b
Parents: b376aa8
Author: Supun Nakandala <sc...@apache.org>
Authored: Wed May 27 00:13:42 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Wed May 27 00:13:42 2015 +0530

----------------------------------------------------------------------
 .../registry/airavata-mongo-registry/pom.xml    | 162 +++++++++++++++++++
 1 file changed, 162 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/fed06c28/modules/registry/airavata-mongo-registry/pom.xml
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/pom.xml b/modules/registry/airavata-mongo-registry/pom.xml
new file mode 100644
index 0000000..6b50e21
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/pom.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file 
+    distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under 
+    the Apache License, Version 2.0 (theÏ "License"); you may not use this file except in compliance with the License. You may 
+    obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to 
+    in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 
+    ANY ~ KIND, either express or implied. See the License for the specific language governing permissions and limitations under 
+    the License. -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <groupId>org.apache.airavata</groupId>
+        <artifactId>registry</artifactId>
+        <version>0.15-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>airavata-mongo-registry</artifactId>
+    <packaging>jar</packaging>
+    <name>Airavata Mongo Registry</name>
+    <url>http://airavata.apache.org/</url>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <!--dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-common-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency-->
+        <!-- Test -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>jcl-over-slf4j</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<scope>test</scope>
+		</dependency>
+        <dependency>
+        	<groupId>org.apache.openjpa</groupId>
+        	<artifactId>openjpa-all</artifactId>
+        	<version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-credential-store</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-data-models</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-registry-cpi</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>${mysql.connector.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derby</artifactId>
+            <version>${derby.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derbyclient</artifactId>
+            <version>${derby.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derbynet</artifactId>
+            <version>${derby.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derbytools</artifactId>
+            <version>${derby.version}</version>
+            <scope>test</scope>
+        </dependency>
+	    <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-server-configuration</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <version>2.5.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mongodb</groupId>
+            <artifactId>mongo-java-driver</artifactId>
+            <version>3.0.0</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>${antrun.version}</version>
+                <executions>
+                    <execution>
+                        <phase>process-classes</phase>
+                        <configuration>
+                            <tasks>
+                                <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask" classpathref="maven.compile.classpath" />
+                                <openjpac>
+                                    <classpath refid="maven.compile.classpath" />
+                                </openjpac>
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>${surefire.version}</version>
+                <inherited>true</inherited>
+                <configuration>
+                    <failIfNoTests>false</failIfNoTests>
+                    <skipTests>${skipTests}</skipTests>
+                    <workingDirectory>${project.build.testOutputDirectory}</workingDirectory>
+                    <!-- making sure that the sure-fire plugin doesn't run the integration tests-->
+                    <!-- Integration tests are run using the fail-safe plugin in the module pom-->
+                    <excludes>
+                        <exclude>**/TaskDetailResourceTest.java</exclude>
+                        <exclude>**/WorkflowNodeDetailResourceTest.java</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>


[12/44] airavata git commit: Adding mongo-registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java
new file mode 100644
index 0000000..791c9f9
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java
@@ -0,0 +1,661 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.utils.StatusType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+
+public class TaskDetailResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(TaskDetailResource.class);
+    private String taskId;
+    private WorkflowNodeDetailResource workflowNodeDetailResource;
+    private Timestamp creationTime;
+    private String applicationId;
+    private String applicationVersion;
+    private String applicationDeploymentId;
+    private boolean enableEmailNotifications;
+
+    public boolean isEnableEmailNotifications() {
+        return enableEmailNotifications;
+    }
+
+    public void setEnableEmailNotifications(boolean enableEmailNotifications) {
+        this.enableEmailNotifications = enableEmailNotifications;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public WorkflowNodeDetailResource getWorkflowNodeDetailResource() {
+        return workflowNodeDetailResource;
+    }
+
+    public void setWorkflowNodeDetailResource(WorkflowNodeDetailResource workflowNodeDetailResource) {
+        this.workflowNodeDetailResource = workflowNodeDetailResource;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public String getApplicationId() {
+        return applicationId;
+    }
+
+    public void setApplicationId(String applicationId) {
+        this.applicationId = applicationId;
+    }
+
+    public String getApplicationVersion() {
+        return applicationVersion;
+    }
+
+    public void setApplicationVersion(String applicationVersion) {
+        this.applicationVersion = applicationVersion;
+    }
+
+    
+    public Resource create(ResourceType type) throws RegistryException{
+       switch (type){
+           case ERROR_DETAIL:
+               ErrorDetailResource errorDetailResource = new ErrorDetailResource();
+               errorDetailResource.setTaskDetailResource(this);
+               return errorDetailResource;
+           case NOTIFICATION_EMAIL:
+               NotificationEmailResource emailResource = new NotificationEmailResource();
+               emailResource.setTaskDetailResource(this);
+               return emailResource;
+           case APPLICATION_INPUT:
+               ApplicationInputResource applicationInputResource = new ApplicationInputResource();
+               applicationInputResource.setTaskDetailResource(this);
+               return applicationInputResource;
+           case APPLICATION_OUTPUT:
+               ApplicationOutputResource applicationOutputResource = new ApplicationOutputResource();
+               applicationOutputResource.setTaskDetailResource(this);
+               return applicationOutputResource;
+           case JOB_DETAIL:
+               JobDetailResource jobDetailResource = new JobDetailResource();
+               jobDetailResource.setTaskDetailResource(this);
+               return jobDetailResource;
+           case DATA_TRANSFER_DETAIL:
+               DataTransferDetailResource dataTransferDetailResource = new DataTransferDetailResource();
+               dataTransferDetailResource.setTaskDetailResource(this);
+               return dataTransferDetailResource;
+           case STATUS:
+               StatusResource statusResource = new StatusResource();
+               statusResource.setTaskDetailResource(this);
+               return statusResource;
+           case COMPUTATIONAL_RESOURCE_SCHEDULING:
+               ComputationSchedulingResource schedulingResource = new ComputationSchedulingResource();
+               schedulingResource.setTaskDetailResource(this);
+               return schedulingResource;
+           case ADVANCE_INPUT_DATA_HANDLING:
+               AdvanceInputDataHandlingResource inputDataHandlingResource = new AdvanceInputDataHandlingResource();
+               inputDataHandlingResource.setTaskDetailResource(this);
+               return inputDataHandlingResource;
+           case ADVANCE_OUTPUT_DATA_HANDLING:
+               AdvancedOutputDataHandlingResource outputDataHandlingResource = new AdvancedOutputDataHandlingResource();
+               outputDataHandlingResource.setTaskDetailResource(this);
+               return outputDataHandlingResource;
+           case QOS_PARAM:
+               QosParamResource qosParamResource = new QosParamResource();
+               qosParamResource.setTaskDetailResource(this);
+               return qosParamResource;
+           default:
+               logger.error("Unsupported resource type for task detail resource.", new IllegalArgumentException());
+               throw new IllegalArgumentException("Unsupported resource type for task detail resource.");
+       }
+    }
+
+    
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+            QueryGenerator generator;
+            switch (type) {
+                case ERROR_DETAIL:
+                    generator = new QueryGenerator(ERROR_DETAIL);
+                    generator.setParameter(ErrorDetailConstants.TASK_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case NOTIFICATION_EMAIL:
+                    generator = new QueryGenerator(NOTIFICATION_EMAIL);
+                    generator.setParameter(NotificationEmailConstants.TASK_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case APPLICATION_INPUT:
+                    generator = new QueryGenerator(APPLICATION_INPUT);
+                    generator.setParameter(ApplicationInputConstants.TASK_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case APPLICATION_OUTPUT:
+                    generator = new QueryGenerator(APPLICATION_OUTPUT);
+                    generator.setParameter(ApplicationOutputConstants.TASK_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case JOB_DETAIL:
+                    generator = new QueryGenerator(JOB_DETAIL);
+                    generator.setParameter(JobDetailConstants.TASK_ID, taskId);
+                    generator.setParameter(JobDetailConstants.JOB_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case DATA_TRANSFER_DETAIL:
+                    generator = new QueryGenerator(DATA_TRANSFER_DETAIL);
+                    generator.setParameter(DataTransferDetailConstants.TRANSFER_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case STATUS:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(StatusConstants.TASK_ID, name);
+                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.TASK.toString());
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                    generator = new QueryGenerator(COMPUTATIONAL_RESOURCE_SCHEDULING);
+                    generator.setParameter(ComputationalResourceSchedulingConstants.TASK_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case ADVANCE_INPUT_DATA_HANDLING:
+                    generator = new QueryGenerator(ADVANCE_INPUT_DATA_HANDLING);
+                    generator.setParameter(AdvancedInputDataHandlingConstants.TASK_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case ADVANCE_OUTPUT_DATA_HANDLING:
+                    generator = new QueryGenerator(ADVANCE_OUTPUT_DATA_HANDLING);
+                    generator.setParameter(AdvancedOutputDataHandlingConstants.TASK_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case QOS_PARAM:
+                    generator = new QueryGenerator(QOS_PARAMS);
+                    generator.setParameter(QosParamsConstants.TASK_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                default:
+                    logger.error("Unsupported resource type for task detail resource.", new IllegalArgumentException());
+                    break;
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    
+    public Resource get(ResourceType type, Object name) throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            QueryGenerator generator;
+            Query q;
+            switch (type) {
+                case ERROR_DETAIL:
+                    generator = new QueryGenerator(ERROR_DETAIL);
+                    generator.setParameter(ErrorDetailConstants.TASK_ID, name);
+                    q = generator.selectQuery(em);
+                    ErrorDetail errorDetail = (ErrorDetail) q.getSingleResult();
+                    ErrorDetailResource errorDetailResource = (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
+                    em.getTransaction().commit();
+                    em.close();
+                    return errorDetailResource;
+                case NOTIFICATION_EMAIL:
+                    generator = new QueryGenerator(NOTIFICATION_EMAIL);
+                    generator.setParameter(NotificationEmailConstants.TASK_ID, name);
+                    q = generator.selectQuery(em);
+                    Notification_Email notificationEmail = (Notification_Email) q.getSingleResult();
+                    NotificationEmailResource emailResource = (NotificationEmailResource) Utils.getResource(ResourceType.NOTIFICATION_EMAIL, notificationEmail);
+                    em.getTransaction().commit();
+                    em.close();
+                    return emailResource;
+                case APPLICATION_INPUT:
+                    generator = new QueryGenerator(APPLICATION_INPUT);
+                    generator.setParameter(ApplicationInputConstants.TASK_ID, name);
+                    q = generator.selectQuery(em);
+                    ApplicationInput applicationInput = (ApplicationInput) q.getSingleResult();
+                    ApplicationInputResource inputResource = (ApplicationInputResource) Utils.getResource(ResourceType.APPLICATION_INPUT, applicationInput);
+                    em.getTransaction().commit();
+                    em.close();
+                    return inputResource;
+                case APPLICATION_OUTPUT:
+                    generator = new QueryGenerator(APPLICATION_OUTPUT);
+                    generator.setParameter(ApplicationOutputConstants.TASK_ID, name);
+                    q = generator.selectQuery(em);
+                    ApplicationOutput applicationOutput = (ApplicationOutput) q.getSingleResult();
+                    ApplicationOutputResource outputResource = (ApplicationOutputResource) Utils.getResource(ResourceType.APPLICATION_OUTPUT, applicationOutput);
+                    em.getTransaction().commit();
+                    em.close();
+                    return outputResource;
+                case JOB_DETAIL:
+                    generator = new QueryGenerator(JOB_DETAIL);
+                    generator.setParameter(JobDetailConstants.JOB_ID, name);
+                    generator.setParameter(JobDetailConstants.TASK_ID, taskId);
+                    q = generator.selectQuery(em);
+                    JobDetail jobDetail = (JobDetail) q.getSingleResult();
+                    JobDetailResource jobDetailResource = (JobDetailResource) Utils.getResource(ResourceType.JOB_DETAIL, jobDetail);
+                    em.getTransaction().commit();
+                    em.close();
+                    return jobDetailResource;
+                case DATA_TRANSFER_DETAIL:
+                    generator = new QueryGenerator(DATA_TRANSFER_DETAIL);
+                    generator.setParameter(DataTransferDetailConstants.TRANSFER_ID, name);
+                    q = generator.selectQuery(em);
+                    DataTransferDetail transferDetail = (DataTransferDetail) q.getSingleResult();
+                    DataTransferDetailResource transferDetailResource = (DataTransferDetailResource) Utils.getResource(ResourceType.DATA_TRANSFER_DETAIL, transferDetail);
+                    em.getTransaction().commit();
+                    em.close();
+                    return transferDetailResource;
+                case STATUS:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(StatusConstants.TASK_ID, name);
+                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.TASK.toString());
+                    q = generator.selectQuery(em);
+                    Status status = (Status) q.getSingleResult();
+                    StatusResource statusResource = (StatusResource) Utils.getResource(ResourceType.STATUS, status);
+                    em.getTransaction().commit();
+                    em.close();
+                    return statusResource;
+                case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                    generator = new QueryGenerator(COMPUTATIONAL_RESOURCE_SCHEDULING);
+                    generator.setParameter(ComputationalResourceSchedulingConstants.TASK_ID, name);
+                    q = generator.selectQuery(em);
+                    Computational_Resource_Scheduling resourceScheduling = (Computational_Resource_Scheduling) q.getSingleResult();
+                    ComputationSchedulingResource schedulingResource = (ComputationSchedulingResource) Utils.getResource(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING, resourceScheduling);
+                    em.getTransaction().commit();
+                    em.close();
+                    return schedulingResource;
+                case ADVANCE_INPUT_DATA_HANDLING:
+                    generator = new QueryGenerator(ADVANCE_INPUT_DATA_HANDLING);
+                    generator.setParameter(AdvancedInputDataHandlingConstants.TASK_ID, name);
+                    q = generator.selectQuery(em);
+                    AdvancedInputDataHandling dataHandling = (AdvancedInputDataHandling) q.getSingleResult();
+                    AdvanceInputDataHandlingResource inputDataHandlingResource = (AdvanceInputDataHandlingResource) Utils.getResource(ResourceType.ADVANCE_INPUT_DATA_HANDLING, dataHandling);
+                    em.getTransaction().commit();
+                    em.close();
+                    return inputDataHandlingResource;
+                case ADVANCE_OUTPUT_DATA_HANDLING:
+                    generator = new QueryGenerator(ADVANCE_OUTPUT_DATA_HANDLING);
+                    generator.setParameter(AdvancedOutputDataHandlingConstants.TASK_ID, name);
+                    q = generator.selectQuery(em);
+                    AdvancedOutputDataHandling outputDataHandling = (AdvancedOutputDataHandling) q.getSingleResult();
+                    AdvancedOutputDataHandlingResource outputDataHandlingResource = (AdvancedOutputDataHandlingResource) Utils.getResource(ResourceType.ADVANCE_OUTPUT_DATA_HANDLING, outputDataHandling);
+                    em.getTransaction().commit();
+                    em.close();
+                    return outputDataHandlingResource;
+                case QOS_PARAM:
+                    generator = new QueryGenerator(QOS_PARAMS);
+                    generator.setParameter(QosParamsConstants.TASK_ID, name);
+                    q = generator.selectQuery(em);
+                    QosParam qosParam = (QosParam) q.getSingleResult();
+                    QosParamResource qosParamResource = (QosParamResource) Utils.getResource(ResourceType.QOS_PARAM, qosParam);
+                    em.getTransaction().commit();
+                    em.close();
+                    return qosParamResource;
+                default:
+                    em.getTransaction().commit();
+                    em.close();
+                    logger.error("Unsupported resource type for workflow node resource.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Unsupported resource type for workflow node resource.");
+            }
+        } catch (Exception e) {
+//            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        List<Resource> resourceList = new ArrayList<Resource>();
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+            QueryGenerator generator;
+            List results;
+            switch (type) {
+                case ERROR_DETAIL:
+                    generator = new QueryGenerator(ERROR_DETAIL);
+                    generator.setParameter(ErrorDetailConstants.TASK_ID, taskId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            ErrorDetail errorDetail = (ErrorDetail) result;
+                            ErrorDetailResource errorDetailResource =
+                                    (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
+                            resourceList.add(errorDetailResource);
+                        }
+                    }
+                    break;
+                case NOTIFICATION_EMAIL:
+                    generator = new QueryGenerator(NOTIFICATION_EMAIL);
+                    generator.setParameter(NotificationEmailConstants.TASK_ID, taskId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            Notification_Email notificationEmail = (Notification_Email) result;
+                            NotificationEmailResource emailResource =
+                                    (NotificationEmailResource) Utils.getResource(ResourceType.NOTIFICATION_EMAIL, notificationEmail);
+                            resourceList.add(emailResource);
+                        }
+                    }
+                    break;
+                case APPLICATION_INPUT:
+                    generator = new QueryGenerator(APPLICATION_INPUT);
+                    generator.setParameter(ApplicationInputConstants.TASK_ID, taskId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            ApplicationInput applicationInput = (ApplicationInput) result;
+                            ApplicationInputResource inputResource =
+                                    (ApplicationInputResource) Utils.getResource(ResourceType.APPLICATION_INPUT, applicationInput);
+                            resourceList.add(inputResource);
+                        }
+                    }
+                    break;
+                case APPLICATION_OUTPUT:
+                    generator = new QueryGenerator(APPLICATION_OUTPUT);
+                    generator.setParameter(ApplicationOutputConstants.TASK_ID, taskId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            ApplicationOutput applicationOutput = (ApplicationOutput) result;
+                            ApplicationOutputResource outputResource =
+                                    (ApplicationOutputResource) Utils.getResource(ResourceType.APPLICATION_OUTPUT, applicationOutput);
+                            resourceList.add(outputResource);
+                        }
+                    }
+                    break;
+                case JOB_DETAIL:
+                    generator = new QueryGenerator(JOB_DETAIL);
+                    generator.setParameter(JobDetailConstants.TASK_ID, taskId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            JobDetail jobDetail = (JobDetail) result;
+                            JobDetailResource jobDetailResource =
+                                    (JobDetailResource) Utils.getResource(ResourceType.JOB_DETAIL, jobDetail);
+                            resourceList.add(jobDetailResource);
+                        }
+                    }
+                    break;
+                case DATA_TRANSFER_DETAIL:
+                    generator = new QueryGenerator(DATA_TRANSFER_DETAIL);
+                    generator.setParameter(DataTransferDetailConstants.TASK_ID, taskId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            DataTransferDetail transferDetail = (DataTransferDetail) result;
+                            DataTransferDetailResource transferDetailResource =
+                                    (DataTransferDetailResource) Utils.getResource(ResourceType.DATA_TRANSFER_DETAIL, transferDetail);
+                            resourceList.add(transferDetailResource);
+                        }
+                    }
+                    break;
+                case STATUS:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(StatusConstants.TASK_ID, taskId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            Status status = (Status) result;
+                            StatusResource statusResource =
+                                    (StatusResource) Utils.getResource(ResourceType.STATUS, status);
+                            resourceList.add(statusResource);
+                        }
+                    }
+                    break;
+                default:
+                    em.getTransaction().commit();
+                    em.close();
+                    logger.error("Unsupported resource type for workflow node details resource.", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return resourceList;
+    }
+
+    
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            TaskDetail taskDetail = em.find(TaskDetail.class, taskId);
+            em.close();
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            WorkflowNodeDetail workflowNodeDetail = em.find(WorkflowNodeDetail.class, workflowNodeDetailResource.getNodeInstanceId());
+            if (taskDetail != null) {
+            	updateTaskDetail(taskDetail, workflowNodeDetail);
+                em.merge(taskDetail);
+            } else {
+                taskDetail = new TaskDetail();
+                updateTaskDetail(taskDetail, workflowNodeDetail);                
+                em.persist(taskDetail);
+            }
+            em.getTransaction().commit();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+	private void updateTaskDetail(TaskDetail taskDetail,
+			WorkflowNodeDetail workflowNodeDetail) {
+		taskDetail.setTaskId(taskId);
+		taskDetail.setNodeDetail(workflowNodeDetail);
+		taskDetail.setNodeId(workflowNodeDetailResource.getNodeInstanceId());
+		taskDetail.setCreationTime(creationTime);
+		taskDetail.setAppId(applicationId);
+		taskDetail.setAppVersion(applicationVersion);
+        taskDetail.setAllowNotification(enableEmailNotifications);
+		taskDetail.setApplicationDeploymentId(getApplicationDeploymentId());
+	}
+
+    public List<ApplicationInputResource> getApplicationInputs() throws RegistryException{
+        List<ApplicationInputResource> applicationInputResources = new ArrayList<ApplicationInputResource>();
+        List<Resource> resources = get(ResourceType.APPLICATION_INPUT);
+        for (Resource resource : resources) {
+            ApplicationInputResource inputResource = (ApplicationInputResource) resource;
+            applicationInputResources.add(inputResource);
+        }
+        return applicationInputResources;
+    }
+
+    public List<ApplicationOutputResource> getApplicationOutputs() throws RegistryException{
+        List<ApplicationOutputResource> outputResources = new ArrayList<ApplicationOutputResource>();
+        List<Resource> resources = get(ResourceType.APPLICATION_OUTPUT);
+        for (Resource resource : resources) {
+            ApplicationOutputResource outputResource = (ApplicationOutputResource) resource;
+            outputResources.add(outputResource);
+        }
+        return outputResources;
+    }
+
+    public StatusResource getTaskStatus() throws RegistryException{
+        List<Resource> resources = get(ResourceType.STATUS);
+        for (Resource resource : resources) {
+            StatusResource taskStatus = (StatusResource) resource;
+            if(taskStatus.getStatusType().equals(StatusType.TASK.toString())){
+                if (taskStatus.getState() == null || taskStatus.getState().equals("") ){
+                    taskStatus.setState("UNKNOWN");
+                }
+                return taskStatus;
+            }
+        }
+        return null;
+    }
+
+    public List<JobDetailResource> getJobDetailList() throws RegistryException{
+        List<JobDetailResource> jobDetailResources = new ArrayList<JobDetailResource>();
+        List<Resource> resources = get(ResourceType.JOB_DETAIL);
+        for (Resource resource : resources) {
+            JobDetailResource jobDetailResource = (JobDetailResource) resource;
+            jobDetailResources.add(jobDetailResource);
+        }
+        return jobDetailResources;
+    }
+
+    public List<DataTransferDetailResource> getDataTransferDetailList() throws RegistryException{
+        List<DataTransferDetailResource> transferDetails = new ArrayList<DataTransferDetailResource>();
+        List<Resource> resources = get(ResourceType.DATA_TRANSFER_DETAIL);
+        for (Resource resource : resources) {
+            DataTransferDetailResource transferDetailResource = (DataTransferDetailResource) resource;
+            transferDetails.add(transferDetailResource);
+        }
+        return transferDetails;
+    }
+
+    public List<ErrorDetailResource> getErrorDetailList() throws RegistryException{
+        List<ErrorDetailResource> errorDetailResources = new ArrayList<ErrorDetailResource>();
+        List<Resource> resources = get(ResourceType.ERROR_DETAIL);
+        for (Resource resource : resources) {
+            ErrorDetailResource errorDetailResource = (ErrorDetailResource) resource;
+            errorDetailResources.add(errorDetailResource);
+        }
+        return errorDetailResources;
+    }
+
+    public ComputationSchedulingResource getComputationScheduling (String taskId) throws RegistryException{
+        return  (ComputationSchedulingResource)get(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING, taskId);
+    }
+
+    public AdvanceInputDataHandlingResource getInputDataHandling (String taskId) throws RegistryException{
+        return  (AdvanceInputDataHandlingResource)get(ResourceType.ADVANCE_INPUT_DATA_HANDLING, taskId);
+    }
+
+    public AdvancedOutputDataHandlingResource getOutputDataHandling (String taskId) throws RegistryException{
+        return  (AdvancedOutputDataHandlingResource)get(ResourceType.ADVANCE_OUTPUT_DATA_HANDLING, taskId);
+    }
+
+    public JobDetailResource createJobDetail (String jobId) throws RegistryException{
+        JobDetailResource resource = (JobDetailResource)create(ResourceType.JOB_DETAIL);
+        resource.setJobId(jobId);
+        return resource;
+    }
+
+    public JobDetailResource getJobDetail (String jobId) throws RegistryException{
+        return (JobDetailResource)get(ResourceType.JOB_DETAIL, jobId);
+    }
+
+    public DataTransferDetailResource getDataTransferDetail (String dataTransferId) throws RegistryException{
+        return (DataTransferDetailResource)get(ResourceType.DATA_TRANSFER_DETAIL, dataTransferId);
+    }
+
+    public  boolean isTaskStatusExist (String taskId) throws RegistryException{
+        return isExists(ResourceType.STATUS, taskId);
+    }
+
+	public String getApplicationDeploymentId() {
+		return applicationDeploymentId;
+	}
+
+	public void setApplicationDeploymentId(String applicationDeploymentId) {
+		this.applicationDeploymentId = applicationDeploymentId;
+	}
+
+    public List<NotificationEmailResource> getNotificationEmails () throws RegistryException{
+        List<NotificationEmailResource> emailResources = new ArrayList<NotificationEmailResource>();
+        List<Resource> resources = get(ResourceType.NOTIFICATION_EMAIL);
+        for (Resource resource : resources) {
+            emailResources.add((NotificationEmailResource) resource);
+        }
+        return emailResources;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserResource.java
new file mode 100644
index 0000000..11f2a4f
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserResource.java
@@ -0,0 +1,186 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.SecurityUtil;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.Users;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import java.security.NoSuchAlgorithmException;
+import java.util.List;
+
+public class UserResource extends AbstractResource {
+    private final static Logger logger = LoggerFactory.getLogger(UserResource.class);
+    private String userName;
+    private String password;
+    /**
+     *
+     */
+    public UserResource() {
+    }
+
+    /**
+     *
+     * @param userName user name
+     */
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    /**
+     *
+     * @return user name
+     */
+    public String getUserName() {
+        return userName;
+    }
+
+
+    /**
+     * User is a hypothical data structure.
+     * @param type child resource type
+     * @return child resource
+     */
+    public Resource create(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for user resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     *
+     * @param type child resource type
+     * @param name child resource name
+     */
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for user resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     *
+     * @param type child resource type
+     * @param name child resource name
+     * @return UnsupportedOperationException
+     */
+    public Resource get(ResourceType type, Object name) throws RegistryException {
+        logger.error("Unsupported resource type for user resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     *
+     * @param type child resource type
+     * @return UnsupportedOperationException
+     */
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        logger.error("Unsupported resource type for user resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * saveExperiment user to the database
+     */
+    public void save() throws RegistryException {
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            Users existingUser = em.find(Users.class, userName);
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Users user = new Users();
+            user.setUser_name(userName);
+            if (password != null && !password.equals("")) {
+                try {
+                    user.setPassword(SecurityUtil.digestString(password,
+                            ServerSettings.getSetting("default.registry.password.hash.method")));
+                } catch (NoSuchAlgorithmException e) {
+                    throw new RuntimeException("Error hashing default admin password. Invalid hash algorithm.", e);
+                } catch (ApplicationSettingsException e) {
+                    throw new RuntimeException("Error reading hash algorithm from configurations", e);
+                }
+            }
+            if (existingUser != null) {
+                if (password != null && !password.equals("")) {
+                    try {
+                        existingUser.setPassword(SecurityUtil.digestString(password,
+                                ServerSettings.getSetting("default.registry.password.hash.method")));
+                    } catch (NoSuchAlgorithmException e) {
+                        throw new RuntimeException("Error hashing default admin password. Invalid hash algorithm.", e);
+                    } catch (ApplicationSettingsException e) {
+                        throw new RuntimeException("Error reading hash algorithm from configurations", e);
+                    }
+                }
+                user = em.merge(existingUser);
+            } else {
+                em.persist(user);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    /**
+     *
+     * @param type child resource type
+     * @param name child resource name
+     * @return UnsupportedOperationException
+     */
+    public boolean isExists(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for user resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     *
+     * @return  password
+     */
+    public String getPassword() {
+        return password;
+    }
+
+    /**
+     *
+     * @param password  password
+     */
+    public void setPassword(String password) {
+        this.password = password;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
new file mode 100644
index 0000000..69ada6d
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
@@ -0,0 +1,824 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.persistance.registry.jpa.JPAConstants;
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.URI;
+
+
+public class Utils {
+    private final static Logger logger = LoggerFactory.getLogger(Utils.class);
+
+    public static String getJDBCFullURL(){
+		String jdbcUrl = getJDBCURL();
+		String jdbcUser = getJDBCUser();
+		String jdbcPassword = getJDBCPassword();
+        jdbcUrl = jdbcUrl + "?"  + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
+        return jdbcUrl;
+    }
+
+    public static String getJDBCURL(){
+    	try {
+            return ServerSettings.getSetting(JPAConstants.KEY_JDBC_URL);
+		} catch (ApplicationSettingsException e) {
+            logger.error(e.getMessage(), e);
+            return null;
+        }
+    }
+
+    public static String getHost(){
+        try{
+            String jdbcURL = getJDBCURL();
+            String cleanURI = jdbcURL.substring(5);
+            URI uri = URI.create(cleanURI);
+            return uri.getHost();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return null;
+        }
+    }
+
+    public static int getPort(){
+        try{
+            String jdbcURL = getJDBCURL();
+            String cleanURI = jdbcURL.substring(5);
+            URI uri = URI.create(cleanURI);
+            return uri.getPort();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return -1;
+        }
+    }
+
+    public static int getJPACacheSize (){
+        try {
+            String cache = ServerSettings.getSetting(JPAConstants.JPA_CACHE_SIZE, "5000");
+            return Integer.parseInt(cache);
+        }catch (Exception e){
+            logger.error(e.getMessage(), e);
+            return -1;
+        }
+    }
+
+    public static String isCachingEnabled (){
+        try {
+            return ServerSettings.getSetting(JPAConstants.ENABLE_CACHING, "true");
+        }catch (Exception e){
+            logger.error(e.getMessage(), e);
+            return "true";
+        }
+    }
+
+    public static String getDBType(){
+        try{
+            String jdbcURL = getJDBCURL();
+            String cleanURI = jdbcURL.substring(5);
+            URI uri = URI.create(cleanURI);
+            return uri.getScheme();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return null;
+        }
+    }
+
+    public static boolean isDerbyStartEnabled(){
+        try {
+            String s = ServerSettings.getSetting(JPAConstants.KEY_DERBY_START_ENABLE);
+            if("true".equals(s)){
+                return true;
+            }
+        } catch (ApplicationSettingsException e) {
+            logger.error(e.getMessage(), e);
+            return false;
+        }
+        return false;
+    }
+
+    public static String getJDBCUser(){
+    	try {
+		    return ServerSettings.getSetting(JPAConstants.KEY_JDBC_USER);
+		} catch (ApplicationSettingsException e) {
+            logger.error(e.getMessage(), e);
+            return null;
+		}
+    }
+
+    public static String getValidationQuery(){
+    	try {
+            return ServerSettings.getSetting(JPAConstants.VALIDATION_QUERY);
+		} catch (ApplicationSettingsException e) {
+            logger.error(e.getMessage(), e);
+            return null;
+		}
+    }
+
+    public static String getJDBCPassword(){
+    	try {
+            return ServerSettings.getSetting(JPAConstants.KEY_JDBC_PASSWORD);
+		} catch (ApplicationSettingsException e) {
+            logger.error(e.getMessage(), e);
+            return null;
+		}
+
+    }
+
+    public static String getJDBCDriver(){
+    	try {
+            return ServerSettings.getSetting(JPAConstants.KEY_JDBC_DRIVER);
+		} catch (ApplicationSettingsException e) {
+            logger.error(e.getMessage(), e);
+            return null;
+		}
+    }
+
+    /**
+     *
+     * @param type model type
+     * @param o model type instance
+     * @return corresponding resource object
+     */
+    public static Resource getResource(ResourceType type, Object o) {
+        switch (type){
+            case GATEWAY:
+                if (o instanceof Gateway) {
+                    return createGateway((Gateway) o);
+                } else {
+                    logger.error("Object should be a Gateway.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a Gateway.");
+                }
+            case PROJECT:
+                if (o instanceof Project){
+                    return createProject((Project) o);
+                } else {
+                    logger.error("Object should be a Project.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a Project.");
+                }
+            case PROJECT_USER:
+                if (o instanceof  ProjectUser){
+                    return createProjectUser((ProjectUser)o);
+                }else {
+                    logger.error("Object should be a ProjectUser.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a ProjectUser.");
+                }
+            case CONFIGURATION:
+                if(o instanceof Configuration){
+                    return createConfiguration((Configuration) o);
+                }else {
+                    logger.error("Object should be a Configuration.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a Configuration.");
+                }
+            case USER:
+                if(o instanceof Users) {
+                    return createUser((Users) o);
+                }else {
+                    logger.error("Object should be a User.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a User.");
+                }
+            case GATEWAY_WORKER:
+                if (o instanceof Gateway_Worker){
+                    return createGatewayWorker((Gateway_Worker)o);
+                } else {
+                    logger.error("Object should be a Gateway Worker.", new IllegalArgumentException());
+                    throw  new IllegalArgumentException("Object should be a Gateway Worker.");
+                }
+            case EXPERIMENT:
+                if (o instanceof  Experiment){
+                    return createExperiment((Experiment)o);
+                }else {
+                    logger.error("Object should be a Experiment.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a Experiment.");
+                }
+            case NOTIFICATION_EMAIL:
+                if (o instanceof  Notification_Email){
+                    return createNotificationEmail((Notification_Email)o);
+                }else {
+                    logger.error("Object should be a Experiment.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a Experiment.");
+                }
+            case EXPERIMENT_INPUT:
+                if (o instanceof  Experiment_Input){
+                    return createExperimentInput((Experiment_Input)o);
+                }else {
+                    logger.error("Object should be a Experiment input data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a Experiment input data.");
+                }
+            case EXPERIMENT_OUTPUT:
+                if (o instanceof  Experiment_Output){
+                    return createExperimentOutput((Experiment_Output)o);
+                }else {
+                    logger.error("Object should be a Experiment output data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a Experiment output data.");
+                }
+            case WORKFLOW_NODE_DETAIL:
+                 if (o instanceof  WorkflowNodeDetail){
+                     return createWorkflowNodeDetail((WorkflowNodeDetail)o);
+                 }else {
+                     logger.error("Object should be a Workflow node data.", new IllegalArgumentException());
+                     throw new IllegalArgumentException("Object should be a Workflow node data.");
+                 }
+            case TASK_DETAIL:
+                if (o instanceof  TaskDetail){
+                    return createTaskDetail((TaskDetail)o);
+                }else {
+                    logger.error("Object should be a task detail data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a task detail data.");
+                }
+            case ERROR_DETAIL:
+                if (o instanceof  ErrorDetail){
+                    return createErrorDetail((ErrorDetail)o);
+                }else {
+                    logger.error("Object should be a error detail data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a error detail data.");
+                }
+            case APPLICATION_INPUT:
+                if (o instanceof  ApplicationInput){
+                    return createApplicationInput((ApplicationInput)o);
+                }else {
+                    logger.error("Object should be a application input data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a application input data.");
+                }
+            case APPLICATION_OUTPUT:
+                if (o instanceof  ApplicationOutput){
+                    return createApplicationOutput((ApplicationOutput)o);
+                }else {
+                    logger.error("Object should be a application output data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a application output data.");
+                }
+            case NODE_INPUT:
+                if (o instanceof  NodeInput){
+                    return createNodeInput((NodeInput)o);
+                }else {
+                    logger.error("Object should be a node input data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a node input data.");
+                }
+            case NODE_OUTPUT:
+                if (o instanceof  NodeOutput){
+                    return createNodeOutput((NodeOutput)o);
+                }else {
+                    logger.error("Object should be a node output data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a node output data.");
+                }
+            case JOB_DETAIL:
+                if (o instanceof  JobDetail){
+                    return createJobDetail((JobDetail)o);
+                }else {
+                    logger.error("Object should be a job detail data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a job detail data.");
+                }
+            case DATA_TRANSFER_DETAIL:
+                if (o instanceof  DataTransferDetail){
+                    return createDataTransferResource((DataTransferDetail)o);
+                }else {
+                    logger.error("Object should be a data transfer detail data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a data transfer detail data.");
+                }
+            case STATUS:
+                if (o instanceof  Status){
+                    return createStatusResource((Status)o);
+                }else {
+                    logger.error("Object should be a status data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be a status data.");
+                }
+            case CONFIG_DATA:
+                if (o instanceof  ExperimentConfigData){
+                    return createExConfigDataResource((ExperimentConfigData)o);
+                }else {
+                    logger.error("Object should be a experiment config data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be experiment config data.");
+                }
+            case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                if (o instanceof  Computational_Resource_Scheduling){
+                    return createComputationalScheduling((Computational_Resource_Scheduling)o);
+                }else {
+                    logger.error("Object should be a scheduling resource data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be scheduling resource data.");
+                }
+            case ADVANCE_INPUT_DATA_HANDLING:
+                if (o instanceof  AdvancedInputDataHandling){
+                    return createAdvancedInputDataResource((AdvancedInputDataHandling)o);
+                }else {
+                    logger.error("Object should be a advanced input data handling data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be advanced input data handling data.");
+                }
+            case ADVANCE_OUTPUT_DATA_HANDLING:
+                if (o instanceof  AdvancedOutputDataHandling){
+                    return createAdvancedOutputDataResource((AdvancedOutputDataHandling)o);
+                }else {
+                    logger.error("Object should be a advanced output data handling data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be advanced output data handling data.");
+                }
+            case QOS_PARAM:
+                if (o instanceof  QosParam){
+                    return createQosParamResource((QosParam)o);
+                }else {
+                    logger.error("Object should be a QOSparam data.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Object should be QOSparam data.");
+                }
+            default:
+                logger.error("Illegal data type..", new IllegalArgumentException());
+                throw new IllegalArgumentException("Illegal data type..");
+        }
+    }
+
+    /**
+     *
+     * @param o  Gateway model object
+     * @return  GatewayResource object
+     */
+    private static Resource createGateway(Gateway o) {
+        GatewayResource gatewayResource = new GatewayResource();
+        gatewayResource.setGatewayName(o.getGateway_name());
+        gatewayResource.setGatewayId(o.getGateway_id());
+        gatewayResource.setDomain(o.getDomain());
+        gatewayResource.setEmailAddress(o.getEmailAddress());
+        return gatewayResource;
+    }
+
+    /**
+     *
+     * @param o Project model object
+     * @return ProjectResource object
+     */
+    private static Resource createProject(Project o) {
+        ProjectResource projectResource = new ProjectResource();
+        if (o != null){
+            projectResource.setId(o.getProject_id());
+            projectResource.setName(o.getProject_name());
+            GatewayResource gatewayResource = (GatewayResource)createGateway(o.getGateway());
+            projectResource.setGateway(gatewayResource);
+            Gateway_Worker gateway_worker = new Gateway_Worker();
+            gateway_worker.setGateway(o.getGateway());
+            gateway_worker.setUser(o.getUsers());
+            gateway_worker.setUser_name(o.getUsers().getUser_name());
+            WorkerResource workerResource = (WorkerResource) createGatewayWorker(gateway_worker);
+            projectResource.setWorker(workerResource);
+            projectResource.setDescription(o.getDescription());
+            projectResource.setCreationTime(o.getCreationTime());
+        }
+
+        return projectResource;
+    }
+
+    private static Resource createProjectUser(ProjectUser o) {
+        ProjectUserResource projectUserResource = new ProjectUserResource();
+        if (o != null){
+            projectUserResource.setUserName(o.getUser().getUser_name());
+            projectUserResource.setProjectId(o.getProjectId());
+        }
+        return projectUserResource;
+    }
+
+    /**
+     *
+     * @param o configuration model object
+     * @return configuration resource object
+     */
+    private static Resource createConfiguration (Configuration o){
+        ConfigurationResource configurationResource = new ConfigurationResource();
+        if (o != null){
+            configurationResource.setConfigKey(o.getConfig_key());
+            configurationResource.setConfigVal(o.getConfig_val());
+            configurationResource.setExpireDate(o.getExpire_date());
+            configurationResource.setCategoryID(o.getCategory_id());
+        }
+
+        return configurationResource;
+    }
+
+    /**
+     *
+     * @param o Gateway_Worker model object
+     * @return  Gateway_Worker resource object
+     */
+    private static Resource createGatewayWorker(Gateway_Worker o) {
+        if (o != null){
+            GatewayResource gatewayResource = new GatewayResource(o.getGateway().getGateway_id());
+            gatewayResource.setDomain(o.getGateway().getGateway_name());
+            gatewayResource.setDomain(o.getGateway().getDomain());
+            gatewayResource.setEmailAddress(o.getGateway().getEmailAddress());
+            return new WorkerResource(o.getUser_name(), gatewayResource);
+        }
+        return null;
+    }
+
+    /**
+     *
+     * @param o  Users model object
+     * @return  UserResource object
+     */
+    private static Resource createUser(Users o) {
+        UserResource userResource = new UserResource();
+        if (o != null){
+            userResource.setUserName(o.getUser_name());
+            userResource.setPassword(o.getPassword());
+        }
+
+        return userResource;
+    }
+
+    /**
+     * @param o Experiment model object
+     * @return  Experiment resource object
+     */
+    private static Resource createExperiment(Experiment o) {
+        ExperimentResource experimentResource = new ExperimentResource();
+        if (o != null){
+            GatewayResource gatewayResource = (GatewayResource)createGateway(o.getGateway());
+            experimentResource.setGateway(gatewayResource);
+            experimentResource.setExecutionUser(o.getExecutionUser());
+            if (o.getProject() != null){
+                ProjectResource projectResource = (ProjectResource)createProject(o.getProject());
+                experimentResource.setProject(projectResource);
+            }
+            experimentResource.setExpID(o.getExpId());
+            experimentResource.setExpName(o.getExpName());
+            experimentResource.setCreationTime(o.getCreationTime());
+            experimentResource.setDescription(o.getExpDesc());
+            experimentResource.setApplicationId(o.getApplicationId());
+            experimentResource.setApplicationVersion(o.getAppVersion());
+            experimentResource.setWorkflowTemplateId(o.getWorkflowTemplateId());
+            experimentResource.setWorkflowTemplateVersion(o.getWorkflowTemplateVersion());
+            experimentResource.setWorkflowExecutionId(o.getWorkflowExecutionId());
+            experimentResource.setEnableEmailNotifications(o.isAllowNotification());
+            experimentResource.setGatewayExecutionId(o.getGatewayExecutionId());
+        }
+
+        return experimentResource;
+    }
+
+    private static Resource createNotificationEmail (Notification_Email o){
+        NotificationEmailResource emailResource = new NotificationEmailResource();
+        if (o != null){
+            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
+            emailResource.setExperimentResource(experimentResource);
+            TaskDetailResource taskDetailResource =  (TaskDetailResource)createTaskDetail(o.getTaskDetail());
+            emailResource.setTaskDetailResource(taskDetailResource);
+            emailResource.setEmailAddress(o.getEmailAddress());
+        }
+        return emailResource;
+    }
+
+    private static Resource createExperimentInput (Experiment_Input o){
+        ExperimentInputResource eInputResource = new ExperimentInputResource();
+        if (o != null){
+            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
+            eInputResource.setExperimentResource(experimentResource);
+            eInputResource.setDataType(o.getDataType());
+            eInputResource.setMetadata(o.getMetadata());
+            eInputResource.setExperimentKey(o.getEx_key());
+            eInputResource.setAppArgument(o.getAppArgument());
+            eInputResource.setInputOrder(o.getInputOrder());
+            eInputResource.setStandardInput(o.isStandardInput());
+            eInputResource.setUserFriendlyDesc(o.getUserFriendlyDesc());
+            eInputResource.setRequired(o.isRequired());
+            eInputResource.setRequiredToCMD(o.isRequiredToCMD());
+            eInputResource.setDataStaged(o.isDataStaged());
+
+            if (o.getValue() != null){
+                eInputResource.setValue(new String(o.getValue()));
+            }
+
+        }
+        return eInputResource;
+    }
+
+    private static Resource createExperimentOutput (Experiment_Output o){
+        ExperimentOutputResource eOutputResource = new ExperimentOutputResource();
+        if (o != null){
+            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
+            eOutputResource.setExperimentResource(experimentResource);
+            eOutputResource.setExperimentKey(o.getEx_key());
+            if (o.getValue() != null){
+                eOutputResource.setValue(new String(o.getValue()));
+            }
+            eOutputResource.setDataType(o.getDataType());
+            eOutputResource.setRequired(o.isRequired());
+            eOutputResource.setRequiredToCMD(o.isRequiredToCMD());
+            eOutputResource.setDataMovement(o.isDataMovement());
+            eOutputResource.setDataNameLocation(o.getDataNameLocation());
+            eOutputResource.setSearchQuery(o.getSearchQuery());
+            eOutputResource.setAppArgument(o.getApplicationArgument());
+        }
+        return eOutputResource;
+    }
+
+    private static Resource createWorkflowNodeDetail (WorkflowNodeDetail o){
+        WorkflowNodeDetailResource nodeDetailResource = new WorkflowNodeDetailResource();
+        if (o != null){
+            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
+            nodeDetailResource.setExperimentResource(experimentResource);
+            nodeDetailResource.setCreationTime(o.getCreationTime());
+            nodeDetailResource.setNodeInstanceId(o.getNodeId());
+            nodeDetailResource.setNodeName(o.getNodeName());
+            nodeDetailResource.setExecutionUnit(o.getExecutionUnit());
+            nodeDetailResource.setExecutionUnitData(o.getExecutionUnitData());
+
+        }
+        return nodeDetailResource;
+    }
+
+    private static Resource createTaskDetail(TaskDetail o){
+        TaskDetailResource taskDetailResource = new TaskDetailResource();
+        if ( o != null){
+            WorkflowNodeDetailResource nodeDetailResource = (WorkflowNodeDetailResource)createWorkflowNodeDetail(o.getNodeDetail());
+            taskDetailResource.setWorkflowNodeDetailResource(nodeDetailResource);
+            taskDetailResource.setCreationTime(o.getCreationTime());
+            taskDetailResource.setTaskId(o.getTaskId());
+            taskDetailResource.setApplicationId(o.getAppId());
+            taskDetailResource.setApplicationVersion(o.getAppVersion());
+            taskDetailResource.setApplicationDeploymentId(o.getApplicationDeploymentId());
+            taskDetailResource.setEnableEmailNotifications(o.isAllowNotification());
+        }
+        return taskDetailResource;
+    }
+
+    private static Resource createErrorDetail (ErrorDetail o){
+        ErrorDetailResource errorDetailResource = new ErrorDetailResource();
+        if (o != null){
+            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
+            errorDetailResource.setExperimentResource(experimentResource);
+            if (o.getTask() != null){
+                TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
+                errorDetailResource.setTaskDetailResource(taskDetailResource);
+            }
+            if (o.getNodeDetails() != null){
+                WorkflowNodeDetailResource nodeDetailResource = (WorkflowNodeDetailResource)createWorkflowNodeDetail(o.getNodeDetails());
+                errorDetailResource.setNodeDetail(nodeDetailResource);
+            }
+            errorDetailResource.setErrorId(o.getErrorId());
+            errorDetailResource.setJobId(o.getJobId());
+            errorDetailResource.setCreationTime(o.getCreationTime());
+            if (o.getActualErrorMsg() != null){
+                errorDetailResource.setActualErrorMsg(new String(o.getActualErrorMsg()));
+            }
+            errorDetailResource.setUserFriendlyErrorMsg(o.getUserFriendlyErrorMsg());
+            errorDetailResource.setTransientPersistent(o.isTransientPersistent());
+            errorDetailResource.setErrorCategory(o.getErrorCategory());
+            errorDetailResource.setCorrectiveAction(o.getCorrectiveAction());
+            errorDetailResource.setActionableGroup(o.getActionableGroup());
+        }
+
+        return errorDetailResource;
+    }
+
+    private static Resource createApplicationInput (ApplicationInput o){
+        ApplicationInputResource inputResource = new ApplicationInputResource();
+        if (o != null){
+            TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
+            inputResource.setTaskDetailResource(taskDetailResource);
+            inputResource.setInputKey(o.getInputKey());
+            inputResource.setDataType(o.getDataType());
+            inputResource.setAppArgument(o.getAppArgument());
+            inputResource.setInputOrder(o.getInputOrder());
+            inputResource.setStandardInput(o.isStandardInput());
+            inputResource.setUserFriendlyDesc(o.getUserFriendlyDesc());
+            inputResource.setRequired(o.isRequired());
+            inputResource.setRequiredToCMD(o.isRequiredToCMD());
+            inputResource.setDataStaged(o.isDataStaged());
+            if (o.getValue() != null){
+                inputResource.setValue(new String(o.getValue()));
+            }
+            inputResource.setMetadata(o.getMetadata());
+        }
+        return inputResource;
+    }
+
+    private static Resource createApplicationOutput (ApplicationOutput o){
+        ApplicationOutputResource outputResource = new ApplicationOutputResource();
+        if (o != null){
+            TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
+            outputResource.setTaskDetailResource(taskDetailResource);
+            outputResource.setDataType(o.getDataType());
+            outputResource.setOutputKey(o.getOutputKey());
+            if (o.getValue() != null){
+                outputResource.setValue(new String(o.getValue()));
+            }
+            outputResource.setRequired(o.isRequired());
+            outputResource.setRequiredToCMD(o.isAddedToCmd());
+            outputResource.setDataMovement(o.isDataMovement());
+            outputResource.setDataNameLocation(o.getDataNameLocation());
+            outputResource.setSearchQuery(o.getSearchQuery());
+            outputResource.setAppArgument(o.getApplicationArgument());
+        }
+        return outputResource;
+    }
+
+    private static Resource createNodeInput (NodeInput o){
+        NodeInputResource inputResource = new NodeInputResource();
+        if (o != null){
+            WorkflowNodeDetailResource nodeDetailResource = (WorkflowNodeDetailResource)createWorkflowNodeDetail(o.getNodeDetails());
+            inputResource.setNodeDetailResource(nodeDetailResource);
+            inputResource.setInputKey(o.getInputKey());
+            inputResource.setDataType(o.getDataType());
+            inputResource.setValue(o.getValue());
+            inputResource.setMetadata(o.getMetadata());
+            inputResource.setAppArgument(o.getAppArgument());
+            inputResource.setInputOrder(o.getInputOrder());
+            inputResource.setStandardInput(o.isStandardInput());
+            inputResource.setUserFriendlyDesc(o.getUserFriendlyDesc());
+            inputResource.setRequired(o.getIsRequired());
+            inputResource.setRequiredToCMD(o.getRequiredToCMD());
+            inputResource.setDataStaged(o.isDataStaged());
+        }
+        return inputResource;
+    }
+
+    private static Resource createNodeOutput (NodeOutput o){
+        NodeOutputResource outputResource = new NodeOutputResource();
+        if (o != null){
+            WorkflowNodeDetailResource nodeDetailResource = (WorkflowNodeDetailResource)createWorkflowNodeDetail(o.getNode());
+            outputResource.setNodeDetailResource(nodeDetailResource);
+            outputResource.setDataType(o.getDataType());
+            outputResource.setOutputKey(o.getOutputKey());
+            outputResource.setValue(o.getValue());
+            outputResource.setRequired(o.isRequired());
+            outputResource.setRequiredToCMD(o.isRequiredToCMD());
+            outputResource.setDataMovement(o.isDataMovement());
+            outputResource.setDataNameLocation(o.getDataNameLocation());
+            outputResource.setSearchQuery(o.getSearchQuery());
+            outputResource.setAppArgument(o.getApplicationArgument());
+        }
+
+        return outputResource;
+    }
+
+    private static Resource createJobDetail (JobDetail o){
+        JobDetailResource jobDetailResource = new JobDetailResource();
+        if (o != null){
+            TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
+            jobDetailResource.setTaskDetailResource(taskDetailResource);
+            if (o.getJobDescription() != null){
+                jobDetailResource.setJobDescription(new String(o.getJobDescription()));
+            }
+            jobDetailResource.setJobId(o.getJobId());
+            jobDetailResource.setCreationTime(o.getCreationTime());
+            jobDetailResource.setComputeResourceConsumed(o.getComputeResourceConsumed());
+            jobDetailResource.setJobName(o.getJobName());
+            jobDetailResource.setWorkingDir(o.getWorkingDir());
+
+        }
+
+        return jobDetailResource;
+    }
+
+    private static Resource createDataTransferResource (DataTransferDetail o){
+        DataTransferDetailResource transferDetailResource = new DataTransferDetailResource();
+        if (o != null){
+            TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
+            transferDetailResource.setTaskDetailResource(taskDetailResource);
+            transferDetailResource.setTransferId(o.getTransferId());
+            transferDetailResource.setCreationTime(o.getCreationTime());
+            if (o.getTransferDesc() != null){
+                transferDetailResource.setTransferDescription(new String(o.getTransferDesc()));
+            }
+
+        }
+        return transferDetailResource;
+    }
+
+    private static Resource createStatusResource (Status o){
+        StatusResource statusResource = new StatusResource();
+        if (o != null){
+            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
+            statusResource.setExperimentResource(experimentResource);
+            if (o.getTask() != null){
+                TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
+                statusResource.setTaskDetailResource(taskDetailResource);
+            }
+            if (o.getNode() != null){
+                WorkflowNodeDetailResource nodeDetailResource = (WorkflowNodeDetailResource)createWorkflowNodeDetail(o.getNode());
+                statusResource.setWorkflowNodeDetail(nodeDetailResource);
+            }
+            if (o.getTransferDetail() != null){
+                DataTransferDetailResource transferDetailResource = (DataTransferDetailResource)createDataTransferResource(o.getTransferDetail());
+                statusResource.setDataTransferDetail(transferDetailResource);
+            }
+            statusResource.setStatusId(o.getStatusId());
+            statusResource.setJobId(o.getJobId());
+            statusResource.setState(o.getState());
+            statusResource.setStatusUpdateTime(o.getStatusUpdateTime());
+            statusResource.setStatusType(o.getStatusType());
+        }
+
+        return statusResource;
+    }
+
+    private static Resource createExConfigDataResource (ExperimentConfigData o){
+        ConfigDataResource configDataResource = new ConfigDataResource();
+        if (o != null){
+            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
+            configDataResource.setExperimentResource(experimentResource);
+            configDataResource.setAiravataAutoSchedule(o.isAiravataAutoSchedule());
+            configDataResource.setOverrideManualParams(o.isOverrideManualParams());
+            configDataResource.setShareExp(o.isShareExp());
+            configDataResource.setUserDn(o.getUserDn());
+            configDataResource.setGenerateCert(o.isGenerateCert());
+        }
+        return configDataResource;
+    }
+
+    private static Resource createComputationalScheduling (Computational_Resource_Scheduling o){
+        ComputationSchedulingResource schedulingResource = new ComputationSchedulingResource();
+        if (o != null){
+            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
+            schedulingResource.setExperimentResource(experimentResource);
+            if (o.getTask() != null){
+                TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
+                schedulingResource.setTaskDetailResource(taskDetailResource);
+            }
+            schedulingResource.setSchedulingId(o.getSchedulingId());
+            schedulingResource.setResourceHostId(o.getResourceHostId());
+            schedulingResource.setCpuCount(o.getCpuCount());
+            schedulingResource.setNodeCount(o.getNodeCount());
+            schedulingResource.setNumberOfThreads(o.getNumberOfThreads());
+            schedulingResource.setQueueName(o.getQueueName());
+            schedulingResource.setWalltimeLimit(o.getWallTimeLimit());
+            schedulingResource.setJobStartTime(o.getJobStartTime());
+            schedulingResource.setPhysicalMemory(o.getTotalPhysicalmemory());
+            schedulingResource.setProjectName(o.getProjectName());
+            schedulingResource.setChessisName(o.getChessisName());
+        }
+
+        return schedulingResource;
+    }
+
+    private static Resource createAdvancedInputDataResource (AdvancedInputDataHandling o){
+        AdvanceInputDataHandlingResource dataHandlingResource = new AdvanceInputDataHandlingResource();
+        if (o != null){
+            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
+            dataHandlingResource.setExperimentResource(experimentResource);
+            if (o.getTask() != null){
+                TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
+                dataHandlingResource.setTaskDetailResource(taskDetailResource);
+            }
+            dataHandlingResource.setDataHandlingId(o.getDataHandlingId());
+            dataHandlingResource.setWorkingDirParent(o.getParentWorkingDir());
+            dataHandlingResource.setWorkingDir(o.getWorkingDir());
+            dataHandlingResource.setStageInputFiles(o.isStageInputsToWorkingDir());
+            dataHandlingResource.setCleanAfterJob(o.isCleanAfterJob());
+        }
+
+        return dataHandlingResource;
+    }
+
+    private static Resource createAdvancedOutputDataResource (AdvancedOutputDataHandling o){
+        AdvancedOutputDataHandlingResource dataHandlingResource = new AdvancedOutputDataHandlingResource();
+        if (o != null){
+            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
+            dataHandlingResource.setExperimentResource(experimentResource);
+            if (o.getTask() != null){
+                TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
+                dataHandlingResource.setTaskDetailResource(taskDetailResource);
+            }
+            dataHandlingResource.setOutputDataHandlingId(o.getOutputDataHandlingId());
+            dataHandlingResource.setOutputDataDir(o.getOutputDataDir());
+            dataHandlingResource.setDataRegUrl(o.getDataRegUrl());
+            dataHandlingResource.setPersistOutputData(o.isPersistOutputData());
+        }
+        return dataHandlingResource;
+    }
+
+    private static Resource createQosParamResource (QosParam o){
+        QosParamResource qosParamResource = new QosParamResource();
+        if (o != null){
+            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
+            qosParamResource.setExperimentResource(experimentResource);
+            if (o.getTask() != null){
+                TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
+                qosParamResource.setTaskDetailResource(taskDetailResource);
+            }
+            qosParamResource.setQosId(o.getQosId());
+            qosParamResource.setExecuteBefore(o.getExecuteBefore());
+            qosParamResource.setStartExecutionAt(o.getStartExecutionAt());
+            qosParamResource.setNoOfRetries(o.getNoOfRetries());
+        }
+
+        return qosParamResource;
+    }
+}


[16/44] airavata git commit: Adding mongo-registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsDeserializer.java
new file mode 100644
index 0000000..03399f8
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.qosp;
+
+import org.apache.airavata.model.workspace.experiment.QualityOfServiceParams;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class QualityOfServiceParamsDeserializer extends
+        AbstractThriftDeserializer<QualityOfServiceParams._Fields, QualityOfServiceParams> {
+
+    @Override
+    protected QualityOfServiceParams._Fields getField(final String fieldName) {
+        return QualityOfServiceParams._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected QualityOfServiceParams newInstance() {
+        return new QualityOfServiceParams();
+    }
+
+    @Override
+    protected void validate(final QualityOfServiceParams instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsSerializer.java
new file mode 100644
index 0000000..c6c6d05
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/qosp/QualityOfServiceParamsSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.qosp;
+
+import org.apache.airavata.model.workspace.experiment.QualityOfServiceParams;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class QualityOfServiceParamsSerializer extends
+        AbstractThriftSerializer<QualityOfServiceParams._Fields, QualityOfServiceParams> {
+    private final static Logger logger = LoggerFactory.getLogger(QualityOfServiceParamsSerializer.class);
+
+    @Override
+    protected QualityOfServiceParams._Fields[] getFieldValues() {
+        return QualityOfServiceParams._Fields.values();
+    }
+
+    @Override
+    protected Class<QualityOfServiceParams> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsDeserializer.java
new file mode 100644
index 0000000..cb710c9
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.taskdetails;
+
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class TaskDetailsDeserializer extends
+        AbstractThriftDeserializer<TaskDetails._Fields, TaskDetails> {
+
+    @Override
+    protected TaskDetails._Fields getField(final String fieldName) {
+        return TaskDetails._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected TaskDetails newInstance() {
+        return new TaskDetails();
+    }
+
+    @Override
+    protected void validate(final TaskDetails instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsSerializer.java
new file mode 100644
index 0000000..ccfe1b4
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskdetails/TaskDetailsSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.taskdetails;
+
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TaskDetailsSerializer extends
+        AbstractThriftSerializer<TaskDetails._Fields, TaskDetails> {
+    private final static Logger logger = LoggerFactory.getLogger(TaskDetailsSerializer.class);
+
+    @Override
+    protected TaskDetails._Fields[] getFieldValues() {
+        return TaskDetails._Fields.values();
+    }
+
+    @Override
+    protected Class<TaskDetails> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusDeserializer.java
new file mode 100644
index 0000000..d198242
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.taskstatus;
+
+import org.apache.airavata.model.workspace.experiment.TaskStatus;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class TaskStatusDeserializer extends
+        AbstractThriftDeserializer<TaskStatus._Fields, TaskStatus> {
+
+    @Override
+    protected TaskStatus._Fields getField(final String fieldName) {
+        return TaskStatus._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected TaskStatus newInstance() {
+        return new TaskStatus();
+    }
+
+    @Override
+    protected void validate(final TaskStatus instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusSerializer.java
new file mode 100644
index 0000000..b09095e
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/taskstatus/TaskStatusSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.taskstatus;
+
+import org.apache.airavata.model.workspace.experiment.TaskStatus;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TaskStatusSerializer extends
+        AbstractThriftSerializer<TaskStatus._Fields, TaskStatus> {
+    private final static Logger logger = LoggerFactory.getLogger(TaskStatusSerializer.class);
+
+    @Override
+    protected TaskStatus._Fields[] getFieldValues() {
+        return TaskStatus._Fields.values();
+    }
+
+    @Override
+    protected Class<TaskStatus> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusDeserializer.java
new file mode 100644
index 0000000..5662715
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.trstatus;
+
+import org.apache.airavata.model.workspace.experiment.TransferStatus;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class TransferStatusDeserializer extends
+        AbstractThriftDeserializer<TransferStatus._Fields, TransferStatus> {
+
+    @Override
+    protected TransferStatus._Fields getField(final String fieldName) {
+        return TransferStatus._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected TransferStatus newInstance() {
+        return new TransferStatus();
+    }
+
+    @Override
+    protected void validate(final TransferStatus instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusSerializer.java
new file mode 100644
index 0000000..bf94779
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/trstatus/TransferStatusSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.trstatus;
+
+import org.apache.airavata.model.workspace.experiment.TransferStatus;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TransferStatusSerializer extends
+        AbstractThriftSerializer<TransferStatus._Fields, TransferStatus> {
+    private final static Logger logger = LoggerFactory.getLogger(TransferStatusSerializer.class);
+
+    @Override
+    protected TransferStatus._Fields[] getFieldValues() {
+        return TransferStatus._Fields.values();
+    }
+
+    @Override
+    protected Class<TransferStatus> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataDeserializer.java
new file mode 100644
index 0000000..aa8c7a2
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.ucdata;
+
+import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class UserConfigurationDataDeserializer extends
+        AbstractThriftDeserializer<UserConfigurationData._Fields, UserConfigurationData> {
+
+    @Override
+    protected UserConfigurationData._Fields getField(final String fieldName) {
+        return UserConfigurationData._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected UserConfigurationData newInstance() {
+        return new UserConfigurationData();
+    }
+
+    @Override
+    protected void validate(final UserConfigurationData instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataSerializer.java
new file mode 100644
index 0000000..dca810d
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ucdata/UserConfigurationDataSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.ucdata;
+
+import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class UserConfigurationDataSerializer extends
+        AbstractThriftSerializer<UserConfigurationData._Fields, UserConfigurationData> {
+    private final static Logger logger = LoggerFactory.getLogger(UserConfigurationDataSerializer.class);
+
+    @Override
+    protected UserConfigurationData._Fields[] getFieldValues() {
+        return UserConfigurationData._Fields.values();
+    }
+
+    @Override
+    protected Class<UserConfigurationData> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsDeserializer.java
new file mode 100644
index 0000000..f13c9dc
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.validationrslt;
+
+import org.apache.airavata.model.workspace.experiment.ValidationResults;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ValidationResultsDeserializer extends
+        AbstractThriftDeserializer<ValidationResults._Fields, ValidationResults> {
+
+    @Override
+    protected ValidationResults._Fields getField(final String fieldName) {
+        return ValidationResults._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected ValidationResults newInstance() {
+        return new ValidationResults();
+    }
+
+    @Override
+    protected void validate(final ValidationResults instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsSerializer.java
new file mode 100644
index 0000000..6d6dd64
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validationrslt/ValidationResultsSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.validationrslt;
+
+import org.apache.airavata.model.workspace.experiment.ValidationResults;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ValidationResultsSerializer extends
+        AbstractThriftSerializer<ValidationResults._Fields, ValidationResults> {
+    private final static Logger logger = LoggerFactory.getLogger(ValidationResultsSerializer.class);
+
+    @Override
+    protected ValidationResults._Fields[] getFieldValues() {
+        return ValidationResults._Fields.values();
+    }
+
+    @Override
+    protected Class<ValidationResults> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultDeserializer.java
new file mode 100644
index 0000000..333f9eb
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.validatorrslt;
+
+import org.apache.airavata.model.error.ValidatorResult;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ValidatorResultDeserializer extends
+        AbstractThriftDeserializer<ValidatorResult._Fields, ValidatorResult> {
+
+    @Override
+    protected ValidatorResult._Fields getField(final String fieldName) {
+        return ValidatorResult._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected ValidatorResult newInstance() {
+        return new ValidatorResult();
+    }
+
+    @Override
+    protected void validate(final ValidatorResult instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultSerializer.java
new file mode 100644
index 0000000..c7e5c6c
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/validatorrslt/ValidatorResultSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.validatorrslt;
+
+import org.apache.airavata.model.error.ValidatorResult;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ValidatorResultSerializer extends
+        AbstractThriftSerializer<ValidatorResult._Fields, ValidatorResult> {
+    private final static Logger logger = LoggerFactory.getLogger(ValidatorResultSerializer.class);
+
+    @Override
+    protected ValidatorResult._Fields[] getFieldValues() {
+        return ValidatorResult._Fields.values();
+    }
+
+    @Override
+    protected Class<ValidatorResult> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsDeserializer.java
new file mode 100644
index 0000000..a51bcee
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.wfnd;
+
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class WorkflowNodeDetailsDeserializer extends
+        AbstractThriftDeserializer<WorkflowNodeDetails._Fields, WorkflowNodeDetails> {
+
+    @Override
+    protected WorkflowNodeDetails._Fields getField(final String fieldName) {
+        return WorkflowNodeDetails._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected WorkflowNodeDetails newInstance() {
+        return new WorkflowNodeDetails();
+    }
+
+    @Override
+    protected void validate(final WorkflowNodeDetails instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsSerializer.java
new file mode 100644
index 0000000..cfdef1a
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.wfnd;
+
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class WorkflowNodeDetailsSerializer extends
+        AbstractThriftSerializer<WorkflowNodeDetails._Fields, WorkflowNodeDetails> {
+    private final static Logger logger = LoggerFactory.getLogger(WorkflowNodeDetailsSerializer.class);
+
+    @Override
+    protected WorkflowNodeDetails._Fields[] getFieldValues() {
+        return WorkflowNodeDetails._Fields.values();
+    }
+
+    @Override
+    protected Class<WorkflowNodeDetails> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusDeserializer.java
new file mode 100644
index 0000000..92b0047
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.wfns;
+
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeStatus;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class WorkflowNodeStatusDeserializer extends
+        AbstractThriftDeserializer<WorkflowNodeStatus._Fields, WorkflowNodeStatus> {
+
+    @Override
+    protected WorkflowNodeStatus._Fields getField(final String fieldName) {
+        return WorkflowNodeStatus._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected WorkflowNodeStatus newInstance() {
+        return new WorkflowNodeStatus();
+    }
+
+    @Override
+    protected void validate(final WorkflowNodeStatus instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusSerializer.java
new file mode 100644
index 0000000..16dc293
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/wfns/WorkflowNodeStatusSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.experiment.wfns;
+
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeStatus;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class WorkflowNodeStatusSerializer extends
+        AbstractThriftSerializer<WorkflowNodeStatus._Fields, WorkflowNodeStatus> {
+    private final static Logger logger = LoggerFactory.getLogger(WorkflowNodeStatusSerializer.class);
+
+    @Override
+    protected WorkflowNodeStatus._Fields[] getFieldValues() {
+        return WorkflowNodeStatus._Fields.values();
+    }
+
+    @Override
+    protected Class<WorkflowNodeStatus> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewayDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewayDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewayDeserializer.java
new file mode 100644
index 0000000..32c929b
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewayDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.gateway;
+
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class GatewayDeserializer extends
+        AbstractThriftDeserializer<Gateway._Fields, Gateway> {
+
+    @Override
+    protected Gateway._Fields getField(final String fieldName) {
+        return Gateway._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected Gateway newInstance() {
+        return new Gateway();
+    }
+
+    @Override
+    protected void validate(final Gateway instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewaySerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewaySerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewaySerializer.java
new file mode 100644
index 0000000..f863e7e
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/gateway/GatewaySerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.gateway;
+
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GatewaySerializer extends
+        AbstractThriftSerializer<Gateway._Fields, Gateway> {
+    private final static Logger logger = LoggerFactory.getLogger(GatewaySerializer.class);
+
+    @Override
+    protected Gateway._Fields[] getFieldValues() {
+        return Gateway._Fields.values();
+    }
+
+    @Override
+    protected Class<Gateway> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupDeserializer.java
new file mode 100644
index 0000000..6ed949c
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.group;
+
+import org.apache.airavata.model.workspace.Group;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class GroupDeserializer extends
+        AbstractThriftDeserializer<Group._Fields, Group> {
+
+    @Override
+    protected Group._Fields getField(final String fieldName) {
+        return Group._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected Group newInstance() {
+        return new Group();
+    }
+
+    @Override
+    protected void validate(final Group instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupSerializer.java
new file mode 100644
index 0000000..f28348a
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/group/GroupSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.group;
+
+import org.apache.airavata.model.workspace.Group;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GroupSerializer extends
+        AbstractThriftSerializer<Group._Fields, Group> {
+    private final static Logger logger = LoggerFactory.getLogger(GroupSerializer.class);
+
+    @Override
+    protected Group._Fields[] getFieldValues() {
+        return Group._Fields.values();
+    }
+
+    @Override
+    protected Class<Group> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectDeserializer.java
new file mode 100644
index 0000000..5e5c5ea
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.project;
+
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ProjectDeserializer extends
+        AbstractThriftDeserializer<Project._Fields, Project> {
+
+    @Override
+    protected Project._Fields getField(final String fieldName) {
+        return Project._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected Project newInstance() {
+        return new Project();
+    }
+
+    @Override
+    protected void validate(final Project instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectSerializer.java
new file mode 100644
index 0000000..056ee66
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/project/ProjectSerializer.java
@@ -0,0 +1,40 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.project;
+
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ProjectSerializer extends AbstractThriftSerializer<Project._Fields, Project> {
+    private final static Logger logger = LoggerFactory.getLogger(ProjectSerializer.class);
+
+    @Override
+    protected Project._Fields[] getFieldValues() {
+        return Project._Fields.values();
+    }
+
+    @Override
+    protected Class<Project> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserDeserializer.java
new file mode 100644
index 0000000..df595bf
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.user;
+
+import org.apache.airavata.model.workspace.User;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class UserDeserializer extends
+        AbstractThriftDeserializer<User._Fields, User> {
+
+    @Override
+    protected User._Fields getField(final String fieldName) {
+        return User._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected User newInstance() {
+        return new User();
+    }
+
+    @Override
+    protected void validate(final User instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserSerializer.java
new file mode 100644
index 0000000..a09aca2
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/user/UserSerializer.java
@@ -0,0 +1,40 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.conversion.user;
+
+import org.apache.airavata.model.workspace.User;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class UserSerializer extends AbstractThriftSerializer<User._Fields, User> {
+    private final static Logger logger = LoggerFactory.getLogger(UserSerializer.class);
+
+    @Override
+    protected User._Fields[] getFieldValues() {
+        return User._Fields.values();
+    }
+
+    @Override
+    protected Class<User> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ExperimentDao.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ExperimentDao.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ExperimentDao.java
new file mode 100644
index 0000000..85375ed
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/dao/ExperimentDao.java
@@ -0,0 +1,346 @@
+/*
+ *
+ * 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.persistance.registry.jpa.mongo.dao;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.mongodb.*;
+import com.mongodb.util.JSON;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
+import org.apache.airavata.persistance.registry.jpa.mongo.conversion.ModelConversionHelper;
+import org.apache.airavata.persistance.registry.jpa.mongo.utils.MongoUtil;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.ResultOrderType;
+import org.apache.airavata.registry.cpi.utils.Constants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class ExperimentDao{
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentDao.class);
+
+    private static final String EXPERIMENTS_COLLECTION_NAME = "experiments";
+    private DBCollection collection;
+    private ModelConversionHelper modelConversionHelper;
+
+    private static final String EXPERIMENT_ID = "experiment_id";
+    private static final String EXPERIMENT_NAME= "experiment_name";
+    private static final String EXPERIMENT_DESCRIPTION = "experiment_description";
+    private static final String USER_NAME = "user_name";
+    private static final String GATEWAY = "gateway_execution_id";
+    private static final String APPLICATION_ID = "application_id";
+    private static final String EXPERIMENT_STATUS_STATE = "experiment_status.experiment_state";
+    private static final String CREATION_TIME = "creation_time";
+
+    private static final String WORKFLOW_NODE_ID = "workflow_node_details_list.node_instance_id";
+    private static final String TASK_ID = "workflow_node_details_list.task_details_list.task_id";
+
+
+    public ExperimentDao(){
+        collection = MongoUtil.getAiravataRegistry().getCollection(EXPERIMENTS_COLLECTION_NAME);
+        modelConversionHelper = new ModelConversionHelper();
+        //collection.dropIndexes();
+        initIndexes();
+    }
+
+    /**
+     * If indexes are already defined this will simply ignore them
+     */
+    private void initIndexes(){
+        collection.createIndex(new BasicDBObject(EXPERIMENT_ID, 1), new BasicDBObject("unique", true));
+        collection.createIndex(new BasicDBObject(WORKFLOW_NODE_ID, 1));
+        collection.createIndex(new BasicDBObject(TASK_ID, 1));
+
+        //Defining a full-text index on experiment name and experiment description
+        BasicDBObject object = new BasicDBObject();
+        object.put(EXPERIMENT_NAME, "text");
+        object.put(EXPERIMENT_DESCRIPTION, "text");
+        collection.createIndex (object);
+    }
+
+    public List<Experiment> getAllExperiments() throws RegistryException{
+        List<Experiment> experimentList = new ArrayList<Experiment>();
+        DBCursor cursor = collection.find();
+        for(DBObject document: cursor){
+            try {
+                experimentList.add((Experiment) modelConversionHelper.deserializeObject(
+                        Experiment.class, document.toString()));
+            } catch (IOException e) {
+                throw new RegistryException(e);
+            }
+        }
+        return experimentList;
+    }
+
+    public void createExperiment(Experiment experiment) throws RegistryException{
+        try {
+            WriteResult result = collection.insert((DBObject) JSON.parse(
+                    modelConversionHelper.serializeObject(experiment)));
+            logger.debug("No of inserted results "+ result.getN());
+        } catch (JsonProcessingException e) {
+            throw new RegistryException(e);
+        }
+    }
+
+    /**
+     * The following operation replaces the document with item equal to
+     * the given experiment id. The newly replaced document will only
+     * contain the the _id field and the fields in the replacement document.
+     * @param experiment
+     * @throws RegistryException
+     */
+    public void updateExperiment(Experiment experiment) throws RegistryException{
+        try {
+            DBObject query = BasicDBObjectBuilder.start().add(
+                    EXPERIMENT_ID, experiment.getExperimentId()).get();
+            WriteResult result = collection.update(query, (DBObject) JSON.parse(
+                    modelConversionHelper.serializeObject(experiment)));
+            logger.debug("No of updated results "+ result.getN());
+        } catch (JsonProcessingException e) {
+            throw new RegistryException(e);
+        }
+    }
+
+    public void deleteExperiment(Experiment experiment) throws RegistryException{
+        DBObject query = BasicDBObjectBuilder.start().add(
+                EXPERIMENT_ID, experiment.getExperimentId()).get();
+        WriteResult result = collection.remove(query);
+        logger.debug("No of removed experiments " + result.getN());
+    }
+
+
+    public Experiment getExperiment(String experimentId) throws RegistryException{
+        try {
+            DBObject criteria = new BasicDBObject(EXPERIMENT_ID, experimentId);
+            DBObject doc = collection.findOne(criteria);
+            if(doc != null){
+                String json = doc.toString();
+                return (Experiment)modelConversionHelper.deserializeObject(
+                        Experiment.class, json);
+            }
+        } catch (IOException e) {
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<Experiment> searchExperiments(Map<String, String> filters, int limit,
+        int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException{
+        List<Experiment> experimentList = new ArrayList<Experiment>();
+        BasicDBObjectBuilder queryBuilder = BasicDBObjectBuilder.start();
+        for (String field : filters.keySet()) {
+            if (field.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_NAME)) {
+                //Fixme This is expensive operation
+                queryBuilder.add(EXPERIMENT_NAME, "/.*" + filters.get(field) + "/.*");
+            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
+                queryBuilder.add(USER_NAME, filters.get(field));
+            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
+                queryBuilder.add(GATEWAY, filters.get(field));
+            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_DESC)) {
+                //Fixme This is expensive operation
+                queryBuilder.add(EXPERIMENT_DESCRIPTION, "/.*" + filters.get(field) + "/.*");
+            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_ID)) {
+                queryBuilder.add(APPLICATION_ID, filters.get(field));
+            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_STATUS)) {
+                queryBuilder.add(EXPERIMENT_STATUS_STATE, filters.get(field));
+            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.FROM_DATE)) {
+                queryBuilder.add(CREATION_TIME,new BasicDBObject("$gte",filters.get(field)));
+            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.TO_DATE)) {
+                queryBuilder.add(CREATION_TIME,new BasicDBObject("$lte",filters.get(field)));
+            }
+        }
+
+        //handling pagination and ordering. ordering is allowed only on CREATION_TIME
+        DBCursor cursor;
+        if(limit > 0 && offset >= 0) {
+            if(orderByIdentifier != null && orderByIdentifier.equals(
+                    Constants.FieldConstants.ExperimentConstants.CREATION_TIME)){
+                if(resultOrderType.equals(ResultOrderType.ASC)) {
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(CREATION_TIME, 1))
+                            .skip(offset).limit(limit);
+                }else{
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(CREATION_TIME, -1))
+                            .skip(offset).limit(limit);
+                }
+            }else {
+                cursor = collection.find(queryBuilder.get()).skip(offset).limit(limit);
+            }
+        }else{
+            if(resultOrderType != null && resultOrderType.equals(
+                    Constants.FieldConstants.ExperimentConstants.CREATION_TIME)){
+                if(resultOrderType.equals(ResultOrderType.ASC)) {
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(CREATION_TIME, 1));
+                }else{
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(CREATION_TIME, -1));
+                }
+            }else {
+                cursor = collection.find(queryBuilder.get());
+            }
+        }
+        for(DBObject document: cursor){
+            try {
+                experimentList.add((Experiment) modelConversionHelper.deserializeObject(
+                        Experiment.class, document.toString()));
+            } catch (IOException e) {
+                throw new RegistryException(e);
+            }
+        }
+        return experimentList;
+    }
+
+    public void createWFNode(String experimentId, WorkflowNodeDetails workflowNodeDetail) throws RegistryException{
+        Experiment experiment = getExperiment(experimentId);
+        experiment.getWorkflowNodeDetailsList().add(workflowNodeDetail);
+        updateExperiment(experiment);
+    }
+
+    public void updateWFNode(WorkflowNodeDetails workflowNodeDetail) throws RegistryException{
+        Experiment experiment = getExperimentOfWFNode(workflowNodeDetail.getNodeInstanceId());
+        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
+            if(wfnd.getNodeInstanceId().equals(workflowNodeDetail.getNodeInstanceId())){
+                experiment.getWorkflowNodeDetailsList().remove(wfnd);
+                experiment.getWorkflowNodeDetailsList().add(workflowNodeDetail);
+                updateExperiment(experiment);
+                return;
+            }
+        }
+    }
+
+    public void deleteWFNode(WorkflowNodeDetails workflowNodeDetail) throws RegistryException{
+        Experiment experiment = getExperimentOfWFNode(workflowNodeDetail.getNodeInstanceId());
+        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
+            if(wfnd.getNodeInstanceId().equals(workflowNodeDetail.getNodeInstanceId())){
+                experiment.getWorkflowNodeDetailsList().remove(wfnd);
+                updateExperiment(experiment);
+                return;
+            }
+        }
+    }
+
+    public WorkflowNodeDetails getWFNode(String nodeId) throws RegistryException{
+        Experiment experiment = getExperimentOfWFNode(nodeId);
+        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
+            if(wfnd.getNodeInstanceId().equals(nodeId)){
+                return wfnd;
+            }
+        }
+        return null;
+    }
+
+
+    public void createTaskDetail(String nodeId, TaskDetails taskDetail) throws RegistryException{
+        Experiment experiment = getExperimentOfWFNode(nodeId);
+        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
+            if(wfnd.getNodeInstanceId().equals(nodeId)){
+                wfnd.getTaskDetailsList().add(taskDetail);
+                updateExperiment(experiment);
+                return;
+            }
+        }
+    }
+
+    public void updateTaskDetail(TaskDetails taskDetail) throws RegistryException{
+        Experiment experiment = getExperimentOfTask(taskDetail.getTaskId());
+        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
+            for(TaskDetails taskDetails: wfnd.getTaskDetailsList()){
+                if(taskDetails.getTaskId().equals(taskDetail)){
+                    wfnd.getTaskDetailsList().remove(taskDetail);
+                    wfnd.getTaskDetailsList().add(taskDetail);
+                    updateExperiment(experiment);
+                    return;
+                }
+            }
+        }
+    }
+
+    public void deleteTaskDetail(TaskDetails taskDetail) throws RegistryException{
+        Experiment experiment = getExperimentOfTask(taskDetail.getTaskId());
+        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
+            for(TaskDetails taskDetails: wfnd.getTaskDetailsList()){
+                if(taskDetails.getTaskId().equals(taskDetail)){
+                    wfnd.getTaskDetailsList().remove(taskDetail);
+                    updateExperiment(experiment);
+                    return;
+                }
+            }
+        }
+    }
+
+    public TaskDetails getTaskDetail(String taskId) throws RegistryException{
+        Experiment experiment = getExperimentOfTask(taskId);
+        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
+            for(TaskDetails taskDetails: wfnd.getTaskDetailsList()){
+                if(taskDetails.getTaskId().equals(taskId)){
+                    return taskDetails;
+                }
+            }
+        }
+        return null;
+    }
+
+
+    /**
+     * Method to getExperiment the parent Experiment of a given workflow node instance id
+     * @param nodeInstanceId
+     * @return
+     * @throws RegistryException
+     */
+    public Experiment getExperimentOfWFNode(String nodeInstanceId) throws RegistryException{
+        try {
+            DBObject criteria = new BasicDBObject(WORKFLOW_NODE_ID, nodeInstanceId);
+            DBObject doc = collection.findOne(criteria);
+            if(doc != null){
+                String json = doc.toString();
+                return (Experiment)modelConversionHelper.deserializeObject(
+                        Experiment.class, json);
+            }
+        } catch (IOException e) {
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    /**
+     * Method to getExperiment the parent experiment of a given task id
+     * @param taskId
+     * @return
+     * @throws RegistryException
+     */
+    public Experiment getExperimentOfTask(String taskId) throws RegistryException{
+        try {
+            DBObject criteria = new BasicDBObject(TASK_ID, taskId);
+            DBObject doc = collection.findOne(criteria);
+            if(doc != null){
+                String json = doc.toString();
+                return (Experiment)modelConversionHelper.deserializeObject(
+                        Experiment.class, json);
+            }
+        } catch (IOException e) {
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/utils/MongoUtil.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/utils/MongoUtil.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/utils/MongoUtil.java
new file mode 100644
index 0000000..4b7a2f9
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/utils/MongoUtil.java
@@ -0,0 +1,70 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.persistance.registry.jpa.mongo.utils;
+
+import com.mongodb.DB;
+import com.mongodb.MongoClient;
+import com.mongodb.MongoException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class MongoUtil {
+    private final static Logger logger = LoggerFactory.getLogger(MongoUtil.class);
+
+    private static final int port = 27017;
+    private static final String host = "localhost";
+    private static MongoClient mongoClient = null;
+    private static DB airavataRegistry;
+    public static String AIRAVATA_REGISTRY_NAME = "airavata-registry";
+
+    public static MongoClient getMongoClient() {
+        if (mongoClient == null) {
+            try {
+                mongoClient = new MongoClient(host, port);
+                logger.debug("New Mongo Client created with [" + host + "] and ["
+                        + port + "]");
+            } catch (MongoException e) {
+                logger.error(e.getMessage());
+            }
+        }
+        return mongoClient;
+    }
+
+    public static DB getAiravataRegistry(){
+        if (airavataRegistry == null) {
+            try {
+                airavataRegistry = getMongoClient().getDB(AIRAVATA_REGISTRY_NAME);
+            } catch (MongoException e) {
+                logger.error(e.getMessage());
+            }
+        }
+        return airavataRegistry;
+    }
+
+    public static void dropAiravataRegistry(){
+        try {
+            getMongoClient().dropDatabase(AIRAVATA_REGISTRY_NAME);
+            logger.debug("Dropped Airavata Registry");
+        } catch (MongoException e) {
+            logger.error(e.getMessage());
+        }
+    }
+}
\ No newline at end of file


[29/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskdetails/TaskDetailsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskdetails/TaskDetailsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskdetails/TaskDetailsSerializer.java
new file mode 100644
index 0000000..30177ce
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskdetails/TaskDetailsSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.taskdetails;
+
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TaskDetailsSerializer extends
+        AbstractThriftSerializer<TaskDetails._Fields, TaskDetails> {
+    private final static Logger logger = LoggerFactory.getLogger(TaskDetailsSerializer.class);
+
+    @Override
+    protected TaskDetails._Fields[] getFieldValues() {
+        return TaskDetails._Fields.values();
+    }
+
+    @Override
+    protected Class<TaskDetails> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskstatus/TaskStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskstatus/TaskStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskstatus/TaskStatusDeserializer.java
new file mode 100644
index 0000000..b2173be
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskstatus/TaskStatusDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.taskstatus;
+
+import org.apache.airavata.model.workspace.experiment.TaskStatus;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class TaskStatusDeserializer extends
+        AbstractThriftDeserializer<TaskStatus._Fields, TaskStatus> {
+
+    @Override
+    protected TaskStatus._Fields getField(final String fieldName) {
+        return TaskStatus._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected TaskStatus newInstance() {
+        return new TaskStatus();
+    }
+
+    @Override
+    protected void validate(final TaskStatus instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskstatus/TaskStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskstatus/TaskStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskstatus/TaskStatusSerializer.java
new file mode 100644
index 0000000..ae56a54
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskstatus/TaskStatusSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.taskstatus;
+
+import org.apache.airavata.model.workspace.experiment.TaskStatus;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TaskStatusSerializer extends
+        AbstractThriftSerializer<TaskStatus._Fields, TaskStatus> {
+    private final static Logger logger = LoggerFactory.getLogger(TaskStatusSerializer.class);
+
+    @Override
+    protected TaskStatus._Fields[] getFieldValues() {
+        return TaskStatus._Fields.values();
+    }
+
+    @Override
+    protected Class<TaskStatus> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/trstatus/TransferStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/trstatus/TransferStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/trstatus/TransferStatusDeserializer.java
new file mode 100644
index 0000000..d4bdba2
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/trstatus/TransferStatusDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.trstatus;
+
+import org.apache.airavata.model.workspace.experiment.TransferStatus;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class TransferStatusDeserializer extends
+        AbstractThriftDeserializer<TransferStatus._Fields, TransferStatus> {
+
+    @Override
+    protected TransferStatus._Fields getField(final String fieldName) {
+        return TransferStatus._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected TransferStatus newInstance() {
+        return new TransferStatus();
+    }
+
+    @Override
+    protected void validate(final TransferStatus instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/trstatus/TransferStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/trstatus/TransferStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/trstatus/TransferStatusSerializer.java
new file mode 100644
index 0000000..074fbca
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/trstatus/TransferStatusSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.trstatus;
+
+import org.apache.airavata.model.workspace.experiment.TransferStatus;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TransferStatusSerializer extends
+        AbstractThriftSerializer<TransferStatus._Fields, TransferStatus> {
+    private final static Logger logger = LoggerFactory.getLogger(TransferStatusSerializer.class);
+
+    @Override
+    protected TransferStatus._Fields[] getFieldValues() {
+        return TransferStatus._Fields.values();
+    }
+
+    @Override
+    protected Class<TransferStatus> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ucdata/UserConfigurationDataDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ucdata/UserConfigurationDataDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ucdata/UserConfigurationDataDeserializer.java
new file mode 100644
index 0000000..d4ff5ca
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ucdata/UserConfigurationDataDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.ucdata;
+
+import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class UserConfigurationDataDeserializer extends
+        AbstractThriftDeserializer<UserConfigurationData._Fields, UserConfigurationData> {
+
+    @Override
+    protected UserConfigurationData._Fields getField(final String fieldName) {
+        return UserConfigurationData._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected UserConfigurationData newInstance() {
+        return new UserConfigurationData();
+    }
+
+    @Override
+    protected void validate(final UserConfigurationData instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ucdata/UserConfigurationDataSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ucdata/UserConfigurationDataSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ucdata/UserConfigurationDataSerializer.java
new file mode 100644
index 0000000..a537cf0
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ucdata/UserConfigurationDataSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.ucdata;
+
+import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class UserConfigurationDataSerializer extends
+        AbstractThriftSerializer<UserConfigurationData._Fields, UserConfigurationData> {
+    private final static Logger logger = LoggerFactory.getLogger(UserConfigurationDataSerializer.class);
+
+    @Override
+    protected UserConfigurationData._Fields[] getFieldValues() {
+        return UserConfigurationData._Fields.values();
+    }
+
+    @Override
+    protected Class<UserConfigurationData> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validationrslt/ValidationResultsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validationrslt/ValidationResultsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validationrslt/ValidationResultsDeserializer.java
new file mode 100644
index 0000000..a9ea19c
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validationrslt/ValidationResultsDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.validationrslt;
+
+import org.apache.airavata.model.workspace.experiment.ValidationResults;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ValidationResultsDeserializer extends
+        AbstractThriftDeserializer<ValidationResults._Fields, ValidationResults> {
+
+    @Override
+    protected ValidationResults._Fields getField(final String fieldName) {
+        return ValidationResults._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected ValidationResults newInstance() {
+        return new ValidationResults();
+    }
+
+    @Override
+    protected void validate(final ValidationResults instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validationrslt/ValidationResultsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validationrslt/ValidationResultsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validationrslt/ValidationResultsSerializer.java
new file mode 100644
index 0000000..95ad37f
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validationrslt/ValidationResultsSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.validationrslt;
+
+import org.apache.airavata.model.workspace.experiment.ValidationResults;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ValidationResultsSerializer extends
+        AbstractThriftSerializer<ValidationResults._Fields, ValidationResults> {
+    private final static Logger logger = LoggerFactory.getLogger(ValidationResultsSerializer.class);
+
+    @Override
+    protected ValidationResults._Fields[] getFieldValues() {
+        return ValidationResults._Fields.values();
+    }
+
+    @Override
+    protected Class<ValidationResults> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validatorrslt/ValidatorResultDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validatorrslt/ValidatorResultDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validatorrslt/ValidatorResultDeserializer.java
new file mode 100644
index 0000000..5b4a7a3
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validatorrslt/ValidatorResultDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.validatorrslt;
+
+import org.apache.airavata.model.error.ValidatorResult;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ValidatorResultDeserializer extends
+        AbstractThriftDeserializer<ValidatorResult._Fields, ValidatorResult> {
+
+    @Override
+    protected ValidatorResult._Fields getField(final String fieldName) {
+        return ValidatorResult._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected ValidatorResult newInstance() {
+        return new ValidatorResult();
+    }
+
+    @Override
+    protected void validate(final ValidatorResult instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validatorrslt/ValidatorResultSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validatorrslt/ValidatorResultSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validatorrslt/ValidatorResultSerializer.java
new file mode 100644
index 0000000..a6ae64b
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/validatorrslt/ValidatorResultSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.validatorrslt;
+
+import org.apache.airavata.model.error.ValidatorResult;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ValidatorResultSerializer extends
+        AbstractThriftSerializer<ValidatorResult._Fields, ValidatorResult> {
+    private final static Logger logger = LoggerFactory.getLogger(ValidatorResultSerializer.class);
+
+    @Override
+    protected ValidatorResult._Fields[] getFieldValues() {
+        return ValidatorResult._Fields.values();
+    }
+
+    @Override
+    protected Class<ValidatorResult> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsDeserializer.java
new file mode 100644
index 0000000..479e498
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.wfnd;
+
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class WorkflowNodeDetailsDeserializer extends
+        AbstractThriftDeserializer<WorkflowNodeDetails._Fields, WorkflowNodeDetails> {
+
+    @Override
+    protected WorkflowNodeDetails._Fields getField(final String fieldName) {
+        return WorkflowNodeDetails._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected WorkflowNodeDetails newInstance() {
+        return new WorkflowNodeDetails();
+    }
+
+    @Override
+    protected void validate(final WorkflowNodeDetails instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsSerializer.java
new file mode 100644
index 0000000..1f26b68
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfnd/WorkflowNodeDetailsSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.wfnd;
+
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class WorkflowNodeDetailsSerializer extends
+        AbstractThriftSerializer<WorkflowNodeDetails._Fields, WorkflowNodeDetails> {
+    private final static Logger logger = LoggerFactory.getLogger(WorkflowNodeDetailsSerializer.class);
+
+    @Override
+    protected WorkflowNodeDetails._Fields[] getFieldValues() {
+        return WorkflowNodeDetails._Fields.values();
+    }
+
+    @Override
+    protected Class<WorkflowNodeDetails> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfns/WorkflowNodeStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfns/WorkflowNodeStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfns/WorkflowNodeStatusDeserializer.java
new file mode 100644
index 0000000..62cad46
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfns/WorkflowNodeStatusDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.wfns;
+
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeStatus;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class WorkflowNodeStatusDeserializer extends
+        AbstractThriftDeserializer<WorkflowNodeStatus._Fields, WorkflowNodeStatus> {
+
+    @Override
+    protected WorkflowNodeStatus._Fields getField(final String fieldName) {
+        return WorkflowNodeStatus._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected WorkflowNodeStatus newInstance() {
+        return new WorkflowNodeStatus();
+    }
+
+    @Override
+    protected void validate(final WorkflowNodeStatus instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfns/WorkflowNodeStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfns/WorkflowNodeStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfns/WorkflowNodeStatusSerializer.java
new file mode 100644
index 0000000..a33c8bb
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/wfns/WorkflowNodeStatusSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.wfns;
+
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeStatus;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class WorkflowNodeStatusSerializer extends
+        AbstractThriftSerializer<WorkflowNodeStatus._Fields, WorkflowNodeStatus> {
+    private final static Logger logger = LoggerFactory.getLogger(WorkflowNodeStatusSerializer.class);
+
+    @Override
+    protected WorkflowNodeStatus._Fields[] getFieldValues() {
+        return WorkflowNodeStatus._Fields.values();
+    }
+
+    @Override
+    protected Class<WorkflowNodeStatus> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/gateway/GatewayDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/gateway/GatewayDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/gateway/GatewayDeserializer.java
new file mode 100644
index 0000000..6bc9361
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/gateway/GatewayDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.gateway;
+
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class GatewayDeserializer extends
+        AbstractThriftDeserializer<Gateway._Fields, Gateway> {
+
+    @Override
+    protected Gateway._Fields getField(final String fieldName) {
+        return Gateway._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected Gateway newInstance() {
+        return new Gateway();
+    }
+
+    @Override
+    protected void validate(final Gateway instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/gateway/GatewaySerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/gateway/GatewaySerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/gateway/GatewaySerializer.java
new file mode 100644
index 0000000..c0820ec
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/gateway/GatewaySerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.gateway;
+
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GatewaySerializer extends
+        AbstractThriftSerializer<Gateway._Fields, Gateway> {
+    private final static Logger logger = LoggerFactory.getLogger(GatewaySerializer.class);
+
+    @Override
+    protected Gateway._Fields[] getFieldValues() {
+        return Gateway._Fields.values();
+    }
+
+    @Override
+    protected Class<Gateway> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/group/GroupDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/group/GroupDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/group/GroupDeserializer.java
new file mode 100644
index 0000000..0bb640b
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/group/GroupDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.group;
+
+import org.apache.airavata.model.workspace.Group;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class GroupDeserializer extends
+        AbstractThriftDeserializer<Group._Fields, Group> {
+
+    @Override
+    protected Group._Fields getField(final String fieldName) {
+        return Group._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected Group newInstance() {
+        return new Group();
+    }
+
+    @Override
+    protected void validate(final Group instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/group/GroupSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/group/GroupSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/group/GroupSerializer.java
new file mode 100644
index 0000000..d6f73a7
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/group/GroupSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.group;
+
+import org.apache.airavata.model.workspace.Group;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GroupSerializer extends
+        AbstractThriftSerializer<Group._Fields, Group> {
+    private final static Logger logger = LoggerFactory.getLogger(GroupSerializer.class);
+
+    @Override
+    protected Group._Fields[] getFieldValues() {
+        return Group._Fields.values();
+    }
+
+    @Override
+    protected Class<Group> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/project/ProjectDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/project/ProjectDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/project/ProjectDeserializer.java
new file mode 100644
index 0000000..2275748
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/project/ProjectDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.project;
+
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ProjectDeserializer extends
+        AbstractThriftDeserializer<Project._Fields, Project> {
+
+    @Override
+    protected Project._Fields getField(final String fieldName) {
+        return Project._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected Project newInstance() {
+        return new Project();
+    }
+
+    @Override
+    protected void validate(final Project instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/project/ProjectSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/project/ProjectSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/project/ProjectSerializer.java
new file mode 100644
index 0000000..baefed0
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/project/ProjectSerializer.java
@@ -0,0 +1,40 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.project;
+
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ProjectSerializer extends AbstractThriftSerializer<Project._Fields, Project> {
+    private final static Logger logger = LoggerFactory.getLogger(ProjectSerializer.class);
+
+    @Override
+    protected Project._Fields[] getFieldValues() {
+        return Project._Fields.values();
+    }
+
+    @Override
+    protected Class<Project> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/user/UserDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/user/UserDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/user/UserDeserializer.java
new file mode 100644
index 0000000..d53e1d2
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/user/UserDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.user;
+
+import org.apache.airavata.model.workspace.User;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class UserDeserializer extends
+        AbstractThriftDeserializer<User._Fields, User> {
+
+    @Override
+    protected User._Fields getField(final String fieldName) {
+        return User._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected User newInstance() {
+        return new User();
+    }
+
+    @Override
+    protected void validate(final User instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/user/UserSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/user/UserSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/user/UserSerializer.java
new file mode 100644
index 0000000..aca4c31
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/user/UserSerializer.java
@@ -0,0 +1,40 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.user;
+
+import org.apache.airavata.model.workspace.User;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class UserSerializer extends AbstractThriftSerializer<User._Fields, User> {
+    private final static Logger logger = LoggerFactory.getLogger(UserSerializer.class);
+
+    @Override
+    protected User._Fields[] getFieldValues() {
+        return User._Fields.values();
+    }
+
+    @Override
+    protected Class<User> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/ExperimentDao.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/ExperimentDao.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/ExperimentDao.java
new file mode 100644
index 0000000..5e7e43d
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/ExperimentDao.java
@@ -0,0 +1,378 @@
+/*
+ *
+ * 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.persistance.registry.mongo.dao;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.mongodb.*;
+import com.mongodb.util.JSON;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.model.workspace.experiment.WorkflowNodeDetails;
+import org.apache.airavata.persistance.registry.mongo.conversion.ModelConversionHelper;
+import org.apache.airavata.persistance.registry.mongo.utils.MongoUtil;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.ResultOrderType;
+import org.apache.airavata.registry.cpi.utils.Constants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class ExperimentDao{
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentDao.class);
+
+    private static final String EXPERIMENTS_COLLECTION_NAME = "experiments";
+    private DBCollection collection;
+    private ModelConversionHelper modelConversionHelper;
+
+    private static final String EXPERIMENT_ID = "experiment_id";
+    private static final String EXPERIMENT_NAME= "name";
+    private static final String EXPERIMENT_DESCRIPTION = "description";
+    private static final String USER_NAME = "user_name";
+    private static final String GATEWAY = "gateway_execution_id";
+    private static final String APPLICATION_ID = "application_id";
+    private static final String EXPERIMENT_STATUS_STATE = "experiment_status.experiment_state";
+    private static final String CREATION_TIME = "creation_time";
+
+    //Todo Nested Indexes - Its good if we can get rid of them
+    private static final String WORKFLOW_NODE_ID = "workflow_node_details_list.node_instance_id";
+    private static final String TASK_ID = "workflow_node_details_list.task_details_list.task_id";
+
+
+    public ExperimentDao(){
+        collection = MongoUtil.getAiravataRegistry().getCollection(EXPERIMENTS_COLLECTION_NAME);
+        modelConversionHelper = new ModelConversionHelper();
+        collection.dropIndexes();
+        initIndexes();
+    }
+
+    /**
+     * If indexes are already defined this will simply ignore them
+     */
+    private void initIndexes(){
+        collection.createIndex(new BasicDBObject(EXPERIMENT_ID, 1), new BasicDBObject("unique", true));
+        collection.createIndex(new BasicDBObject(WORKFLOW_NODE_ID, 1));
+        collection.createIndex(new BasicDBObject(TASK_ID, 1));
+
+//        //Defining a full-text index on experiment name and experiment description
+//        BasicDBObject object = new BasicDBObject();
+//        object.put(EXPERIMENT_NAME, "text");
+//        object.put(EXPERIMENT_DESCRIPTION, "text");
+//        collection.createIndex (object);
+    }
+
+    public List<Experiment> getAllExperiments() throws RegistryException{
+        List<Experiment> experimentList = new ArrayList<Experiment>();
+        DBCursor cursor = collection.find();
+        for(DBObject document: cursor){
+            try {
+                experimentList.add((Experiment) modelConversionHelper.deserializeObject(
+                        Experiment.class, document.toString()));
+            } catch (IOException e) {
+                throw new RegistryException(e);
+            }
+        }
+        return experimentList;
+    }
+
+    public void createExperiment(Experiment experiment) throws RegistryException{
+        try {
+            WriteResult result = collection.insert((DBObject) JSON.parse(
+                    modelConversionHelper.serializeObject(experiment)));
+            logger.debug("No of inserted results "+ result.getN());
+        } catch (JsonProcessingException e) {
+            throw new RegistryException(e);
+        }
+    }
+
+    /**
+     * The following operation replaces the document with item equal to
+     * the given experiment id. The newly replaced document will only
+     * contain the the _id field and the fields in the replacement document.
+     * @param experiment
+     * @throws RegistryException
+     */
+    public void updateExperiment(Experiment experiment) throws RegistryException{
+        try {
+            DBObject query = BasicDBObjectBuilder.start().add(
+                    EXPERIMENT_ID, experiment.getExperimentId()).get();
+            WriteResult result = collection.update(query, (DBObject) JSON.parse(
+                    modelConversionHelper.serializeObject(experiment)));
+            logger.debug("No of updated results "+ result.getN());
+        } catch (JsonProcessingException e) {
+            throw new RegistryException(e);
+        }
+    }
+
+    public void deleteExperiment(Experiment experiment) throws RegistryException{
+        DBObject query = BasicDBObjectBuilder.start().add(
+                EXPERIMENT_ID, experiment.getExperimentId()).get();
+        WriteResult result = collection.remove(query);
+        logger.debug("No of removed experiments " + result.getN());
+    }
+
+
+    public Experiment getExperiment(String experimentId) throws RegistryException{
+        try {
+            DBObject criteria = new BasicDBObject(EXPERIMENT_ID, experimentId);
+            DBObject doc = collection.findOne(criteria);
+            if(doc != null){
+                String json = doc.toString();
+                return (Experiment)modelConversionHelper.deserializeObject(
+                        Experiment.class, json);
+            }
+        } catch (IOException e) {
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<Experiment> searchExperiments(Map<String, String> filters, int limit,
+        int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException{
+        List<Experiment> experimentList = new ArrayList<Experiment>();
+        BasicDBObjectBuilder queryBuilder = BasicDBObjectBuilder.start();
+        for (String field : filters.keySet()) {
+            if (field.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_NAME)) {
+                queryBuilder.add(EXPERIMENT_NAME, new BasicDBObject(
+                        "$regex", ".*" + filters.get(field) + ".*"));
+            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
+                queryBuilder.add(USER_NAME, filters.get(field));
+            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
+                queryBuilder.add(GATEWAY, filters.get(field));
+            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_DESC)) {
+                queryBuilder.add(EXPERIMENT_DESCRIPTION, new BasicDBObject(
+                        "$regex", ".*" + filters.get(field) + ".*"));
+            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.APPLICATION_ID)) {
+                queryBuilder.add(APPLICATION_ID, filters.get(field));
+            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_STATUS)) {
+                queryBuilder.add(EXPERIMENT_STATUS_STATE, filters.get(field));
+            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.FROM_DATE)) {
+                queryBuilder.add(CREATION_TIME,new BasicDBObject("$gte",filters.get(field)));
+            } else if (field.equals(Constants.FieldConstants.ExperimentConstants.TO_DATE)) {
+                queryBuilder.add(CREATION_TIME,new BasicDBObject("$lte",filters.get(field)));
+            }
+        }
+
+        //handling pagination and ordering. ordering is allowed only on CREATION_TIME
+        DBCursor cursor;
+        if(limit > 0 && offset >= 0) {
+            if(orderByIdentifier != null && orderByIdentifier.equals(
+                    Constants.FieldConstants.ExperimentConstants.CREATION_TIME)){
+                if(resultOrderType.equals(ResultOrderType.ASC)) {
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(CREATION_TIME, 1))
+                            .skip(offset).limit(limit);
+                }else{
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(CREATION_TIME, -1))
+                            .skip(offset).limit(limit);
+                }
+            }else {
+                cursor = collection.find(queryBuilder.get()).skip(offset).limit(limit);
+            }
+        }else{
+            if(resultOrderType != null && resultOrderType.equals(
+                    Constants.FieldConstants.ExperimentConstants.CREATION_TIME)){
+                if(resultOrderType.equals(ResultOrderType.ASC)) {
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(CREATION_TIME, 1));
+                }else{
+                    cursor = collection.find(queryBuilder.get()).sort(new BasicDBObject(CREATION_TIME, -1));
+                }
+            }else {
+                cursor = collection.find(queryBuilder.get());
+            }
+        }
+        for(DBObject document: cursor){
+            try {
+                experimentList.add((Experiment) modelConversionHelper.deserializeObject(
+                        Experiment.class, document.toString()));
+            } catch (IOException e) {
+                throw new RegistryException(e);
+            }
+        }
+        return experimentList;
+    }
+
+    public void createWFNode(String experimentId, WorkflowNodeDetails workflowNodeDetail) throws RegistryException{
+        Experiment experiment = getExperiment(experimentId);
+        experiment.getWorkflowNodeDetailsList().add(workflowNodeDetail);
+        updateExperiment(experiment);
+    }
+
+    public void updateWFNode(WorkflowNodeDetails workflowNodeDetail) throws RegistryException{
+        Experiment experiment = getParentExperimentOfWFNode(workflowNodeDetail.getNodeInstanceId());
+        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
+            if(wfnd.getNodeInstanceId().equals(workflowNodeDetail.getNodeInstanceId())){
+                experiment.getWorkflowNodeDetailsList().remove(wfnd);
+                experiment.getWorkflowNodeDetailsList().add(workflowNodeDetail);
+                updateExperiment(experiment);
+                return;
+            }
+        }
+    }
+
+    public void deleteWFNode(WorkflowNodeDetails workflowNodeDetail) throws RegistryException{
+        Experiment experiment = getParentExperimentOfWFNode(workflowNodeDetail.getNodeInstanceId());
+        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
+            if(wfnd.getNodeInstanceId().equals(workflowNodeDetail.getNodeInstanceId())){
+                experiment.getWorkflowNodeDetailsList().remove(wfnd);
+                updateExperiment(experiment);
+                return;
+            }
+        }
+    }
+
+    public WorkflowNodeDetails getWFNode(String nodeId) throws RegistryException{
+        Experiment experiment = getParentExperimentOfWFNode(nodeId);
+        if(experiment != null) {
+            for (WorkflowNodeDetails wfnd : experiment.getWorkflowNodeDetailsList()) {
+                if (wfnd.getNodeInstanceId().equals(nodeId)) {
+                    return wfnd;
+                }
+            }
+        }
+        return null;
+    }
+
+    public void createTaskDetail(String nodeId, TaskDetails taskDetail) throws RegistryException{
+        Experiment experiment = getParentExperimentOfWFNode(nodeId);
+        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
+            if(wfnd.getNodeInstanceId().equals(nodeId)){
+                wfnd.getTaskDetailsList().add(taskDetail);
+                updateExperiment(experiment);
+                return;
+            }
+        }
+    }
+
+    public void updateTaskDetail(TaskDetails taskDetail) throws RegistryException{
+        Experiment experiment = getParentExperimentOfTask(taskDetail.getTaskId());
+        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
+            for(TaskDetails taskDetails: wfnd.getTaskDetailsList()){
+                if(taskDetails.getTaskId().equals(taskDetail)){
+                    wfnd.getTaskDetailsList().remove(taskDetail);
+                    wfnd.getTaskDetailsList().add(taskDetail);
+                    updateExperiment(experiment);
+                    return;
+                }
+            }
+        }
+    }
+
+    public void deleteTaskDetail(TaskDetails taskDetail) throws RegistryException{
+        Experiment experiment = getParentExperimentOfTask(taskDetail.getTaskId());
+        for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
+            for(TaskDetails taskDetails: wfnd.getTaskDetailsList()){
+                if(taskDetails.getTaskId().equals(taskDetail)){
+                    wfnd.getTaskDetailsList().remove(taskDetail);
+                    updateExperiment(experiment);
+                    return;
+                }
+            }
+        }
+    }
+
+    public TaskDetails getTaskDetail(String taskId) throws RegistryException{
+        Experiment experiment = getParentExperimentOfTask(taskId);
+        if(experiment != null) {
+            for (WorkflowNodeDetails wfnd : experiment.getWorkflowNodeDetailsList()) {
+                for (TaskDetails taskDetails : wfnd.getTaskDetailsList()) {
+                    if (taskDetails.getTaskId().equals(taskId)) {
+                        return taskDetails;
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
+
+    /**
+     * Method to get parent Experiment of the given workflow node instance id
+     * @param nodeInstanceId
+     * @return
+     * @throws RegistryException
+     */
+    public Experiment getParentExperimentOfWFNode(String nodeInstanceId) throws RegistryException{
+        try {
+            DBObject criteria = new BasicDBObject(WORKFLOW_NODE_ID, nodeInstanceId);
+            DBObject doc = collection.findOne(criteria);
+            if(doc != null){
+                String json = doc.toString();
+                return (Experiment)modelConversionHelper.deserializeObject(
+                        Experiment.class, json);
+            }
+        } catch (IOException e) {
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    /**
+     * Method to get the parent experiment of the given task id
+     * @param taskId
+     * @return
+     * @throws RegistryException
+     */
+    public Experiment getParentExperimentOfTask(String taskId) throws RegistryException{
+        try {
+            DBObject criteria = new BasicDBObject(TASK_ID, taskId);
+            DBObject doc = collection.findOne(criteria);
+            if(doc != null){
+                String json = doc.toString();
+                return (Experiment)modelConversionHelper.deserializeObject(
+                        Experiment.class, json);
+            }
+        } catch (IOException e) {
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    /**
+     * Method to get the parent workflow node of the given task id
+     * @param taskId
+     * @return
+     * @throws RegistryException
+     */
+    public WorkflowNodeDetails getParentWFNodeOfTask(String taskId) throws RegistryException{
+        try {
+            DBObject criteria = new BasicDBObject(TASK_ID, taskId);
+            DBObject doc = collection.findOne(criteria);
+            if(doc != null){
+                String json = doc.toString();
+                Experiment experiment = (Experiment)modelConversionHelper.deserializeObject(
+                        Experiment.class, json);
+                for(WorkflowNodeDetails wfnd: experiment.getWorkflowNodeDetailsList()){
+                    for(TaskDetails taskDetails: wfnd.getTaskDetailsList()){
+                        if(taskDetails.getTaskId().equals(taskId)){
+                            return wfnd;
+                        }
+                    }
+                }
+            }
+        } catch (IOException e) {
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/GatewayDao.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/GatewayDao.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/GatewayDao.java
new file mode 100644
index 0000000..ef66adb
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/dao/GatewayDao.java
@@ -0,0 +1,179 @@
+/*
+ *
+ * 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.persistance.registry.mongo.dao;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.mongodb.*;
+import com.mongodb.util.JSON;
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.persistance.registry.mongo.conversion.ModelConversionHelper;
+import org.apache.airavata.persistance.registry.mongo.utils.MongoUtil;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class GatewayDao {
+    private final static Logger logger = LoggerFactory.getLogger(GatewayDao.class);
+
+    private static final String GATEWAYS_COLLECTION_NAME = "gateways";
+    private DBCollection collection;
+    private ModelConversionHelper modelConversionHelper;
+
+    private static final String GATEWAY_ID = "gateway_id";
+    private static final String GATEWAY_NAME = "gateway_name";
+    private static final String DOMAIN = "domain";
+    private static final String EMAIL_ADDRESS = "email_address";
+
+    public GatewayDao(){
+        collection = MongoUtil.getAiravataRegistry().getCollection(GATEWAYS_COLLECTION_NAME);
+        modelConversionHelper = new ModelConversionHelper();
+        collection.dropIndexes();
+        initIndexes();
+    }
+
+    /**
+     * If indexes are already defined this will simply ignore them
+     */
+    private void initIndexes(){
+        collection.createIndex(new BasicDBObject(GATEWAY_ID, 1), new BasicDBObject("unique", true));
+        collection.createIndex(new BasicDBObject(GATEWAY_NAME, 1), new BasicDBObject("unique", true));
+        collection.createIndex(new BasicDBObject(EMAIL_ADDRESS, 1));
+        collection.createIndex(new BasicDBObject(DOMAIN, 1));
+    }
+
+    public List<Gateway> getAllGateways() throws RegistryException{
+        List<Gateway> gatewayList = new ArrayList();
+        DBCursor cursor = collection.find();
+        for(DBObject document: cursor){
+            try {
+                gatewayList.add((Gateway) modelConversionHelper.deserializeObject(
+                        Gateway.class, document.toString()));
+            } catch (IOException e) {
+                throw new RegistryException(e);
+            }
+        }
+        return gatewayList;
+    }
+
+    public void createGateway(Gateway gateway) throws RegistryException{
+        try {
+            WriteResult result = collection.insert((DBObject) JSON.parse(
+                    modelConversionHelper.serializeObject(gateway)));
+            logger.debug("No of inserted results "+ result.getN());
+        } catch (JsonProcessingException e) {
+            throw new RegistryException(e);
+        }
+    }
+
+    /**
+     * The following operation replaces the document with item equal to
+     * the given gateway id. The newly replaced document will only
+     * contain the the _id field and the fields in the replacement document.
+     * @param gateway
+     * @throws org.apache.airavata.registry.cpi.RegistryException
+     */
+    public void updateGateway(Gateway gateway) throws RegistryException{
+        try {
+            DBObject query = BasicDBObjectBuilder.start().add(
+                    GATEWAY_ID, gateway.getGatewayId()).get();
+            WriteResult result = collection.update(query, (DBObject) JSON.parse(
+                    modelConversionHelper.serializeObject(gateway)));
+            logger.debug("No of updated results "+ result.getN());
+        } catch (JsonProcessingException e) {
+            throw new RegistryException(e);
+        }
+    }
+
+    public void deleteGateway(Gateway gateway) throws RegistryException{
+        DBObject query = BasicDBObjectBuilder.start().add(
+                GATEWAY_ID, gateway.getGatewayId()).get();
+        WriteResult result = collection.remove(query);
+        logger.debug("No of removed experiments " + result.getN());
+    }
+
+    public Gateway getGateway(String gatewayId) throws RegistryException{
+        try {
+            DBObject criteria = new BasicDBObject(GATEWAY_ID, gatewayId);
+            DBObject doc = collection.findOne(criteria);
+            if(doc != null){
+                String json = doc.toString();
+                return (Gateway)modelConversionHelper.deserializeObject(
+                        Gateway.class, json);
+            }
+        } catch (IOException e) {
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public Gateway getGatewayByName(String gatewayName) throws RegistryException{
+        try {
+            DBObject criteria = new BasicDBObject(GATEWAY_NAME, gatewayName);
+            DBObject doc = collection.findOne(criteria);
+            if(doc != null){
+                String json = doc.toString();
+                return (Gateway)modelConversionHelper.deserializeObject(
+                        Gateway.class, json);
+            }
+        } catch (IOException e) {
+            throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    public List<Gateway> searchGateways(Map<String, String> filters, int limit, int offset) throws RegistryException{
+        List<Gateway> gatewayList = new ArrayList();
+        BasicDBObjectBuilder queryBuilder = BasicDBObjectBuilder.start();
+        for (String field : filters.keySet()) {
+//            if (field.equals(Constants.FieldConstants.ProjectConstants.GATEWAY_NAME)){
+//                fil.put(AbstractResource.ProjectConstants.GATEWAY_NAME, filters.get(field));
+//            }else if (field.equals(Constants.FieldConstants.ProjectConstants.OWNER)){
+//                fil.put(AbstractResource.ProjectConstants.USERNAME, filters.get(field));
+//            }else if (field.equals(Constants.FieldConstants.ProjectConstants.DESCRIPTION)){
+//                fil.put(AbstractResource.ProjectConstants.DESCRIPTION, filters.get(field));
+//            }else if (field.equals(Constants.FieldConstants.ProjectConstants.GATEWAY_ID)){
+//                fil.put(AbstractResource.ProjectConstants.GATEWAY_ID, filters.get(field));
+//            }
+        }
+
+        //handling pagination.
+        DBCursor cursor;
+        if(limit > 0 && offset >= 0) {
+                cursor = collection.find(queryBuilder.get()).skip(offset).limit(limit);
+        }else{
+                cursor = collection.find(queryBuilder.get());
+        }
+        for(DBObject document: cursor){
+            try {
+                gatewayList.add((Gateway) modelConversionHelper.deserializeObject(
+                        Gateway.class, document.toString()));
+            } catch (IOException e) {
+                throw new RegistryException(e);
+            }
+        }
+        return gatewayList;
+    }
+}
\ No newline at end of file


[15/44] airavata git commit: Adding mongo-registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
new file mode 100644
index 0000000..e05d59d
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AbstractResource.java
@@ -0,0 +1,317 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.registry.cpi.RegistryException;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public abstract class AbstractResource implements Resource {
+	// table names
+	public static final String GATEWAY = "Gateway";
+	public static final String CONFIGURATION = "Configuration";
+	public static final String USERS = "Users";
+	public static final String GATEWAY_WORKER = "Gateway_Worker";
+	public static final String PROJECT = "Project";
+	public static final String PROJECT_USER = "ProjectUser";
+	public static final String EXPERIMENT = "Experiment";
+	public static final String NOTIFICATION_EMAIL = "Notification_Email";
+	public static final String EXPERIMENT_CONFIG_DATA = "ExperimentConfigData";
+	public static final String EXPERIMENT_INPUT = "Experiment_Input";
+	public static final String EXPERIMENT_OUTPUT = "Experiment_Output";
+	public static final String WORKFLOW_NODE_DETAIL = "WorkflowNodeDetail";
+	public static final String TASK_DETAIL = "TaskDetail";
+	public static final String ERROR_DETAIL = "ErrorDetail";
+	public static final String APPLICATION_INPUT = "ApplicationInput";
+	public static final String APPLICATION_OUTPUT = "ApplicationOutput";
+	public static final String NODE_INPUT = "NodeInput";
+	public static final String NODE_OUTPUT = "NodeOutput";
+	public static final String JOB_DETAIL = "JobDetail";
+	public static final String DATA_TRANSFER_DETAIL = "DataTransferDetail";
+	public static final String STATUS = "Status";
+	public static final String CONFIG_DATA = "ExperimentConfigData";
+	public static final String COMPUTATIONAL_RESOURCE_SCHEDULING = "Computational_Resource_Scheduling";
+	public static final String ADVANCE_INPUT_DATA_HANDLING = "AdvancedInputDataHandling";
+	public static final String ADVANCE_OUTPUT_DATA_HANDLING = "AdvancedOutputDataHandling";
+	public static final String QOS_PARAMS = "QosParam";
+
+
+	// Gateway Table
+	public final class GatewayConstants {
+		public static final String GATEWAY_ID = "gateway_id";
+		public static final String GATEWAY_NAME = "gateway_name";
+		public static final String DOMAIN = "domain";
+		public static final String EMAIL_ADDRESS = "emailAddress";
+	}
+
+	// Configuration Table
+	public final class ConfigurationConstants {
+		// public static final String CONFIG_ID = "config_ID";
+		public static final String CONFIG_KEY = "config_key";
+		public static final String CONFIG_VAL = "config_val";
+		public static final String EXPIRE_DATE = "expire_date";
+		public static final String CATEGORY_ID = "category_id";
+		public static final String CATEGORY_ID_DEFAULT_VALUE = "SYSTEM";
+	}
+
+	// Users table
+	public final class UserConstants {
+		public static final String USERNAME = "user_name";
+		public static final String PASSWORD = "password";
+	}
+
+	// Gateway_Worker table
+	public final class GatewayWorkerConstants {
+		public static final String USERNAME = "user_name";
+		public static final String GATEWAY_ID = "gateway_id";
+	}
+
+	// Project table
+	public final class ProjectConstants {
+		public static final String GATEWAY_ID = "gateway_id";
+		public static final String USERNAME = "user_name";
+		public static final String PROJECT_NAME = "project_name";
+		public static final String PROJECT_ID = "project_id";
+		public static final String DESCRIPTION = "description";
+        public static final String CREATION_TIME = "creationTime";
+	}
+
+    // Project table
+    public final class ProjectUserConstants {
+        public static final String USERNAME = "userName";
+        public static final String PROJECT_ID = "projectID";
+    }
+
+	// Experiment table
+	public final class ExperimentConstants {
+		public static final String PROJECT_ID = "projectID";
+		public static final String EXECUTION_USER = "executionUser";
+		public static final String GATEWAY_ID = "gatewayId";
+		public static final String EXPERIMENT_ID = "expId";
+		public static final String EXPERIMENT_NAME = "expName";
+		public static final String DESCRIPTION = "expDesc";
+		public static final String CREATION_TIME = "creationTime";
+		public static final String APPLICATION_ID = "applicationId";
+		public static final String APPLICATION_VERSION = "appVersion";
+		public static final String WORKFLOW_TEMPLATE_ID = "workflowTemplateId";
+		public static final String WORKFLOW_TEMPLATE_VERSION = "workflowTemplateVersion";
+		public static final String WORKFLOW_EXECUTION_ID = "workflowExecutionId";
+	}
+
+    // Experiment Configuration Data table
+    public final class ExperimentConfigurationDataConstants {
+        public static final String EXPERIMENT_ID = "expId";
+        public static final String AIRAVATA_AUTO_SCHEDULE = "airavataAutoSchedule";
+        public static final String OVERRIDE_MANUAL_SCHEDULE = "overrideManualParams";
+        public static final String SHARE_EXPERIMENT = "shareExp";
+    }
+
+    public final class NotificationEmailConstants {
+        public static final String EXPERIMENT_ID = "experiment_id";
+        public static final String TASK_ID = "taskId";
+        public static final String EMAIL_ADDRESS = "emailAddress";
+    }
+
+    //Experiment Input table
+    public final class ExperimentInputConstants {
+        public static final String EXPERIMENT_ID = "experiment_id";
+        public static final String EXPERIMENT_INPUT_KEY = "ex_key";
+        public static final String EXPERIMENT_INPUT_VAL = "value";
+        public static final String INPUT_TYPE = "inputType";
+        public static final String METADATA = "metadata";
+    }
+
+    //Experiment Output table
+    public final class ExperimentOutputConstants {
+        public static final String EXPERIMENT_ID = "experiment_id";
+        public static final String EXPERIMENT_OUTPUT_KEY = "ex_key";
+        public static final String EXPERIMENT_OUTPUT_VAL = "value";
+        public static final String OUTPUT_TYPE = "outputKeyType";
+        public static final String METADATA = "metadata";
+    }
+
+	// Workflow_Data table
+	public final class WorkflowNodeDetailsConstants {
+		public static final String EXPERIMENT_ID = "expId";
+		public static final String NODE_INSTANCE_ID = "nodeId";
+		public static final String CREATION_TIME = "creationTime";
+		public static final String NODE_NAME = "nodeName";
+	}
+
+	// TaskDetail table
+	public final class TaskDetailConstants {
+		public static final String TASK_ID = "taskId";
+		public static final String NODE_INSTANCE_ID = "nodeId";
+		public static final String CREATION_TIME = "creationTime";
+		public static final String APPLICATION_ID = "appId";
+		public static final String APPLICATION_VERSION = "appVersion";
+	}
+
+	// ErrorDetails table
+	public final class ErrorDetailConstants {
+		public static final String ERROR_ID = "errorID";
+		public static final String EXPERIMENT_ID = "expId";
+		public static final String TASK_ID = "taskId";
+		public static final String JOB_ID = "jobId";
+		public static final String NODE_INSTANCE_ID = "nodeId";
+		public static final String CREATION_TIME = "creationTime";
+		public static final String ACTUAL_ERROR_MESSAGE = "actualErrorMsg";
+		public static final String USER_FRIEDNLY_ERROR_MSG = "userFriendlyErrorMsg";
+		public static final String TRANSIENT_OR_PERSISTENT = "transientPersistent";
+		public static final String ERROR_CATEGORY = "errorCategory";
+		public static final String CORRECTIVE_ACTION = "correctiveAction";
+		public static final String ACTIONABLE_GROUP = "actionableGroup";
+	}
+
+    // ApplicationInput table
+	public final class ApplicationInputConstants {
+		public static final String TASK_ID = "taskId";
+		public static final String INPUT_KEY = "inputKey";
+		public static final String INPUT_KEY_TYPE = "inputKeyType";
+		public static final String METADATA = "metadata";
+		public static final String VALUE = "value";
+	}
+
+    // ApplicationOutput table
+    public final class ApplicationOutputConstants {
+        public static final String TASK_ID = "taskId";
+        public static final String OUTPUT_KEY = "outputKey";
+        public static final String OUTPUT_KEY_TYPE = "outputKeyType";
+        public static final String METADATA = "metadata";
+        public static final String VALUE = "value";
+    }
+
+    // NodeInput table
+    public final class NodeInputConstants {
+        public static final String NODE_INSTANCE_ID = "nodeId";
+        public static final String INPUT_KEY = "inputKey";
+        public static final String INPUT_KEY_TYPE = "inputKeyType";
+        public static final String METADATA = "metadata";
+        public static final String VALUE = "value";
+    }
+
+    // NodeOutput table
+    public final class NodeOutputConstants {
+        public static final String NODE_INSTANCE_ID = "nodeId";
+        public static final String OUTPUT_KEY = "outputKey";
+        public static final String OUTPUT_KEY_TYPE = "outputKeyType";
+        public static final String METADATA = "metadata";
+        public static final String VALUE = "value";
+    }
+
+    // Job Details table constants
+    public final class JobDetailConstants{
+        public static final String JOB_ID = "jobId";
+        public static final String TASK_ID = "taskId";
+        public static final String JOB_DESCRIPTION = "jobDescription";
+        public static final String CREATION_TIME = "jobDescription";
+    }
+
+    // Data transfer Details table constants
+    public final class DataTransferDetailConstants{
+        public static final String TRANSFER_ID = "transferId";
+        public static final String TASK_ID = "taskId";
+        public static final String TRANSFER_DESC = "transferDesc";
+        public static final String CREATION_TIME = "creationTime";
+    }
+
+    // Status table constants
+    public final class StatusConstants {
+        public static final String STATUS_ID = "statusId";
+        public static final String EXPERIMENT_ID = "expId";
+        public static final String NODE_INSTANCE_ID = "nodeId";
+        public static final String TRANSFER_ID = "transferId";
+        public static final String TASK_ID = "taskId";
+        public static final String JOB_ID = "jobId";
+        public static final String STATE = "state";
+        public static final String STATUS_UPDATE_TIME = "statusUpdateTime";
+        public static final String STATUS_TYPE = "statusType";
+    }
+
+    public static final class ComputationalResourceSchedulingConstants{
+        public static final String RESOURCE_SCHEDULING_ID = "schedulingId";
+        public static final String EXPERIMENT_ID = "expId";
+        public static final String TASK_ID = "taskId";
+        public static final String RESOURCE_HOST_ID = "resourceHostId";
+        public static final String CPU_COUNT = "cpuCount";
+        public static final String NODE_COUNT = "nodeCount";
+        public static final String NO_OF_THREADS = "numberOfThreads";
+        public static final String QUEUE_NAME = "queueName";
+        public static final String WALLTIME_LIMIT = "wallTimeLimit";
+        public static final String JOB_START_TIME = "jobStartTime";
+        public static final String TOTAL_PHYSICAL_MEMORY = "totalPhysicalmemory";
+        public static final String COMPUTATIONAL_PROJECT_ACCOUNT = "projectName";
+    }
+
+    public static final class AdvancedInputDataHandlingConstants {
+        public static final String INPUT_DATA_HANDLING_ID = "dataHandlingId";
+        public static final String EXPERIMENT_ID = "expId";
+        public static final String TASK_ID = "taskId";
+        public static final String WORKING_DIR_PARENT = "parentWorkingDir";
+        public static final String UNIQUE_WORKING_DIR = "workingDir";
+        public static final String STAGE_INPUT_FILES_TO_WORKING_DIR = "stageInputsToWorkingDir";
+        public static final String CLEAN_AFTER_JOB = "cleanAfterJob";
+    }
+
+    public static final class AdvancedOutputDataHandlingConstants {
+        public static final String OUTPUT_DATA_HANDLING_ID = "outputDataHandlingId";
+        public static final String EXPERIMENT_ID = "expId";
+        public static final String TASK_ID = "taskId";
+        public static final String OUTPUT_DATA_DIR = "outputDataDir";
+        public static final String DATA_REG_URL = "dataRegUrl";
+        public static final String PERSIST_OUTPUT_DATA = "persistOutputData";
+    }
+
+    public static final class QosParamsConstants {
+        public static final String QOS_ID = "qosId";
+        public static final String EXPERIMENT_ID = "expId";
+        public static final String TASK_ID = "taskId";
+        public static final String START_EXECUTION_AT = "startExecutionAt";
+        public static final String EXECUTE_BEFORE = "executeBefore";
+        public static final String NO_OF_RETRIES = "noOfRetries";
+    }
+
+
+	protected AbstractResource() {
+	}
+
+	public boolean isExists(ResourceType type, Object name) throws RegistryException {
+		try {
+			return get(type, name) != null;
+		} catch (Exception e) {
+			return false;
+		}
+	}
+
+	@SuppressWarnings("unchecked")
+	public static <T> List<T> getResourceList(List<Resource> resources,
+			Class<?> T) {
+		List<T> list = new ArrayList<T>();
+		for (Resource o : resources) {
+			list.add((T) o);
+		}
+		return list;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvanceInputDataHandlingResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvanceInputDataHandlingResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvanceInputDataHandlingResource.java
new file mode 100644
index 0000000..4ad08e4
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvanceInputDataHandlingResource.java
@@ -0,0 +1,168 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.AdvancedInputDataHandling;
+import org.apache.airavata.persistance.registry.jpa.model.Experiment;
+import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import java.util.List;
+
+public class AdvanceInputDataHandlingResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(AdvanceInputDataHandlingResource.class);
+    private int dataHandlingId = 0;
+    private ExperimentResource experimentResource;
+    private TaskDetailResource taskDetailResource;
+    private String workingDirParent;
+    private String workingDir;
+    private boolean stageInputFiles;
+    private boolean cleanAfterJob;
+
+    public int getDataHandlingId() {
+        return dataHandlingId;
+    }
+
+    public void setDataHandlingId(int dataHandlingId) {
+        this.dataHandlingId = dataHandlingId;
+    }
+
+    public ExperimentResource getExperimentResource() {
+        return experimentResource;
+    }
+
+    public void setExperimentResource(ExperimentResource experimentResource) {
+        this.experimentResource = experimentResource;
+    }
+
+    public TaskDetailResource getTaskDetailResource() {
+        return taskDetailResource;
+    }
+
+    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
+        this.taskDetailResource = taskDetailResource;
+    }
+
+    public String getWorkingDirParent() {
+        return workingDirParent;
+    }
+
+    public void setWorkingDirParent(String workingDirParent) {
+        this.workingDirParent = workingDirParent;
+    }
+
+    public String getWorkingDir() {
+        return workingDir;
+    }
+
+    public void setWorkingDir(String workingDir) {
+        this.workingDir = workingDir;
+    }
+
+    public boolean isStageInputFiles() {
+        return stageInputFiles;
+    }
+
+    public void setStageInputFiles(boolean stageInputFiles) {
+        this.stageInputFiles = stageInputFiles;
+    }
+
+    public boolean isCleanAfterJob() {
+        return cleanAfterJob;
+    }
+
+    public void setCleanAfterJob(boolean cleanAfterJob) {
+        this.cleanAfterJob = cleanAfterJob;
+    }
+
+    
+    public Resource create(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for input data handling resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void remove(ResourceType type, Object name) throws RegistryException {
+        logger.error("Unsupported resource type for input data handling resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Resource get(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for input data handling resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Resource> get(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for input data handling resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            AdvancedInputDataHandling dataHandling;
+            if (dataHandlingId != 0) {
+                dataHandling = em.find(AdvancedInputDataHandling.class, dataHandlingId);
+                dataHandling.setDataHandlingId(dataHandlingId);
+            } else {
+                dataHandling = new AdvancedInputDataHandling();
+            }
+            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
+            if (taskDetailResource != null) {
+                TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
+                dataHandling.setTaskId(taskDetailResource.getTaskId());
+                dataHandling.setTask(taskDetail);
+            }
+            dataHandling.setExpId(experimentResource.getExpID());
+            dataHandling.setExperiment(experiment);
+            dataHandling.setWorkingDir(workingDir);
+            dataHandling.setParentWorkingDir(workingDirParent);
+            dataHandling.setStageInputsToWorkingDir(stageInputFiles);
+            dataHandling.setCleanAfterJob(cleanAfterJob);
+            em.persist(dataHandling);
+            dataHandlingId = dataHandling.getDataHandlingId();
+            em.getTransaction().commit();
+            em.close();
+        }catch (Exception e){
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvancedOutputDataHandlingResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvancedOutputDataHandlingResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvancedOutputDataHandlingResource.java
new file mode 100644
index 0000000..bb3cc80
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/AdvancedOutputDataHandlingResource.java
@@ -0,0 +1,159 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.AdvancedOutputDataHandling;
+import org.apache.airavata.persistance.registry.jpa.model.Experiment;
+import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import java.util.List;
+
+public class AdvancedOutputDataHandlingResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(AdvancedOutputDataHandlingResource.class);
+    private int outputDataHandlingId = 0;
+    private ExperimentResource experimentResource;
+    private TaskDetailResource taskDetailResource;
+    private  String outputDataDir;
+    private String dataRegUrl;
+    private boolean persistOutputData;
+
+    public int getOutputDataHandlingId() {
+        return outputDataHandlingId;
+    }
+
+    public void setOutputDataHandlingId(int outputDataHandlingId) {
+        this.outputDataHandlingId = outputDataHandlingId;
+    }
+
+    public ExperimentResource getExperimentResource() {
+        return experimentResource;
+    }
+
+    public void setExperimentResource(ExperimentResource experimentResource) {
+        this.experimentResource = experimentResource;
+    }
+
+    public TaskDetailResource getTaskDetailResource() {
+        return taskDetailResource;
+    }
+
+    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
+        this.taskDetailResource = taskDetailResource;
+    }
+
+    public String getOutputDataDir() {
+        return outputDataDir;
+    }
+
+    public void setOutputDataDir(String outputDataDir) {
+        this.outputDataDir = outputDataDir;
+    }
+
+    public String getDataRegUrl() {
+        return dataRegUrl;
+    }
+
+    public void setDataRegUrl(String dataRegUrl) {
+        this.dataRegUrl = dataRegUrl;
+    }
+
+    public boolean isPersistOutputData() {
+        return persistOutputData;
+    }
+
+    public void setPersistOutputData(boolean persistOutputData) {
+        this.persistOutputData = persistOutputData;
+    }
+
+
+    public Resource create(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for output data handling resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+
+    public void remove(ResourceType type, Object name) throws RegistryException {
+        logger.error("Unsupported resource type for output data handling resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+
+    public Resource get(ResourceType type, Object name) throws RegistryException  {
+        logger.error("Unsupported resource type for output data handling resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        logger.error("Unsupported resource type for output data handling resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+
+    public void save() throws RegistryException {
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            AdvancedOutputDataHandling dataHandling;
+            if (outputDataHandlingId != 0 ){
+                dataHandling = em.find(AdvancedOutputDataHandling.class, outputDataHandlingId);
+                dataHandling.setOutputDataHandlingId(outputDataHandlingId);
+            }else {
+                dataHandling = new AdvancedOutputDataHandling();
+            }
+            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
+            if (taskDetailResource !=null){
+                TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
+                dataHandling.setTaskId(taskDetailResource.getTaskId());
+                dataHandling.setTask(taskDetail);
+            }
+
+            dataHandling.setExpId(experimentResource.getExpID());
+            dataHandling.setExperiment(experiment);
+            dataHandling.setDataRegUrl(dataRegUrl);
+            dataHandling.setOutputDataDir(outputDataDir);
+            dataHandling.setPersistOutputData(persistOutputData);
+            em.persist(dataHandling);
+            outputDataHandlingId = dataHandling.getOutputDataHandlingId();
+            em.getTransaction().commit();
+            em.close();
+        }catch (Exception e){
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java
new file mode 100644
index 0000000..d04fc85
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationInputResource.java
@@ -0,0 +1,235 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import java.util.List;
+
+import javax.persistence.EntityManager;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.ApplicationInput;
+import org.apache.airavata.persistance.registry.jpa.model.ApplicationInput_PK;
+import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ApplicationInputResource extends AbstractResource {
+	private static final Logger logger = LoggerFactory.getLogger(ApplicationInputResource.class);
+    private TaskDetailResource taskDetailResource;
+    private String inputKey;
+    private String dataType;
+    private String metadata;
+    private String value;
+    private String appArgument;
+    private boolean standardInput;
+    private String userFriendlyDesc;
+    private int inputOrder;
+    private boolean isRequired;
+    private boolean requiredToCMD;
+    private boolean dataStaged;
+
+    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;
+    }
+
+    public int getInputOrder() {
+        return inputOrder;
+    }
+
+    public void setInputOrder(int inputOrder) {
+        this.inputOrder = inputOrder;
+    }
+
+    public String getAppArgument() {
+        return appArgument;
+    }
+
+    public void setAppArgument(String appArgument) {
+        this.appArgument = appArgument;
+    }
+
+    public boolean isStandardInput() {
+        return standardInput;
+    }
+
+    public void setStandardInput(boolean standardInput) {
+        this.standardInput = standardInput;
+    }
+
+    public String getUserFriendlyDesc() {
+        return userFriendlyDesc;
+    }
+
+    public void setUserFriendlyDesc(String userFriendlyDesc) {
+        this.userFriendlyDesc = userFriendlyDesc;
+    }
+
+    public String getInputKey() {
+        return inputKey;
+    }
+
+    public void setInputKey(String inputKey) {
+        this.inputKey = inputKey;
+    }
+
+    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 getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public TaskDetailResource getTaskDetailResource() {
+        return taskDetailResource;
+    }
+
+    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
+        this.taskDetailResource = taskDetailResource;
+    }
+
+    
+    public Resource create(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for application input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for application input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Resource get(ResourceType type, Object name) throws RegistryException {
+        logger.error("Unsupported resource type for application input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        logger.error("Unsupported resource type for application input data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void save() throws RegistryException {
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            ApplicationInput existingInput = em.find(ApplicationInput.class, new ApplicationInput_PK(inputKey, taskDetailResource.getTaskId()));
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            ApplicationInput applicationInput = new ApplicationInput();
+            TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
+            applicationInput.setTask(taskDetail);
+            applicationInput.setTaskId(taskDetail.getTaskId());
+            applicationInput.setInputKey(inputKey);
+            applicationInput.setDataType(dataType);
+            applicationInput.setAppArgument(appArgument);
+            applicationInput.setStandardInput(standardInput);
+            applicationInput.setUserFriendlyDesc(userFriendlyDesc);
+            applicationInput.setInputOrder(inputOrder);
+            applicationInput.setRequiredToCMD(requiredToCMD);
+            applicationInput.setRequired(isRequired);
+            applicationInput.setDataStaged(dataStaged);
+            if (value != null){
+                applicationInput.setValue(value.toCharArray());
+            }
+
+            applicationInput.setMetadata(metadata);
+
+            if (existingInput != null) {
+                existingInput.setTask(taskDetail);
+                existingInput.setTaskId(taskDetail.getTaskId());
+                existingInput.setInputKey(inputKey);
+                existingInput.setDataType(dataType);
+                existingInput.setAppArgument(appArgument);
+                existingInput.setStandardInput(standardInput);
+                existingInput.setUserFriendlyDesc(userFriendlyDesc);
+                existingInput.setInputOrder(inputOrder);
+                existingInput.setRequiredToCMD(requiredToCMD);
+                existingInput.setRequired(isRequired);
+                existingInput.setDataStaged(dataStaged);
+                if (value != null){
+                    existingInput.setValue(value.toCharArray());
+                }
+                existingInput.setMetadata(metadata);
+                applicationInput = em.merge(existingInput);
+            } else {
+                em.persist(applicationInput);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            throw new RegistryException(e.getMessage());
+        } finally {
+                if (em != null && em.isOpen()) {
+                    if (em.getTransaction().isActive()){
+                        em.getTransaction().rollback();
+                    }
+                    em.close();
+                }
+            }
+        }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationOutputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationOutputResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationOutputResource.java
new file mode 100644
index 0000000..c937df3
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ApplicationOutputResource.java
@@ -0,0 +1,213 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import java.util.List;
+
+import javax.persistence.EntityManager;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.ApplicationOutput;
+import org.apache.airavata.persistance.registry.jpa.model.ApplicationOutput_PK;
+import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ApplicationOutputResource extends AbstractResource {
+	private static final Logger logger = LoggerFactory.getLogger(ApplicationOutputResource.class);
+    private TaskDetailResource taskDetailResource;
+    private String outputKey;
+    private String dataType;
+    private String value;
+    private boolean isRequired;
+    private boolean dataMovement;
+    private String dataNameLocation;
+    private boolean requiredToCMD;
+    private String searchQuery;
+    private String appArgument;
+
+    public String getSearchQuery() {
+        return searchQuery;
+    }
+
+    public void setSearchQuery(String searchQuery) {
+        this.searchQuery = searchQuery;
+    }
+
+    public String getAppArgument() {
+        return appArgument;
+    }
+
+    public void setAppArgument(String appArgument) {
+        this.appArgument = appArgument;
+    }
+
+    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 getOutputKey() {
+        return outputKey;
+    }
+
+    public void setOutputKey(String outputKey) {
+        this.outputKey = outputKey;
+    }
+
+    public String getDataType() {
+        return dataType;
+    }
+
+    public void setDataType(String dataType) {
+        this.dataType = dataType;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public TaskDetailResource getTaskDetailResource() {
+        return taskDetailResource;
+    }
+
+    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
+        this.taskDetailResource = taskDetailResource;
+    }
+
+    
+    public Resource create(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for application output data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for application output data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Resource get(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for application output data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        logger.error("Unsupported resource type for application output data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void save() throws RegistryException {
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            ApplicationOutput existingOutput = em.find(ApplicationOutput.class, new ApplicationOutput_PK(outputKey, taskDetailResource.getTaskId()));
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            ApplicationOutput applicationOutput = new ApplicationOutput();
+            TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
+            applicationOutput.setTask(taskDetail);
+            applicationOutput.setTaskId(taskDetail.getTaskId());
+            applicationOutput.setOutputKey(outputKey);
+            applicationOutput.setDataType(dataType);
+            applicationOutput.setRequired(isRequired);
+            applicationOutput.setAddedToCmd(requiredToCMD);
+            applicationOutput.setDataMovement(dataMovement);
+            applicationOutput.setDataNameLocation(dataNameLocation);
+            applicationOutput.setSearchQuery(searchQuery);
+            applicationOutput.setApplicationArgument(appArgument);
+            if (value != null){
+                applicationOutput.setValue(value.toCharArray());
+            }
+
+            if (existingOutput != null) {
+                existingOutput.setTask(taskDetail);
+                existingOutput.setTaskId(taskDetail.getTaskId());
+                existingOutput.setOutputKey(outputKey);
+                existingOutput.setDataType(dataType);
+                existingOutput.setRequired(isRequired);
+                existingOutput.setAddedToCmd(requiredToCMD);
+                existingOutput.setDataMovement(dataMovement);
+                existingOutput.setDataNameLocation(dataNameLocation);
+                existingOutput.setSearchQuery(searchQuery);
+                existingOutput.setApplicationArgument(appArgument);
+                if (value != null){
+                    existingOutput.setValue(value.toCharArray());
+                }
+                applicationOutput = em.merge(existingOutput);
+            } else {
+                em.persist(applicationOutput);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e.getMessage());
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
new file mode 100644
index 0000000..7c0327f
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
@@ -0,0 +1,229 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.Computational_Resource_Scheduling;
+import org.apache.airavata.persistance.registry.jpa.model.Experiment;
+import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import java.sql.Timestamp;
+import java.util.List;
+
+public class ComputationSchedulingResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(ComputationSchedulingResource.class);
+    private int schedulingId = 0;
+    private ExperimentResource experimentResource;
+    private TaskDetailResource taskDetailResource;
+    private String resourceHostId;
+    private int cpuCount;
+    private int nodeCount;
+    private int numberOfThreads;
+    private String queueName;
+    private int walltimeLimit;
+    private Timestamp jobStartTime;
+    private int physicalMemory;
+    private String projectName;
+    private String chessisName;
+
+    public String getChessisName() {
+        return chessisName;
+    }
+
+    public void setChessisName(String chessisName) {
+        this.chessisName = chessisName;
+    }
+
+    public int getSchedulingId() {
+        return schedulingId;
+    }
+
+    public void setSchedulingId(int schedulingId) {
+        this.schedulingId = schedulingId;
+    }
+
+    public ExperimentResource getExperimentResource() {
+        return experimentResource;
+    }
+
+    public void setExperimentResource(ExperimentResource experimentResource) {
+        this.experimentResource = experimentResource;
+    }
+
+    public TaskDetailResource getTaskDetailResource() {
+        return taskDetailResource;
+    }
+
+    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
+        this.taskDetailResource = taskDetailResource;
+    }
+
+    public String getResourceHostId() {
+        return resourceHostId;
+    }
+
+    public void setResourceHostId(String resourceHostId) {
+        this.resourceHostId = resourceHostId;
+    }
+
+    public int getCpuCount() {
+        return cpuCount;
+    }
+
+    public void setCpuCount(int cpuCount) {
+        this.cpuCount = cpuCount;
+    }
+
+    public int getNodeCount() {
+        return nodeCount;
+    }
+
+    public void setNodeCount(int nodeCount) {
+        this.nodeCount = nodeCount;
+    }
+
+    public int getNumberOfThreads() {
+        return numberOfThreads;
+    }
+
+    public void setNumberOfThreads(int numberOfThreads) {
+        this.numberOfThreads = numberOfThreads;
+    }
+
+    public String getQueueName() {
+        return queueName;
+    }
+
+    public void setQueueName(String queueName) {
+        this.queueName = queueName;
+    }
+
+    public int getWalltimeLimit() {
+        return walltimeLimit;
+    }
+
+    public void setWalltimeLimit(int walltimeLimit) {
+        this.walltimeLimit = walltimeLimit;
+    }
+
+    public Timestamp getJobStartTime() {
+        return jobStartTime;
+    }
+
+    public void setJobStartTime(Timestamp jobStartTime) {
+        this.jobStartTime = jobStartTime;
+    }
+
+    public int getPhysicalMemory() {
+        return physicalMemory;
+    }
+
+    public void setPhysicalMemory(int physicalMemory) {
+        this.physicalMemory = physicalMemory;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    
+    public Resource create(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for computational scheduling resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for computational scheduling resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Resource get(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for computational scheduling resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        logger.error("Unsupported resource type for computational scheduling resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Computational_Resource_Scheduling scheduling;
+            if (schedulingId != 0) {
+                scheduling = em.find(Computational_Resource_Scheduling.class, schedulingId);
+                scheduling.setSchedulingId(schedulingId);
+            } else {
+                scheduling = new Computational_Resource_Scheduling();
+            }
+            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
+            if (taskDetailResource != null) {
+                TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
+                scheduling.setTask(taskDetail);
+                scheduling.setTaskId(taskDetailResource.getTaskId());
+            }
+            scheduling.setExpId(experimentResource.getExpID());
+            scheduling.setExperiment(experiment);
+            scheduling.setResourceHostId(resourceHostId);
+            scheduling.setCpuCount(cpuCount);
+            scheduling.setNodeCount(nodeCount);
+            scheduling.setNumberOfThreads(numberOfThreads);
+            scheduling.setQueueName(queueName);
+            scheduling.setWallTimeLimit(walltimeLimit);
+            scheduling.setJobStartTime(jobStartTime);
+            scheduling.setTotalPhysicalmemory(physicalMemory);
+            scheduling.setProjectName(projectName);
+            scheduling.setChessisName(chessisName);
+            em.persist(scheduling);
+            schedulingId = scheduling.getSchedulingId();
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
new file mode 100644
index 0000000..c45ba07
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
@@ -0,0 +1,162 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.Experiment;
+import org.apache.airavata.persistance.registry.jpa.model.ExperimentConfigData;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import java.util.List;
+
+public class ConfigDataResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(ConfigDataResource.class);
+    private ExperimentResource experimentResource;
+    private boolean airavataAutoSchedule;
+    private boolean overrideManualParams;
+    private boolean shareExp;
+    private String userDn;
+    private boolean generateCert;
+
+    public String getUserDn() {
+        return userDn;
+    }
+
+    public void setUserDn(String userDn) {
+        this.userDn = userDn;
+    }
+
+    public boolean isGenerateCert() {
+        return generateCert;
+    }
+
+    public void setGenerateCert(boolean generateCert) {
+        this.generateCert = generateCert;
+    }
+
+    public ExperimentResource getExperimentResource() {
+        return experimentResource;
+    }
+
+    public void setExperimentResource(ExperimentResource experimentResource) {
+        this.experimentResource = experimentResource;
+    }
+
+    public boolean isAiravataAutoSchedule() {
+        return airavataAutoSchedule;
+    }
+
+    public void setAiravataAutoSchedule(boolean airavataAutoSchedule) {
+        this.airavataAutoSchedule = airavataAutoSchedule;
+    }
+
+    public boolean isOverrideManualParams() {
+        return overrideManualParams;
+    }
+
+    public void setOverrideManualParams(boolean overrideManualParams) {
+        this.overrideManualParams = overrideManualParams;
+    }
+
+    public boolean isShareExp() {
+        return shareExp;
+    }
+
+    public void setShareExp(boolean shareExp) {
+        this.shareExp = shareExp;
+    }
+
+    
+    public Resource create(ResourceType type) throws RegistryException {
+        logger.error("Unsupported resource type for config data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for config data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public Resource get(ResourceType type, Object name) throws RegistryException{
+        logger.error("Unsupported resource type for config data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        logger.error("Unsupported resource type for config data resource.", new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            ExperimentConfigData existingConfig = em.find(ExperimentConfigData.class, experimentResource.getExpID());
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            ExperimentConfigData configData = new ExperimentConfigData();
+            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
+            configData.setExpId(experimentResource.getExpID());
+            configData.setExperiment(experiment);
+            configData.setAiravataAutoSchedule(airavataAutoSchedule);
+            configData.setOverrideManualParams(overrideManualParams);
+            configData.setShareExp(shareExp);
+            configData.setUserDn(userDn);
+            configData.setGenerateCert(generateCert);
+            if (existingConfig != null) {
+                existingConfig.setExpId(experimentResource.getExpID());
+                existingConfig.setExperiment(experiment);
+                existingConfig.setAiravataAutoSchedule(airavataAutoSchedule);
+                existingConfig.setOverrideManualParams(overrideManualParams);
+                existingConfig.setShareExp(shareExp);
+                existingConfig.setUserDn(userDn);
+                existingConfig.setGenerateCert(generateCert);
+                configData = em.merge(existingConfig);
+            } else {
+                em.persist(configData);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
new file mode 100644
index 0000000..1214e47
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
@@ -0,0 +1,208 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.locks.Lock;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.Configuration;
+import org.apache.airavata.persistance.registry.jpa.model.Configuration_PK;
+import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ConfigurationResource extends AbstractResource {
+    private final static Logger logger = LoggerFactory.getLogger(ConfigurationResource.class);
+    private String configKey;
+    private String configVal;
+    private Timestamp expireDate;
+    private String categoryID = ConfigurationConstants.CATEGORY_ID_DEFAULT_VALUE;
+
+    public ConfigurationResource() {
+    }
+
+    /**
+     * @param configKey configuration key
+     * @param configVal configuration value
+     */
+    public ConfigurationResource(String configKey, String configVal) {
+        this.configKey = configKey;
+        this.configVal = configVal;
+    }
+
+    /**
+     * Since Configuration does not depend on any other data structures at the
+     * system, this method is not valid
+     *
+     * @param type child resource types
+     * @return UnsupportedOperationException
+     */
+    public Resource create(ResourceType type) throws RegistryException {
+        logger.error("Unsupported operation for configuration resource " +
+                "since there are no child resources generated by configuration resource.. ",
+                new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * Since Configuration does not depend on any other data structures at the
+     * system, this method is not valid
+     *
+     * @param type child resource types
+     * @param name name of the child resource
+     *             throws UnsupportedOperationException
+     */
+    public void remove(ResourceType type, Object name) throws RegistryException {
+        logger.error("Unsupported operation for configuration resource " +
+                "since there are no child resources generated by configuration resource.. ",
+                new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+
+    /**
+     * Since Configuration does not depend on any other data structures at the
+     * system, this method is not valid
+     *
+     * @param type child resource types
+     * @param name name of the child resource
+     * @return UnsupportedOperationException
+     */
+    public Resource get(ResourceType type, Object name) throws RegistryException {
+        logger.error("Unsupported operation for configuration resource " +
+                "since there are no child resources generated by configuration resource.. ",
+                new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * Since Configuration does not depend on any other data structures at the
+     * system, this method is not valid
+     *
+     * @param type child resource types
+     * @return UnsupportedOperationException
+     */
+    public List<Resource> get(ResourceType type) throws RegistryException {
+        logger.error("Unsupported operation for configuration resource " +
+                "since there are no child resources generated by configuration resource.. ",
+                new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @param expireDate expire date of the configuration
+     */
+    public void setExpireDate(Timestamp expireDate) {
+        this.expireDate = expireDate;
+    }
+
+    /**
+     * saveExperiment configuration to database
+     */
+    public synchronized void save() throws RegistryException {
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            //whether existing
+            Configuration existing = em.find(Configuration.class, new Configuration_PK(configKey, configVal, categoryID));
+            em.close();
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Configuration configuration = new Configuration();
+            configuration.setConfig_key(configKey);
+            configuration.setConfig_val(configVal);
+            configuration.setExpire_date(expireDate);
+            configuration.setCategory_id(categoryID);
+            if (existing != null) {
+                existing.setExpire_date(expireDate);
+                existing.setCategory_id(categoryID);
+                configuration = em.merge(existing);
+            } else {
+                em.persist(configuration);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    /**
+     * Since Configuration does not depend on any other data structures at the
+     * system, this method is not valid
+     *
+     * @param type child resource types
+     * @param name of the child resource
+     * @return UnsupportedOperationException
+     */
+    public boolean isExists(ResourceType type, Object name) {
+        logger.error("Unsupported operation for configuration resource " +
+                "since there are no child resources generated by configuration resource.. ",
+                new UnsupportedOperationException());
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @return configuration value
+     */
+    public String getConfigVal() {
+        return configVal;
+    }
+
+    /**
+     * @param configKey configuration key
+     */
+    public void setConfigKey(String configKey) {
+        this.configKey = configKey;
+    }
+
+    /**
+     * @param configVal configuration value
+     */
+    public void setConfigVal(String configVal) {
+        this.configVal = configVal;
+    }
+
+    public String getCategoryID() {
+        return categoryID;
+    }
+
+    public void setCategoryID(String categoryID) {
+        this.categoryID = categoryID;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java
new file mode 100644
index 0000000..ab1b49e
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java
@@ -0,0 +1,272 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.DataTransferDetail;
+import org.apache.airavata.persistance.registry.jpa.model.Status;
+import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
+import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.utils.StatusType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+
+public class DataTransferDetailResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(DataTransferDetailResource.class);
+    private String transferId;
+    private TaskDetailResource taskDetailResource;
+    private Timestamp creationTime;
+    private String transferDescription;
+
+    public String getTransferId() {
+        return transferId;
+    }
+
+    public void setTransferId(String transferId) {
+        this.transferId = transferId;
+    }
+
+    public TaskDetailResource getTaskDetailResource() {
+        return taskDetailResource;
+    }
+
+    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
+        this.taskDetailResource = taskDetailResource;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public String getTransferDescription() {
+        return transferDescription;
+    }
+
+    public void setTransferDescription(String transferDescription) {
+        this.transferDescription = transferDescription;
+    }
+
+    
+    public Resource create(ResourceType type) throws RegistryException {
+        switch (type){
+            case STATUS:
+                StatusResource statusResource = new StatusResource();
+                statusResource.setDataTransferDetail(this);
+                return statusResource;
+            default:
+                logger.error("Unsupported resource type for data transfer details data resource.", new UnsupportedOperationException());
+                throw new UnsupportedOperationException();
+        }
+    }
+
+    
+    public void remove(ResourceType type, Object name) throws RegistryException {
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+            QueryGenerator generator;
+            switch (type) {
+                case STATUS:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(StatusConstants.TRANSFER_ID, name);
+                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.DATA_TRANSFER);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                default:
+                    logger.error("Unsupported resource type for data transfer details resource.", new IllegalArgumentException());
+                    break;
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    
+    public Resource get(ResourceType type, Object name) throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            QueryGenerator generator;
+            Query q;
+            switch (type) {
+                case STATUS:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(StatusConstants.TRANSFER_ID, name);
+                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.DATA_TRANSFER);
+                    q = generator.selectQuery(em);
+                    Status status = (Status) q.getSingleResult();
+                    StatusResource statusResource = (StatusResource) Utils.getResource(ResourceType.STATUS, status);
+                    em.getTransaction().commit();
+                    em.close();
+                    return statusResource;
+                default:
+                    em.getTransaction().commit();
+                    em.close();
+                    logger.error("Unsupported resource type for data transfer details resource.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Unsupported resource type for data transfer details resource.");
+            }
+        } catch (Exception e) {
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        List<Resource> resourceList = new ArrayList<Resource>();
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+            QueryGenerator generator;
+            List results;
+            switch (type) {
+                case STATUS:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(StatusConstants.TRANSFER_ID, transferId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            Status status = (Status) result;
+                            StatusResource statusResource =
+                                    (StatusResource) Utils.getResource(ResourceType.STATUS, status);
+                            resourceList.add(statusResource);
+                        }
+                    }
+                    break;
+                default:
+                    em.getTransaction().commit();
+                    em.close();
+                    logger.error("Unsupported resource type for workflow node details resource.", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return resourceList;
+    }
+
+    
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            DataTransferDetail existingDF = em.find(DataTransferDetail.class, transferId);
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            DataTransferDetail dataTransferDetail = new DataTransferDetail();
+            TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
+            dataTransferDetail.setTransferId(transferId);
+            dataTransferDetail.setTask(taskDetail);
+            dataTransferDetail.setTaskId(taskDetailResource.getTaskId());
+            dataTransferDetail.setCreationTime(creationTime);
+            if (transferDescription != null) {
+                dataTransferDetail.setTransferDesc(transferDescription.toCharArray());
+            }
+            if (existingDF != null) {
+                existingDF.setTransferId(transferId);
+                existingDF.setTask(taskDetail);
+                existingDF.setTaskId(taskDetailResource.getTaskId());
+                existingDF.setCreationTime(creationTime);
+                if (transferDescription != null) {
+                    existingDF.setTransferDesc(transferDescription.toCharArray());
+                }
+                dataTransferDetail = em.merge(existingDF);
+            } else {
+                em.persist(dataTransferDetail);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    public StatusResource getDataTransferStatus () throws RegistryException{
+        List<Resource> resources = get(ResourceType.STATUS);
+        for (Resource resource : resources) {
+            StatusResource dataTransferStatus = (StatusResource) resource;
+            if(dataTransferStatus.getStatusType().equals(StatusType.DATA_TRANSFER.toString())){
+                if (dataTransferStatus.getState() == null || dataTransferStatus.getState().equals("") ){
+                    dataTransferStatus.setState("UNKNOWN");
+                }
+                return dataTransferStatus;
+            }
+        }
+        return null;
+    }
+}


[30/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/ModelConversionHelper.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/ModelConversionHelper.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/ModelConversionHelper.java
new file mode 100644
index 0000000..cd27ae3
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/ModelConversionHelper.java
@@ -0,0 +1,218 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.Version;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.model.workspace.Group;
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.model.workspace.User;
+import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.persistance.registry.mongo.conversion.appcatalog.idot.InputDataObjectTypeDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.appcatalog.idot.InputDataObjectTypeSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.appcatalog.odot.OutputDataObjectTypeDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.appcatalog.odot.OutputDataObjectTypeSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.ExperimentDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.ExperimentSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.aidh.AdvancedInputDataHandlingDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.aidh.AdvancedInputDataHandlingSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.aodh.AdvancedOutputDataHandlingDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.aodh.AdvancedOutputDataHandlingSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.appstatus.ApplicationStatusDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.appstatus.ApplicationStatusSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.crsh.ComputationalResourceSchedulingDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.crsh.ComputationalResourceSchedulingSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.datatrdetails.DataTransferDetailsDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.datatrdetails.DataTransferDetailsSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.errdetails.ErrorDetailsDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.errdetails.ErrorDetailsSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.expstatus.ExperimentStatusDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.expstatus.ExperimentStatusSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.expsummary.ExperimentSummaryDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.expsummary.ExperimentSummarySerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.jobdetails.JobDetailsDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.jobdetails.JobDetailsSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.jobstatus.JobStatusDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.jobstatus.JobStatusSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.qosp.QualityOfServiceParamsDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.qosp.QualityOfServiceParamsSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.taskdetails.TaskDetailsDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.taskdetails.TaskDetailsSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.taskstatus.TaskStatusDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.taskstatus.TaskStatusSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.trstatus.TransferStatusDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.trstatus.TransferStatusSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.ucdata.UserConfigurationDataDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.ucdata.UserConfigurationDataSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.validationrslt.ValidationResultsDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.validationrslt.ValidationResultsSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.wfnd.WorkflowNodeDetailsDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.wfnd.WorkflowNodeDetailsSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.wfns.WorkflowNodeStatusDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.experiment.wfns.WorkflowNodeStatusSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.gateway.GatewayDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.gateway.GatewaySerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.group.GroupDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.group.GroupSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.project.ProjectDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.project.ProjectSerializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.user.UserDeserializer;
+import org.apache.airavata.persistance.registry.mongo.conversion.user.UserSerializer;
+import org.apache.thrift.TBase;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+/**
+ * This is utility class for model conversion of thrift to/from json
+ */
+public class ModelConversionHelper {
+    private final static Logger logger = LoggerFactory.getLogger(ModelConversionHelper.class);
+    private ObjectMapper objectMapper;
+
+    public ModelConversionHelper(){
+        init();
+    }
+
+    /**
+     * Private method to register the custom serializers and deserializers
+     */
+    private void init(){
+        this.objectMapper = new ObjectMapper();
+        SimpleModule module = new SimpleModule("AiravataModule",
+                new Version(1,0,0,null,null,null));
+
+        module.addSerializer(Gateway.class, new GatewaySerializer());
+        module.addDeserializer(Gateway.class, new GatewayDeserializer());
+
+        module.addSerializer(Group.class, new GroupSerializer());
+        module.addDeserializer(Group.class, new GroupDeserializer());
+
+        module.addSerializer(Project.class, new ProjectSerializer());
+        module.addDeserializer(Project.class, new ProjectDeserializer());
+
+        module.addSerializer(User.class, new UserSerializer());
+        module.addDeserializer(User.class, new UserDeserializer());
+
+        module.addSerializer(Experiment.class, new ExperimentSerializer());
+        module.addDeserializer(Experiment.class, new ExperimentDeserializer());
+
+        module.addSerializer(AdvancedInputDataHandling.class,
+                new AdvancedInputDataHandlingSerializer());
+        module.addDeserializer(AdvancedInputDataHandling.class,
+                new AdvancedInputDataHandlingDeserializer());
+
+        module.addSerializer(AdvancedOutputDataHandling.class,
+                new AdvancedOutputDataHandlingSerializer());
+        module.addDeserializer(AdvancedOutputDataHandling.class,
+                new AdvancedOutputDataHandlingDeserializer());
+
+        module.addSerializer(ApplicationStatus.class,
+                new ApplicationStatusSerializer());
+        module.addDeserializer(ApplicationStatus.class,
+                new ApplicationStatusDeserializer());
+
+        module.addSerializer(ComputationalResourceScheduling.class,
+                new ComputationalResourceSchedulingSerializer());
+        module.addDeserializer(ComputationalResourceScheduling.class,
+                new ComputationalResourceSchedulingDeserializer());
+
+        module.addSerializer(DataTransferDetails.class, new DataTransferDetailsSerializer());
+        module.addDeserializer(DataTransferDetails.class, new DataTransferDetailsDeserializer());
+
+        module.addSerializer(ErrorDetails.class, new ErrorDetailsSerializer());
+        module.addDeserializer(ErrorDetails.class, new ErrorDetailsDeserializer());
+
+        module.addSerializer(ExperimentStatus.class, new ExperimentStatusSerializer());
+        module.addDeserializer(ExperimentStatus.class, new ExperimentStatusDeserializer());
+
+        module.addSerializer(ExperimentSummary.class, new ExperimentSummarySerializer());
+        module.addDeserializer(ExperimentSummary.class, new ExperimentSummaryDeserializer());
+
+        module.addSerializer(JobDetails.class, new JobDetailsSerializer());
+        module.addDeserializer(JobDetails.class, new JobDetailsDeserializer());
+
+        module.addSerializer(JobStatus.class, new JobStatusSerializer());
+        module.addDeserializer(JobStatus.class, new JobStatusDeserializer());
+
+        module.addSerializer(QualityOfServiceParams.class,
+                new QualityOfServiceParamsSerializer());
+        module.addDeserializer(QualityOfServiceParams.class,
+                new QualityOfServiceParamsDeserializer());
+
+        module.addSerializer(TaskDetails.class, new TaskDetailsSerializer());
+        module.addDeserializer(TaskDetails.class, new TaskDetailsDeserializer());
+
+        module.addSerializer(TaskStatus.class, new TaskStatusSerializer());
+        module.addDeserializer(TaskStatus.class, new TaskStatusDeserializer());
+
+        module.addSerializer(TransferStatus.class, new TransferStatusSerializer());
+        module.addDeserializer(TransferStatus.class, new TransferStatusDeserializer());
+
+        module.addSerializer(UserConfigurationData.class, new UserConfigurationDataSerializer());
+        module.addDeserializer(UserConfigurationData.class, new UserConfigurationDataDeserializer());
+
+        module.addSerializer(ValidationResults.class, new ValidationResultsSerializer());
+        module.addDeserializer(ValidationResults.class, new ValidationResultsDeserializer());
+
+        module.addSerializer(WorkflowNodeDetails.class, new WorkflowNodeDetailsSerializer());
+        module.addDeserializer(WorkflowNodeDetails.class, new WorkflowNodeDetailsDeserializer());
+
+        module.addSerializer(WorkflowNodeStatus.class, new WorkflowNodeStatusSerializer());
+        module.addDeserializer(WorkflowNodeStatus.class, new WorkflowNodeStatusDeserializer());
+
+        module.addSerializer(InputDataObjectType.class, new InputDataObjectTypeSerializer());
+        module.addDeserializer(InputDataObjectType.class, new InputDataObjectTypeDeserializer());
+
+        module.addSerializer(OutputDataObjectType.class, new OutputDataObjectTypeSerializer());
+        module.addDeserializer(OutputDataObjectType.class, new OutputDataObjectTypeDeserializer());
+
+        objectMapper.registerModule(module);
+    }
+
+    /**
+     * Method to serialize a thrift object to json
+     * @param object
+     * @return
+     * @throws JsonProcessingException
+     */
+    public String serializeObject(TBase object) throws JsonProcessingException {
+        String json = this.objectMapper.writeValueAsString(object);
+        return json;
+    }
+
+    /**
+     * Method to deserialize a json to the thrift object
+     * @param clz
+     * @param json
+     * @return
+     * @throws IOException
+     */
+    public TBase deserializeObject(Class<?> clz, String json) throws IOException {
+        return (TBase)this.objectMapper.readValue(json, clz);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/idot/InputDataObjectTypeDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/idot/InputDataObjectTypeDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/idot/InputDataObjectTypeDeserializer.java
new file mode 100644
index 0000000..983b388
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/idot/InputDataObjectTypeDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.appcatalog.idot;
+
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class InputDataObjectTypeDeserializer extends
+        AbstractThriftDeserializer<InputDataObjectType._Fields, InputDataObjectType> {
+
+    @Override
+    protected InputDataObjectType._Fields getField(final String fieldName) {
+        return InputDataObjectType._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected InputDataObjectType newInstance() {
+        return new InputDataObjectType();
+    }
+
+    @Override
+    protected void validate(final InputDataObjectType instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/idot/InputDataObjectTypeSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/idot/InputDataObjectTypeSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/idot/InputDataObjectTypeSerializer.java
new file mode 100644
index 0000000..289516c
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/idot/InputDataObjectTypeSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.appcatalog.idot;
+
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class InputDataObjectTypeSerializer extends
+        AbstractThriftSerializer<InputDataObjectType._Fields, InputDataObjectType> {
+    private final static Logger logger = LoggerFactory.getLogger(InputDataObjectTypeSerializer.class);
+
+    @Override
+    protected InputDataObjectType._Fields[] getFieldValues() {
+        return InputDataObjectType._Fields.values();
+    }
+
+    @Override
+    protected Class<InputDataObjectType> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/odot/OutputDataObjectTypeDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/odot/OutputDataObjectTypeDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/odot/OutputDataObjectTypeDeserializer.java
new file mode 100644
index 0000000..c0666c2
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/odot/OutputDataObjectTypeDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.appcatalog.odot;
+
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class OutputDataObjectTypeDeserializer extends
+        AbstractThriftDeserializer<OutputDataObjectType._Fields, OutputDataObjectType> {
+
+    @Override
+    protected OutputDataObjectType._Fields getField(final String fieldName) {
+        return OutputDataObjectType._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected OutputDataObjectType newInstance() {
+        return new OutputDataObjectType();
+    }
+
+    @Override
+    protected void validate(final OutputDataObjectType instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/odot/OutputDataObjectTypeSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/odot/OutputDataObjectTypeSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/odot/OutputDataObjectTypeSerializer.java
new file mode 100644
index 0000000..d943560
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/appcatalog/odot/OutputDataObjectTypeSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.appcatalog.odot;
+
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class OutputDataObjectTypeSerializer extends
+        AbstractThriftSerializer<OutputDataObjectType._Fields, OutputDataObjectType> {
+    private final static Logger logger = LoggerFactory.getLogger(OutputDataObjectTypeSerializer.class);
+
+    @Override
+    protected OutputDataObjectType._Fields[] getFieldValues() {
+        return OutputDataObjectType._Fields.values();
+    }
+
+    @Override
+    protected Class<OutputDataObjectType> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ExperimentDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ExperimentDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ExperimentDeserializer.java
new file mode 100644
index 0000000..9cbd65d
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ExperimentDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment;
+
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ExperimentDeserializer extends
+        AbstractThriftDeserializer<Experiment._Fields, Experiment> {
+
+    @Override
+    protected Experiment._Fields getField(final String fieldName) {
+        return Experiment._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected Experiment newInstance() {
+        return new Experiment();
+    }
+
+    @Override
+    protected void validate(final Experiment instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ExperimentSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ExperimentSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ExperimentSerializer.java
new file mode 100644
index 0000000..5cf1eb2
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/ExperimentSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment;
+
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ExperimentSerializer extends
+        AbstractThriftSerializer<Experiment._Fields, Experiment> {
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentSerializer.class);
+
+    @Override
+    protected Experiment._Fields[] getFieldValues() {
+        return Experiment._Fields.values();
+    }
+
+    @Override
+    protected Class<Experiment> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingDeserializer.java
new file mode 100644
index 0000000..0190c60
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.aidh;
+
+import org.apache.airavata.model.workspace.experiment.AdvancedInputDataHandling;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class AdvancedInputDataHandlingDeserializer extends
+        AbstractThriftDeserializer<AdvancedInputDataHandling._Fields, AdvancedInputDataHandling> {
+
+    @Override
+    protected AdvancedInputDataHandling._Fields getField(final String fieldName) {
+        return AdvancedInputDataHandling._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected AdvancedInputDataHandling newInstance() {
+        return new AdvancedInputDataHandling();
+    }
+
+    @Override
+    protected void validate(final AdvancedInputDataHandling instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingSerializer.java
new file mode 100644
index 0000000..a2f9b21
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.aidh;
+
+import org.apache.airavata.model.workspace.experiment.AdvancedInputDataHandling;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AdvancedInputDataHandlingSerializer extends
+        AbstractThriftSerializer<AdvancedInputDataHandling._Fields, AdvancedInputDataHandling> {
+    private final static Logger logger = LoggerFactory.getLogger(AdvancedInputDataHandlingSerializer.class);
+
+    @Override
+    protected AdvancedInputDataHandling._Fields[] getFieldValues() {
+        return AdvancedInputDataHandling._Fields.values();
+    }
+
+    @Override
+    protected Class<AdvancedInputDataHandling> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingDeserializer.java
new file mode 100644
index 0000000..08d8419
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.aodh;
+
+import org.apache.airavata.model.workspace.experiment.AdvancedOutputDataHandling;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class AdvancedOutputDataHandlingDeserializer extends
+        AbstractThriftDeserializer<AdvancedOutputDataHandling._Fields, AdvancedOutputDataHandling> {
+
+    @Override
+    protected AdvancedOutputDataHandling._Fields getField(final String fieldName) {
+        return AdvancedOutputDataHandling._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected AdvancedOutputDataHandling newInstance() {
+        return new AdvancedOutputDataHandling();
+    }
+
+    @Override
+    protected void validate(final AdvancedOutputDataHandling instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingSerializer.java
new file mode 100644
index 0000000..76a09d4
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.aodh;
+
+import org.apache.airavata.model.workspace.experiment.AdvancedOutputDataHandling;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AdvancedOutputDataHandlingSerializer extends
+        AbstractThriftSerializer<AdvancedOutputDataHandling._Fields, AdvancedOutputDataHandling> {
+    private final static Logger logger = LoggerFactory.getLogger(AdvancedOutputDataHandlingSerializer.class);
+
+    @Override
+    protected AdvancedOutputDataHandling._Fields[] getFieldValues() {
+        return AdvancedOutputDataHandling._Fields.values();
+    }
+
+    @Override
+    protected Class<AdvancedOutputDataHandling> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/appstatus/ApplicationStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/appstatus/ApplicationStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/appstatus/ApplicationStatusDeserializer.java
new file mode 100644
index 0000000..877cc02
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/appstatus/ApplicationStatusDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.appstatus;
+
+import org.apache.airavata.model.workspace.experiment.ApplicationStatus;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ApplicationStatusDeserializer extends
+        AbstractThriftDeserializer<ApplicationStatus._Fields, ApplicationStatus> {
+
+    @Override
+    protected ApplicationStatus._Fields getField(final String fieldName) {
+        return ApplicationStatus._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected ApplicationStatus newInstance() {
+        return new ApplicationStatus();
+    }
+
+    @Override
+    protected void validate(final ApplicationStatus instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/appstatus/ApplicationStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/appstatus/ApplicationStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/appstatus/ApplicationStatusSerializer.java
new file mode 100644
index 0000000..564ef9c
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/appstatus/ApplicationStatusSerializer.java
@@ -0,0 +1,42 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.appstatus;
+
+import org.apache.airavata.model.workspace.experiment.ApplicationStatus;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ApplicationStatusSerializer extends
+        AbstractThriftSerializer<ApplicationStatus._Fields, ApplicationStatus> {
+    private final static Logger logger = LoggerFactory.getLogger(
+            ApplicationStatusSerializer.class);
+
+    @Override
+    protected ApplicationStatus._Fields[] getFieldValues() {
+        return ApplicationStatus._Fields.values();
+    }
+
+    @Override
+    protected Class<ApplicationStatus> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingDeserializer.java
new file mode 100644
index 0000000..bfdee3a
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.crsh;
+
+import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ComputationalResourceSchedulingDeserializer extends
+        AbstractThriftDeserializer<ComputationalResourceScheduling._Fields, ComputationalResourceScheduling> {
+
+    @Override
+    protected ComputationalResourceScheduling._Fields getField(final String fieldName) {
+        return ComputationalResourceScheduling._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected ComputationalResourceScheduling newInstance() {
+        return new ComputationalResourceScheduling();
+    }
+
+    @Override
+    protected void validate(final ComputationalResourceScheduling instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingSerializer.java
new file mode 100644
index 0000000..5841602
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.crsh;
+
+import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ComputationalResourceSchedulingSerializer extends
+        AbstractThriftSerializer<ComputationalResourceScheduling._Fields, ComputationalResourceScheduling> {
+    private final static Logger logger = LoggerFactory.getLogger(ComputationalResourceSchedulingSerializer.class);
+
+    @Override
+    protected ComputationalResourceScheduling._Fields[] getFieldValues() {
+        return ComputationalResourceScheduling._Fields.values();
+    }
+
+    @Override
+    protected Class<ComputationalResourceScheduling> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/datatrdetails/DataTransferDetailsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/datatrdetails/DataTransferDetailsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/datatrdetails/DataTransferDetailsDeserializer.java
new file mode 100644
index 0000000..66c8031
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/datatrdetails/DataTransferDetailsDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.datatrdetails;
+
+import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class DataTransferDetailsDeserializer extends
+        AbstractThriftDeserializer<DataTransferDetails._Fields, DataTransferDetails> {
+
+    @Override
+    protected DataTransferDetails._Fields getField(final String fieldName) {
+        return DataTransferDetails._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected DataTransferDetails newInstance() {
+        return new DataTransferDetails();
+    }
+
+    @Override
+    protected void validate(final DataTransferDetails instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/datatrdetails/DataTransferDetailsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/datatrdetails/DataTransferDetailsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/datatrdetails/DataTransferDetailsSerializer.java
new file mode 100644
index 0000000..623901a
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/datatrdetails/DataTransferDetailsSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.datatrdetails;
+
+import org.apache.airavata.model.workspace.experiment.DataTransferDetails;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DataTransferDetailsSerializer extends
+        AbstractThriftSerializer<DataTransferDetails._Fields, DataTransferDetails> {
+    private final static Logger logger = LoggerFactory.getLogger(DataTransferDetailsSerializer.class);
+
+    @Override
+    protected DataTransferDetails._Fields[] getFieldValues() {
+        return DataTransferDetails._Fields.values();
+    }
+
+    @Override
+    protected Class<DataTransferDetails> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/errdetails/ErrorDetailsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/errdetails/ErrorDetailsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/errdetails/ErrorDetailsDeserializer.java
new file mode 100644
index 0000000..a93fc89
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/errdetails/ErrorDetailsDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.errdetails;
+
+import org.apache.airavata.model.workspace.experiment.ErrorDetails;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ErrorDetailsDeserializer extends
+        AbstractThriftDeserializer<ErrorDetails._Fields, ErrorDetails> {
+
+    @Override
+    protected ErrorDetails._Fields getField(final String fieldName) {
+        return ErrorDetails._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected ErrorDetails newInstance() {
+        return new ErrorDetails();
+    }
+
+    @Override
+    protected void validate(final ErrorDetails instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/errdetails/ErrorDetailsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/errdetails/ErrorDetailsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/errdetails/ErrorDetailsSerializer.java
new file mode 100644
index 0000000..0428c35
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/errdetails/ErrorDetailsSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.errdetails;
+
+import org.apache.airavata.model.workspace.experiment.ErrorDetails;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ErrorDetailsSerializer extends
+        AbstractThriftSerializer<ErrorDetails._Fields, ErrorDetails> {
+    private final static Logger logger = LoggerFactory.getLogger(ErrorDetailsSerializer.class);
+
+    @Override
+    protected ErrorDetails._Fields[] getFieldValues() {
+        return ErrorDetails._Fields.values();
+    }
+
+    @Override
+    protected Class<ErrorDetails> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expstatus/ExperimentStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expstatus/ExperimentStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expstatus/ExperimentStatusDeserializer.java
new file mode 100644
index 0000000..e844d7d
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expstatus/ExperimentStatusDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.expstatus;
+
+import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ExperimentStatusDeserializer extends
+        AbstractThriftDeserializer<ExperimentStatus._Fields, ExperimentStatus> {
+
+    @Override
+    protected ExperimentStatus._Fields getField(final String fieldName) {
+        return ExperimentStatus._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected ExperimentStatus newInstance() {
+        return new ExperimentStatus();
+    }
+
+    @Override
+    protected void validate(final ExperimentStatus instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expstatus/ExperimentStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expstatus/ExperimentStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expstatus/ExperimentStatusSerializer.java
new file mode 100644
index 0000000..21f848f
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expstatus/ExperimentStatusSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.expstatus;
+
+import org.apache.airavata.model.workspace.experiment.ExperimentStatus;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ExperimentStatusSerializer extends
+        AbstractThriftSerializer<ExperimentStatus._Fields, ExperimentStatus> {
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentStatusSerializer.class);
+
+    @Override
+    protected ExperimentStatus._Fields[] getFieldValues() {
+        return ExperimentStatus._Fields.values();
+    }
+
+    @Override
+    protected Class<ExperimentStatus> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expsummary/ExperimentSummaryDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expsummary/ExperimentSummaryDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expsummary/ExperimentSummaryDeserializer.java
new file mode 100644
index 0000000..3278e00
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expsummary/ExperimentSummaryDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.expsummary;
+
+import org.apache.airavata.model.workspace.experiment.ExperimentSummary;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class ExperimentSummaryDeserializer extends
+        AbstractThriftDeserializer<ExperimentSummary._Fields, ExperimentSummary> {
+
+    @Override
+    protected ExperimentSummary._Fields getField(final String fieldName) {
+        return ExperimentSummary._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected ExperimentSummary newInstance() {
+        return new ExperimentSummary();
+    }
+
+    @Override
+    protected void validate(final ExperimentSummary instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expsummary/ExperimentSummarySerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expsummary/ExperimentSummarySerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expsummary/ExperimentSummarySerializer.java
new file mode 100644
index 0000000..4b4edef
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/expsummary/ExperimentSummarySerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.expsummary;
+
+import org.apache.airavata.model.workspace.experiment.ExperimentSummary;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ExperimentSummarySerializer extends
+        AbstractThriftSerializer<ExperimentSummary._Fields, ExperimentSummary> {
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentSummarySerializer.class);
+
+    @Override
+    protected ExperimentSummary._Fields[] getFieldValues() {
+        return ExperimentSummary._Fields.values();
+    }
+
+    @Override
+    protected Class<ExperimentSummary> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobdetails/JobDetailsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobdetails/JobDetailsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobdetails/JobDetailsDeserializer.java
new file mode 100644
index 0000000..60b2ef7
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobdetails/JobDetailsDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.jobdetails;
+
+import org.apache.airavata.model.workspace.experiment.JobDetails;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class JobDetailsDeserializer extends
+        AbstractThriftDeserializer<JobDetails._Fields, JobDetails> {
+
+    @Override
+    protected JobDetails._Fields getField(final String fieldName) {
+        return JobDetails._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected JobDetails newInstance() {
+        return new JobDetails();
+    }
+
+    @Override
+    protected void validate(final JobDetails instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobdetails/JobDetailsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobdetails/JobDetailsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobdetails/JobDetailsSerializer.java
new file mode 100644
index 0000000..824fd84
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobdetails/JobDetailsSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.jobdetails;
+
+import org.apache.airavata.model.workspace.experiment.JobDetails;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class JobDetailsSerializer extends
+        AbstractThriftSerializer<JobDetails._Fields, JobDetails> {
+    private final static Logger logger = LoggerFactory.getLogger(JobDetailsSerializer.class);
+
+    @Override
+    protected JobDetails._Fields[] getFieldValues() {
+        return JobDetails._Fields.values();
+    }
+
+    @Override
+    protected Class<JobDetails> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobstatus/JobStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobstatus/JobStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobstatus/JobStatusDeserializer.java
new file mode 100644
index 0000000..25d3ff9
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobstatus/JobStatusDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.jobstatus;
+
+import org.apache.airavata.model.workspace.experiment.JobStatus;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class JobStatusDeserializer extends
+        AbstractThriftDeserializer<JobStatus._Fields, JobStatus> {
+
+    @Override
+    protected JobStatus._Fields getField(final String fieldName) {
+        return JobStatus._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected JobStatus newInstance() {
+        return new JobStatus();
+    }
+
+    @Override
+    protected void validate(final JobStatus instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobstatus/JobStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobstatus/JobStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobstatus/JobStatusSerializer.java
new file mode 100644
index 0000000..5ddb417
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/jobstatus/JobStatusSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.jobstatus;
+
+import org.apache.airavata.model.workspace.experiment.JobStatus;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class JobStatusSerializer extends
+        AbstractThriftSerializer<JobStatus._Fields, JobStatus> {
+    private final static Logger logger = LoggerFactory.getLogger(JobStatusSerializer.class);
+
+    @Override
+    protected JobStatus._Fields[] getFieldValues() {
+        return JobStatus._Fields.values();
+    }
+
+    @Override
+    protected Class<JobStatus> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/qosp/QualityOfServiceParamsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/qosp/QualityOfServiceParamsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/qosp/QualityOfServiceParamsDeserializer.java
new file mode 100644
index 0000000..1beccde
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/qosp/QualityOfServiceParamsDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.qosp;
+
+import org.apache.airavata.model.workspace.experiment.QualityOfServiceParams;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class QualityOfServiceParamsDeserializer extends
+        AbstractThriftDeserializer<QualityOfServiceParams._Fields, QualityOfServiceParams> {
+
+    @Override
+    protected QualityOfServiceParams._Fields getField(final String fieldName) {
+        return QualityOfServiceParams._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected QualityOfServiceParams newInstance() {
+        return new QualityOfServiceParams();
+    }
+
+    @Override
+    protected void validate(final QualityOfServiceParams instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/qosp/QualityOfServiceParamsSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/qosp/QualityOfServiceParamsSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/qosp/QualityOfServiceParamsSerializer.java
new file mode 100644
index 0000000..33f15fb
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/qosp/QualityOfServiceParamsSerializer.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.qosp;
+
+import org.apache.airavata.model.workspace.experiment.QualityOfServiceParams;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class QualityOfServiceParamsSerializer extends
+        AbstractThriftSerializer<QualityOfServiceParams._Fields, QualityOfServiceParams> {
+    private final static Logger logger = LoggerFactory.getLogger(QualityOfServiceParamsSerializer.class);
+
+    @Override
+    protected QualityOfServiceParams._Fields[] getFieldValues() {
+        return QualityOfServiceParams._Fields.values();
+    }
+
+    @Override
+    protected Class<QualityOfServiceParams> getThriftClass() {
+        return null;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskdetails/TaskDetailsDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskdetails/TaskDetailsDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskdetails/TaskDetailsDeserializer.java
new file mode 100644
index 0000000..54e672c
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/mongo/conversion/experiment/taskdetails/TaskDetailsDeserializer.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.persistance.registry.mongo.conversion.experiment.taskdetails;
+
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.persistance.registry.mongo.conversion.AbstractThriftDeserializer;
+import org.apache.thrift.TException;
+
+public class TaskDetailsDeserializer extends
+        AbstractThriftDeserializer<TaskDetails._Fields, TaskDetails> {
+
+    @Override
+    protected TaskDetails._Fields getField(final String fieldName) {
+        return TaskDetails._Fields.valueOf(fieldName);
+    }
+
+    @Override
+    protected TaskDetails newInstance() {
+        return new TaskDetails();
+    }
+
+    @Override
+    protected void validate(final TaskDetails instance) throws TException {
+        instance.validate();
+    }
+}
\ No newline at end of file


[32/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
deleted file mode 100644
index 69ada6d..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
+++ /dev/null
@@ -1,824 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.persistance.registry.jpa.JPAConstants;
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.model.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.net.URI;
-
-
-public class Utils {
-    private final static Logger logger = LoggerFactory.getLogger(Utils.class);
-
-    public static String getJDBCFullURL(){
-		String jdbcUrl = getJDBCURL();
-		String jdbcUser = getJDBCUser();
-		String jdbcPassword = getJDBCPassword();
-        jdbcUrl = jdbcUrl + "?"  + "user=" + jdbcUser + "&" + "password=" + jdbcPassword;
-        return jdbcUrl;
-    }
-
-    public static String getJDBCURL(){
-    	try {
-            return ServerSettings.getSetting(JPAConstants.KEY_JDBC_URL);
-		} catch (ApplicationSettingsException e) {
-            logger.error(e.getMessage(), e);
-            return null;
-        }
-    }
-
-    public static String getHost(){
-        try{
-            String jdbcURL = getJDBCURL();
-            String cleanURI = jdbcURL.substring(5);
-            URI uri = URI.create(cleanURI);
-            return uri.getHost();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            return null;
-        }
-    }
-
-    public static int getPort(){
-        try{
-            String jdbcURL = getJDBCURL();
-            String cleanURI = jdbcURL.substring(5);
-            URI uri = URI.create(cleanURI);
-            return uri.getPort();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            return -1;
-        }
-    }
-
-    public static int getJPACacheSize (){
-        try {
-            String cache = ServerSettings.getSetting(JPAConstants.JPA_CACHE_SIZE, "5000");
-            return Integer.parseInt(cache);
-        }catch (Exception e){
-            logger.error(e.getMessage(), e);
-            return -1;
-        }
-    }
-
-    public static String isCachingEnabled (){
-        try {
-            return ServerSettings.getSetting(JPAConstants.ENABLE_CACHING, "true");
-        }catch (Exception e){
-            logger.error(e.getMessage(), e);
-            return "true";
-        }
-    }
-
-    public static String getDBType(){
-        try{
-            String jdbcURL = getJDBCURL();
-            String cleanURI = jdbcURL.substring(5);
-            URI uri = URI.create(cleanURI);
-            return uri.getScheme();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            return null;
-        }
-    }
-
-    public static boolean isDerbyStartEnabled(){
-        try {
-            String s = ServerSettings.getSetting(JPAConstants.KEY_DERBY_START_ENABLE);
-            if("true".equals(s)){
-                return true;
-            }
-        } catch (ApplicationSettingsException e) {
-            logger.error(e.getMessage(), e);
-            return false;
-        }
-        return false;
-    }
-
-    public static String getJDBCUser(){
-    	try {
-		    return ServerSettings.getSetting(JPAConstants.KEY_JDBC_USER);
-		} catch (ApplicationSettingsException e) {
-            logger.error(e.getMessage(), e);
-            return null;
-		}
-    }
-
-    public static String getValidationQuery(){
-    	try {
-            return ServerSettings.getSetting(JPAConstants.VALIDATION_QUERY);
-		} catch (ApplicationSettingsException e) {
-            logger.error(e.getMessage(), e);
-            return null;
-		}
-    }
-
-    public static String getJDBCPassword(){
-    	try {
-            return ServerSettings.getSetting(JPAConstants.KEY_JDBC_PASSWORD);
-		} catch (ApplicationSettingsException e) {
-            logger.error(e.getMessage(), e);
-            return null;
-		}
-
-    }
-
-    public static String getJDBCDriver(){
-    	try {
-            return ServerSettings.getSetting(JPAConstants.KEY_JDBC_DRIVER);
-		} catch (ApplicationSettingsException e) {
-            logger.error(e.getMessage(), e);
-            return null;
-		}
-    }
-
-    /**
-     *
-     * @param type model type
-     * @param o model type instance
-     * @return corresponding resource object
-     */
-    public static Resource getResource(ResourceType type, Object o) {
-        switch (type){
-            case GATEWAY:
-                if (o instanceof Gateway) {
-                    return createGateway((Gateway) o);
-                } else {
-                    logger.error("Object should be a Gateway.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Gateway.");
-                }
-            case PROJECT:
-                if (o instanceof Project){
-                    return createProject((Project) o);
-                } else {
-                    logger.error("Object should be a Project.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Project.");
-                }
-            case PROJECT_USER:
-                if (o instanceof  ProjectUser){
-                    return createProjectUser((ProjectUser)o);
-                }else {
-                    logger.error("Object should be a ProjectUser.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a ProjectUser.");
-                }
-            case CONFIGURATION:
-                if(o instanceof Configuration){
-                    return createConfiguration((Configuration) o);
-                }else {
-                    logger.error("Object should be a Configuration.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Configuration.");
-                }
-            case USER:
-                if(o instanceof Users) {
-                    return createUser((Users) o);
-                }else {
-                    logger.error("Object should be a User.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a User.");
-                }
-            case GATEWAY_WORKER:
-                if (o instanceof Gateway_Worker){
-                    return createGatewayWorker((Gateway_Worker)o);
-                } else {
-                    logger.error("Object should be a Gateway Worker.", new IllegalArgumentException());
-                    throw  new IllegalArgumentException("Object should be a Gateway Worker.");
-                }
-            case EXPERIMENT:
-                if (o instanceof  Experiment){
-                    return createExperiment((Experiment)o);
-                }else {
-                    logger.error("Object should be a Experiment.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Experiment.");
-                }
-            case NOTIFICATION_EMAIL:
-                if (o instanceof  Notification_Email){
-                    return createNotificationEmail((Notification_Email)o);
-                }else {
-                    logger.error("Object should be a Experiment.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Experiment.");
-                }
-            case EXPERIMENT_INPUT:
-                if (o instanceof  Experiment_Input){
-                    return createExperimentInput((Experiment_Input)o);
-                }else {
-                    logger.error("Object should be a Experiment input data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Experiment input data.");
-                }
-            case EXPERIMENT_OUTPUT:
-                if (o instanceof  Experiment_Output){
-                    return createExperimentOutput((Experiment_Output)o);
-                }else {
-                    logger.error("Object should be a Experiment output data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a Experiment output data.");
-                }
-            case WORKFLOW_NODE_DETAIL:
-                 if (o instanceof  WorkflowNodeDetail){
-                     return createWorkflowNodeDetail((WorkflowNodeDetail)o);
-                 }else {
-                     logger.error("Object should be a Workflow node data.", new IllegalArgumentException());
-                     throw new IllegalArgumentException("Object should be a Workflow node data.");
-                 }
-            case TASK_DETAIL:
-                if (o instanceof  TaskDetail){
-                    return createTaskDetail((TaskDetail)o);
-                }else {
-                    logger.error("Object should be a task detail data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a task detail data.");
-                }
-            case ERROR_DETAIL:
-                if (o instanceof  ErrorDetail){
-                    return createErrorDetail((ErrorDetail)o);
-                }else {
-                    logger.error("Object should be a error detail data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a error detail data.");
-                }
-            case APPLICATION_INPUT:
-                if (o instanceof  ApplicationInput){
-                    return createApplicationInput((ApplicationInput)o);
-                }else {
-                    logger.error("Object should be a application input data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a application input data.");
-                }
-            case APPLICATION_OUTPUT:
-                if (o instanceof  ApplicationOutput){
-                    return createApplicationOutput((ApplicationOutput)o);
-                }else {
-                    logger.error("Object should be a application output data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a application output data.");
-                }
-            case NODE_INPUT:
-                if (o instanceof  NodeInput){
-                    return createNodeInput((NodeInput)o);
-                }else {
-                    logger.error("Object should be a node input data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a node input data.");
-                }
-            case NODE_OUTPUT:
-                if (o instanceof  NodeOutput){
-                    return createNodeOutput((NodeOutput)o);
-                }else {
-                    logger.error("Object should be a node output data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a node output data.");
-                }
-            case JOB_DETAIL:
-                if (o instanceof  JobDetail){
-                    return createJobDetail((JobDetail)o);
-                }else {
-                    logger.error("Object should be a job detail data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a job detail data.");
-                }
-            case DATA_TRANSFER_DETAIL:
-                if (o instanceof  DataTransferDetail){
-                    return createDataTransferResource((DataTransferDetail)o);
-                }else {
-                    logger.error("Object should be a data transfer detail data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a data transfer detail data.");
-                }
-            case STATUS:
-                if (o instanceof  Status){
-                    return createStatusResource((Status)o);
-                }else {
-                    logger.error("Object should be a status data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a status data.");
-                }
-            case CONFIG_DATA:
-                if (o instanceof  ExperimentConfigData){
-                    return createExConfigDataResource((ExperimentConfigData)o);
-                }else {
-                    logger.error("Object should be a experiment config data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be experiment config data.");
-                }
-            case COMPUTATIONAL_RESOURCE_SCHEDULING:
-                if (o instanceof  Computational_Resource_Scheduling){
-                    return createComputationalScheduling((Computational_Resource_Scheduling)o);
-                }else {
-                    logger.error("Object should be a scheduling resource data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be scheduling resource data.");
-                }
-            case ADVANCE_INPUT_DATA_HANDLING:
-                if (o instanceof  AdvancedInputDataHandling){
-                    return createAdvancedInputDataResource((AdvancedInputDataHandling)o);
-                }else {
-                    logger.error("Object should be a advanced input data handling data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be advanced input data handling data.");
-                }
-            case ADVANCE_OUTPUT_DATA_HANDLING:
-                if (o instanceof  AdvancedOutputDataHandling){
-                    return createAdvancedOutputDataResource((AdvancedOutputDataHandling)o);
-                }else {
-                    logger.error("Object should be a advanced output data handling data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be advanced output data handling data.");
-                }
-            case QOS_PARAM:
-                if (o instanceof  QosParam){
-                    return createQosParamResource((QosParam)o);
-                }else {
-                    logger.error("Object should be a QOSparam data.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be QOSparam data.");
-                }
-            default:
-                logger.error("Illegal data type..", new IllegalArgumentException());
-                throw new IllegalArgumentException("Illegal data type..");
-        }
-    }
-
-    /**
-     *
-     * @param o  Gateway model object
-     * @return  GatewayResource object
-     */
-    private static Resource createGateway(Gateway o) {
-        GatewayResource gatewayResource = new GatewayResource();
-        gatewayResource.setGatewayName(o.getGateway_name());
-        gatewayResource.setGatewayId(o.getGateway_id());
-        gatewayResource.setDomain(o.getDomain());
-        gatewayResource.setEmailAddress(o.getEmailAddress());
-        return gatewayResource;
-    }
-
-    /**
-     *
-     * @param o Project model object
-     * @return ProjectResource object
-     */
-    private static Resource createProject(Project o) {
-        ProjectResource projectResource = new ProjectResource();
-        if (o != null){
-            projectResource.setId(o.getProject_id());
-            projectResource.setName(o.getProject_name());
-            GatewayResource gatewayResource = (GatewayResource)createGateway(o.getGateway());
-            projectResource.setGateway(gatewayResource);
-            Gateway_Worker gateway_worker = new Gateway_Worker();
-            gateway_worker.setGateway(o.getGateway());
-            gateway_worker.setUser(o.getUsers());
-            gateway_worker.setUser_name(o.getUsers().getUser_name());
-            WorkerResource workerResource = (WorkerResource) createGatewayWorker(gateway_worker);
-            projectResource.setWorker(workerResource);
-            projectResource.setDescription(o.getDescription());
-            projectResource.setCreationTime(o.getCreationTime());
-        }
-
-        return projectResource;
-    }
-
-    private static Resource createProjectUser(ProjectUser o) {
-        ProjectUserResource projectUserResource = new ProjectUserResource();
-        if (o != null){
-            projectUserResource.setUserName(o.getUser().getUser_name());
-            projectUserResource.setProjectId(o.getProjectId());
-        }
-        return projectUserResource;
-    }
-
-    /**
-     *
-     * @param o configuration model object
-     * @return configuration resource object
-     */
-    private static Resource createConfiguration (Configuration o){
-        ConfigurationResource configurationResource = new ConfigurationResource();
-        if (o != null){
-            configurationResource.setConfigKey(o.getConfig_key());
-            configurationResource.setConfigVal(o.getConfig_val());
-            configurationResource.setExpireDate(o.getExpire_date());
-            configurationResource.setCategoryID(o.getCategory_id());
-        }
-
-        return configurationResource;
-    }
-
-    /**
-     *
-     * @param o Gateway_Worker model object
-     * @return  Gateway_Worker resource object
-     */
-    private static Resource createGatewayWorker(Gateway_Worker o) {
-        if (o != null){
-            GatewayResource gatewayResource = new GatewayResource(o.getGateway().getGateway_id());
-            gatewayResource.setDomain(o.getGateway().getGateway_name());
-            gatewayResource.setDomain(o.getGateway().getDomain());
-            gatewayResource.setEmailAddress(o.getGateway().getEmailAddress());
-            return new WorkerResource(o.getUser_name(), gatewayResource);
-        }
-        return null;
-    }
-
-    /**
-     *
-     * @param o  Users model object
-     * @return  UserResource object
-     */
-    private static Resource createUser(Users o) {
-        UserResource userResource = new UserResource();
-        if (o != null){
-            userResource.setUserName(o.getUser_name());
-            userResource.setPassword(o.getPassword());
-        }
-
-        return userResource;
-    }
-
-    /**
-     * @param o Experiment model object
-     * @return  Experiment resource object
-     */
-    private static Resource createExperiment(Experiment o) {
-        ExperimentResource experimentResource = new ExperimentResource();
-        if (o != null){
-            GatewayResource gatewayResource = (GatewayResource)createGateway(o.getGateway());
-            experimentResource.setGateway(gatewayResource);
-            experimentResource.setExecutionUser(o.getExecutionUser());
-            if (o.getProject() != null){
-                ProjectResource projectResource = (ProjectResource)createProject(o.getProject());
-                experimentResource.setProject(projectResource);
-            }
-            experimentResource.setExpID(o.getExpId());
-            experimentResource.setExpName(o.getExpName());
-            experimentResource.setCreationTime(o.getCreationTime());
-            experimentResource.setDescription(o.getExpDesc());
-            experimentResource.setApplicationId(o.getApplicationId());
-            experimentResource.setApplicationVersion(o.getAppVersion());
-            experimentResource.setWorkflowTemplateId(o.getWorkflowTemplateId());
-            experimentResource.setWorkflowTemplateVersion(o.getWorkflowTemplateVersion());
-            experimentResource.setWorkflowExecutionId(o.getWorkflowExecutionId());
-            experimentResource.setEnableEmailNotifications(o.isAllowNotification());
-            experimentResource.setGatewayExecutionId(o.getGatewayExecutionId());
-        }
-
-        return experimentResource;
-    }
-
-    private static Resource createNotificationEmail (Notification_Email o){
-        NotificationEmailResource emailResource = new NotificationEmailResource();
-        if (o != null){
-            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
-            emailResource.setExperimentResource(experimentResource);
-            TaskDetailResource taskDetailResource =  (TaskDetailResource)createTaskDetail(o.getTaskDetail());
-            emailResource.setTaskDetailResource(taskDetailResource);
-            emailResource.setEmailAddress(o.getEmailAddress());
-        }
-        return emailResource;
-    }
-
-    private static Resource createExperimentInput (Experiment_Input o){
-        ExperimentInputResource eInputResource = new ExperimentInputResource();
-        if (o != null){
-            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
-            eInputResource.setExperimentResource(experimentResource);
-            eInputResource.setDataType(o.getDataType());
-            eInputResource.setMetadata(o.getMetadata());
-            eInputResource.setExperimentKey(o.getEx_key());
-            eInputResource.setAppArgument(o.getAppArgument());
-            eInputResource.setInputOrder(o.getInputOrder());
-            eInputResource.setStandardInput(o.isStandardInput());
-            eInputResource.setUserFriendlyDesc(o.getUserFriendlyDesc());
-            eInputResource.setRequired(o.isRequired());
-            eInputResource.setRequiredToCMD(o.isRequiredToCMD());
-            eInputResource.setDataStaged(o.isDataStaged());
-
-            if (o.getValue() != null){
-                eInputResource.setValue(new String(o.getValue()));
-            }
-
-        }
-        return eInputResource;
-    }
-
-    private static Resource createExperimentOutput (Experiment_Output o){
-        ExperimentOutputResource eOutputResource = new ExperimentOutputResource();
-        if (o != null){
-            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
-            eOutputResource.setExperimentResource(experimentResource);
-            eOutputResource.setExperimentKey(o.getEx_key());
-            if (o.getValue() != null){
-                eOutputResource.setValue(new String(o.getValue()));
-            }
-            eOutputResource.setDataType(o.getDataType());
-            eOutputResource.setRequired(o.isRequired());
-            eOutputResource.setRequiredToCMD(o.isRequiredToCMD());
-            eOutputResource.setDataMovement(o.isDataMovement());
-            eOutputResource.setDataNameLocation(o.getDataNameLocation());
-            eOutputResource.setSearchQuery(o.getSearchQuery());
-            eOutputResource.setAppArgument(o.getApplicationArgument());
-        }
-        return eOutputResource;
-    }
-
-    private static Resource createWorkflowNodeDetail (WorkflowNodeDetail o){
-        WorkflowNodeDetailResource nodeDetailResource = new WorkflowNodeDetailResource();
-        if (o != null){
-            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
-            nodeDetailResource.setExperimentResource(experimentResource);
-            nodeDetailResource.setCreationTime(o.getCreationTime());
-            nodeDetailResource.setNodeInstanceId(o.getNodeId());
-            nodeDetailResource.setNodeName(o.getNodeName());
-            nodeDetailResource.setExecutionUnit(o.getExecutionUnit());
-            nodeDetailResource.setExecutionUnitData(o.getExecutionUnitData());
-
-        }
-        return nodeDetailResource;
-    }
-
-    private static Resource createTaskDetail(TaskDetail o){
-        TaskDetailResource taskDetailResource = new TaskDetailResource();
-        if ( o != null){
-            WorkflowNodeDetailResource nodeDetailResource = (WorkflowNodeDetailResource)createWorkflowNodeDetail(o.getNodeDetail());
-            taskDetailResource.setWorkflowNodeDetailResource(nodeDetailResource);
-            taskDetailResource.setCreationTime(o.getCreationTime());
-            taskDetailResource.setTaskId(o.getTaskId());
-            taskDetailResource.setApplicationId(o.getAppId());
-            taskDetailResource.setApplicationVersion(o.getAppVersion());
-            taskDetailResource.setApplicationDeploymentId(o.getApplicationDeploymentId());
-            taskDetailResource.setEnableEmailNotifications(o.isAllowNotification());
-        }
-        return taskDetailResource;
-    }
-
-    private static Resource createErrorDetail (ErrorDetail o){
-        ErrorDetailResource errorDetailResource = new ErrorDetailResource();
-        if (o != null){
-            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
-            errorDetailResource.setExperimentResource(experimentResource);
-            if (o.getTask() != null){
-                TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
-                errorDetailResource.setTaskDetailResource(taskDetailResource);
-            }
-            if (o.getNodeDetails() != null){
-                WorkflowNodeDetailResource nodeDetailResource = (WorkflowNodeDetailResource)createWorkflowNodeDetail(o.getNodeDetails());
-                errorDetailResource.setNodeDetail(nodeDetailResource);
-            }
-            errorDetailResource.setErrorId(o.getErrorId());
-            errorDetailResource.setJobId(o.getJobId());
-            errorDetailResource.setCreationTime(o.getCreationTime());
-            if (o.getActualErrorMsg() != null){
-                errorDetailResource.setActualErrorMsg(new String(o.getActualErrorMsg()));
-            }
-            errorDetailResource.setUserFriendlyErrorMsg(o.getUserFriendlyErrorMsg());
-            errorDetailResource.setTransientPersistent(o.isTransientPersistent());
-            errorDetailResource.setErrorCategory(o.getErrorCategory());
-            errorDetailResource.setCorrectiveAction(o.getCorrectiveAction());
-            errorDetailResource.setActionableGroup(o.getActionableGroup());
-        }
-
-        return errorDetailResource;
-    }
-
-    private static Resource createApplicationInput (ApplicationInput o){
-        ApplicationInputResource inputResource = new ApplicationInputResource();
-        if (o != null){
-            TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
-            inputResource.setTaskDetailResource(taskDetailResource);
-            inputResource.setInputKey(o.getInputKey());
-            inputResource.setDataType(o.getDataType());
-            inputResource.setAppArgument(o.getAppArgument());
-            inputResource.setInputOrder(o.getInputOrder());
-            inputResource.setStandardInput(o.isStandardInput());
-            inputResource.setUserFriendlyDesc(o.getUserFriendlyDesc());
-            inputResource.setRequired(o.isRequired());
-            inputResource.setRequiredToCMD(o.isRequiredToCMD());
-            inputResource.setDataStaged(o.isDataStaged());
-            if (o.getValue() != null){
-                inputResource.setValue(new String(o.getValue()));
-            }
-            inputResource.setMetadata(o.getMetadata());
-        }
-        return inputResource;
-    }
-
-    private static Resource createApplicationOutput (ApplicationOutput o){
-        ApplicationOutputResource outputResource = new ApplicationOutputResource();
-        if (o != null){
-            TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
-            outputResource.setTaskDetailResource(taskDetailResource);
-            outputResource.setDataType(o.getDataType());
-            outputResource.setOutputKey(o.getOutputKey());
-            if (o.getValue() != null){
-                outputResource.setValue(new String(o.getValue()));
-            }
-            outputResource.setRequired(o.isRequired());
-            outputResource.setRequiredToCMD(o.isAddedToCmd());
-            outputResource.setDataMovement(o.isDataMovement());
-            outputResource.setDataNameLocation(o.getDataNameLocation());
-            outputResource.setSearchQuery(o.getSearchQuery());
-            outputResource.setAppArgument(o.getApplicationArgument());
-        }
-        return outputResource;
-    }
-
-    private static Resource createNodeInput (NodeInput o){
-        NodeInputResource inputResource = new NodeInputResource();
-        if (o != null){
-            WorkflowNodeDetailResource nodeDetailResource = (WorkflowNodeDetailResource)createWorkflowNodeDetail(o.getNodeDetails());
-            inputResource.setNodeDetailResource(nodeDetailResource);
-            inputResource.setInputKey(o.getInputKey());
-            inputResource.setDataType(o.getDataType());
-            inputResource.setValue(o.getValue());
-            inputResource.setMetadata(o.getMetadata());
-            inputResource.setAppArgument(o.getAppArgument());
-            inputResource.setInputOrder(o.getInputOrder());
-            inputResource.setStandardInput(o.isStandardInput());
-            inputResource.setUserFriendlyDesc(o.getUserFriendlyDesc());
-            inputResource.setRequired(o.getIsRequired());
-            inputResource.setRequiredToCMD(o.getRequiredToCMD());
-            inputResource.setDataStaged(o.isDataStaged());
-        }
-        return inputResource;
-    }
-
-    private static Resource createNodeOutput (NodeOutput o){
-        NodeOutputResource outputResource = new NodeOutputResource();
-        if (o != null){
-            WorkflowNodeDetailResource nodeDetailResource = (WorkflowNodeDetailResource)createWorkflowNodeDetail(o.getNode());
-            outputResource.setNodeDetailResource(nodeDetailResource);
-            outputResource.setDataType(o.getDataType());
-            outputResource.setOutputKey(o.getOutputKey());
-            outputResource.setValue(o.getValue());
-            outputResource.setRequired(o.isRequired());
-            outputResource.setRequiredToCMD(o.isRequiredToCMD());
-            outputResource.setDataMovement(o.isDataMovement());
-            outputResource.setDataNameLocation(o.getDataNameLocation());
-            outputResource.setSearchQuery(o.getSearchQuery());
-            outputResource.setAppArgument(o.getApplicationArgument());
-        }
-
-        return outputResource;
-    }
-
-    private static Resource createJobDetail (JobDetail o){
-        JobDetailResource jobDetailResource = new JobDetailResource();
-        if (o != null){
-            TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
-            jobDetailResource.setTaskDetailResource(taskDetailResource);
-            if (o.getJobDescription() != null){
-                jobDetailResource.setJobDescription(new String(o.getJobDescription()));
-            }
-            jobDetailResource.setJobId(o.getJobId());
-            jobDetailResource.setCreationTime(o.getCreationTime());
-            jobDetailResource.setComputeResourceConsumed(o.getComputeResourceConsumed());
-            jobDetailResource.setJobName(o.getJobName());
-            jobDetailResource.setWorkingDir(o.getWorkingDir());
-
-        }
-
-        return jobDetailResource;
-    }
-
-    private static Resource createDataTransferResource (DataTransferDetail o){
-        DataTransferDetailResource transferDetailResource = new DataTransferDetailResource();
-        if (o != null){
-            TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
-            transferDetailResource.setTaskDetailResource(taskDetailResource);
-            transferDetailResource.setTransferId(o.getTransferId());
-            transferDetailResource.setCreationTime(o.getCreationTime());
-            if (o.getTransferDesc() != null){
-                transferDetailResource.setTransferDescription(new String(o.getTransferDesc()));
-            }
-
-        }
-        return transferDetailResource;
-    }
-
-    private static Resource createStatusResource (Status o){
-        StatusResource statusResource = new StatusResource();
-        if (o != null){
-            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
-            statusResource.setExperimentResource(experimentResource);
-            if (o.getTask() != null){
-                TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
-                statusResource.setTaskDetailResource(taskDetailResource);
-            }
-            if (o.getNode() != null){
-                WorkflowNodeDetailResource nodeDetailResource = (WorkflowNodeDetailResource)createWorkflowNodeDetail(o.getNode());
-                statusResource.setWorkflowNodeDetail(nodeDetailResource);
-            }
-            if (o.getTransferDetail() != null){
-                DataTransferDetailResource transferDetailResource = (DataTransferDetailResource)createDataTransferResource(o.getTransferDetail());
-                statusResource.setDataTransferDetail(transferDetailResource);
-            }
-            statusResource.setStatusId(o.getStatusId());
-            statusResource.setJobId(o.getJobId());
-            statusResource.setState(o.getState());
-            statusResource.setStatusUpdateTime(o.getStatusUpdateTime());
-            statusResource.setStatusType(o.getStatusType());
-        }
-
-        return statusResource;
-    }
-
-    private static Resource createExConfigDataResource (ExperimentConfigData o){
-        ConfigDataResource configDataResource = new ConfigDataResource();
-        if (o != null){
-            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
-            configDataResource.setExperimentResource(experimentResource);
-            configDataResource.setAiravataAutoSchedule(o.isAiravataAutoSchedule());
-            configDataResource.setOverrideManualParams(o.isOverrideManualParams());
-            configDataResource.setShareExp(o.isShareExp());
-            configDataResource.setUserDn(o.getUserDn());
-            configDataResource.setGenerateCert(o.isGenerateCert());
-        }
-        return configDataResource;
-    }
-
-    private static Resource createComputationalScheduling (Computational_Resource_Scheduling o){
-        ComputationSchedulingResource schedulingResource = new ComputationSchedulingResource();
-        if (o != null){
-            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
-            schedulingResource.setExperimentResource(experimentResource);
-            if (o.getTask() != null){
-                TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
-                schedulingResource.setTaskDetailResource(taskDetailResource);
-            }
-            schedulingResource.setSchedulingId(o.getSchedulingId());
-            schedulingResource.setResourceHostId(o.getResourceHostId());
-            schedulingResource.setCpuCount(o.getCpuCount());
-            schedulingResource.setNodeCount(o.getNodeCount());
-            schedulingResource.setNumberOfThreads(o.getNumberOfThreads());
-            schedulingResource.setQueueName(o.getQueueName());
-            schedulingResource.setWalltimeLimit(o.getWallTimeLimit());
-            schedulingResource.setJobStartTime(o.getJobStartTime());
-            schedulingResource.setPhysicalMemory(o.getTotalPhysicalmemory());
-            schedulingResource.setProjectName(o.getProjectName());
-            schedulingResource.setChessisName(o.getChessisName());
-        }
-
-        return schedulingResource;
-    }
-
-    private static Resource createAdvancedInputDataResource (AdvancedInputDataHandling o){
-        AdvanceInputDataHandlingResource dataHandlingResource = new AdvanceInputDataHandlingResource();
-        if (o != null){
-            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
-            dataHandlingResource.setExperimentResource(experimentResource);
-            if (o.getTask() != null){
-                TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
-                dataHandlingResource.setTaskDetailResource(taskDetailResource);
-            }
-            dataHandlingResource.setDataHandlingId(o.getDataHandlingId());
-            dataHandlingResource.setWorkingDirParent(o.getParentWorkingDir());
-            dataHandlingResource.setWorkingDir(o.getWorkingDir());
-            dataHandlingResource.setStageInputFiles(o.isStageInputsToWorkingDir());
-            dataHandlingResource.setCleanAfterJob(o.isCleanAfterJob());
-        }
-
-        return dataHandlingResource;
-    }
-
-    private static Resource createAdvancedOutputDataResource (AdvancedOutputDataHandling o){
-        AdvancedOutputDataHandlingResource dataHandlingResource = new AdvancedOutputDataHandlingResource();
-        if (o != null){
-            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
-            dataHandlingResource.setExperimentResource(experimentResource);
-            if (o.getTask() != null){
-                TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
-                dataHandlingResource.setTaskDetailResource(taskDetailResource);
-            }
-            dataHandlingResource.setOutputDataHandlingId(o.getOutputDataHandlingId());
-            dataHandlingResource.setOutputDataDir(o.getOutputDataDir());
-            dataHandlingResource.setDataRegUrl(o.getDataRegUrl());
-            dataHandlingResource.setPersistOutputData(o.isPersistOutputData());
-        }
-        return dataHandlingResource;
-    }
-
-    private static Resource createQosParamResource (QosParam o){
-        QosParamResource qosParamResource = new QosParamResource();
-        if (o != null){
-            ExperimentResource experimentResource = (ExperimentResource)createExperiment(o.getExperiment());
-            qosParamResource.setExperimentResource(experimentResource);
-            if (o.getTask() != null){
-                TaskDetailResource taskDetailResource = (TaskDetailResource)createTaskDetail(o.getTask());
-                qosParamResource.setTaskDetailResource(taskDetailResource);
-            }
-            qosParamResource.setQosId(o.getQosId());
-            qosParamResource.setExecuteBefore(o.getExecuteBefore());
-            qosParamResource.setStartExecutionAt(o.getStartExecutionAt());
-            qosParamResource.setNoOfRetries(o.getNoOfRetries());
-        }
-
-        return qosParamResource;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
deleted file mode 100644
index fbf7855..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
+++ /dev/null
@@ -1,908 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.model.workspace.experiment.ExperimentState;
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.*;
-import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-import org.apache.airavata.registry.cpi.ResultOrderType;
-import org.apache.airavata.registry.cpi.utils.Constants;
-import org.apache.airavata.registry.cpi.utils.StatusType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.airavata.registry.cpi.RegistryException;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-public class WorkerResource extends AbstractResource {
-    private final static Logger logger = LoggerFactory.getLogger(WorkerResource.class);
-    private String user;
-	private GatewayResource gateway;
-
-    /**
-     *
-     */
-    public WorkerResource() {
-    }
-
-    /**
-     *
-     * @param user username
-     * @param gateway  gatewayResource
-     */
-    public WorkerResource(String user, GatewayResource gateway) {
-		this.setUser(user);
-		this.gateway=gateway;
-	}
-
-    /**
-     * Gateway worker can create child data structures such as projects and user workflows
-     * @param type child resource type
-     * @return  child resource
-     */
-	public Resource create(ResourceType type) throws RegistryException{
-		Resource result = null;
-		switch (type) {
-			case PROJECT:
-				ProjectResource projectResource = new ProjectResource();
-				projectResource.setWorker(this);
-				projectResource.setGateway(gateway);
-				result=projectResource;
-				break;
-            case EXPERIMENT:
-                ExperimentResource experimentResource = new ExperimentResource();
-                experimentResource.setExecutionUser(user);
-                experimentResource.setGateway(gateway);
-                result = experimentResource;
-                break;
-			default:
-                logger.error("Unsupported resource type for worker resource.", new IllegalArgumentException());
-                throw new IllegalArgumentException("Unsupported resource type for worker resource.");
-
-		}
-		return result;
-	}
-
-    /**
-     *
-     * @param type child resource type
-     * @param name child resource name
-     */
-	public void remove(ResourceType type, Object name) throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-            QueryGenerator generator;
-            switch (type) {
-                case PROJECT:
-                    generator = new QueryGenerator(PROJECT);
-                    generator.setParameter(ProjectConstants.PROJECT_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case EXPERIMENT:
-                    generator = new QueryGenerator(EXPERIMENT);
-                    generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                default:
-                    logger.error("Unsupported resource type for worker resource.", new IllegalArgumentException());
-                    break;
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e.getMessage());
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     *
-     * @param type child resource type
-     * @param name child resource name
-     * @return child resource
-     */
-	public Resource get(ResourceType type, Object name) throws RegistryException{
-        Resource result = null;
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            QueryGenerator generator;
-            Query q;
-            switch (type) {
-                case PROJECT:
-                    generator = new QueryGenerator(PROJECT);
-                    generator.setParameter(ProjectConstants.PROJECT_ID, name);
-                    q = generator.selectQuery(em);
-                    Project project = (Project) q.getSingleResult();
-                    result = Utils.getResource(ResourceType.PROJECT, project);
-                    break;
-                case EXPERIMENT:
-                    generator = new QueryGenerator(EXPERIMENT);
-                    generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
-                    q = generator.selectQuery(em);
-                    Experiment experiment = (Experiment) q.getSingleResult();
-                    result = Utils.getResource(ResourceType.EXPERIMENT, experiment);
-                    break;
-                default:
-                    logger.error("Unsupported resource type for worker resource.", new IllegalArgumentException());
-                    break;
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return result;
-    }
-
-//	public List<GFacJobDataResource> getGFacJobs(String serviceDescriptionId, String hostDescriptionId, String applicationDescriptionId){
-//		List<GFacJobDataResource> result = new ArrayList<GFacJobDataResource>();
-//        EntityManager em = ResourceUtils.getEntityManager();
-//        em.getTransaction().begin();
-//        QueryGenerator generator;
-//        Query q;
-//        generator = new QueryGenerator(GFAC_JOB_DATA);
-//        generator.setParameter(GFacJobDataConstants.SERVICE_DESC_ID, serviceDescriptionId);
-//        generator.setParameter(GFacJobDataConstants.HOST_DESC_ID, hostDescriptionId);
-//        generator.setParameter(GFacJobDataConstants.APP_DESC_ID, applicationDescriptionId);
-//        q = generator.selectQuery(em);
-//        for (Object o : q.getResultList()) {
-//            GFac_Job_Data gFacJobData = (GFac_Job_Data)o;
-//            result.add((GFacJobDataResource)Utils.getResource(ResourceType.GFAC_JOB_DATA, gFacJobData));
-//        }
-//        em.getTransaction().commit();
-//        em.close();
-//		return result;
-//	}
-//
-//	public List<GFacJobStatusResource> getGFacJobStatuses(String jobId){
-//		List<GFacJobStatusResource> resourceList = new ArrayList<GFacJobStatusResource>();
-//        EntityManager em = ResourceUtils.getEntityManager();
-//        em.getTransaction().begin();
-//        QueryGenerator generator;
-//        Query q;
-//        generator = new QueryGenerator(GFAC_JOB_STATUS);
-//        generator.setParameter(GFacJobStatusConstants.LOCAL_JOB_ID, jobId);
-//        q = generator.selectQuery(em);
-//        for (Object result : q.getResultList()) {
-//            GFac_Job_Status gFacJobStatus = (GFac_Job_Status) result;
-//            GFacJobStatusResource gFacJobStatusResource =
-//                    (GFacJobStatusResource)Utils.getResource(ResourceType.GFAC_JOB_STATUS, gFacJobStatus);
-//            resourceList.add(gFacJobStatusResource);
-//        }
-//        return resourceList;
-//	}
-
-    /**
-     * Method getExperiment all results of the given child resource type
-     *
-     * @param type child resource type
-     * @return list of child resources
-     */
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        return get(type, -1, -1, null, null);
-    }
-
-    /**
-     * Method getExperiment all results of the given child resource type with paginaltion and ordering
-     *
-     * @param type child resource type
-     * @param limit
-     * @param offset
-     * @param orderByIdentifier
-     * @param resultOrderType
-     * @return list of child resources
-     * @throws RegistryException
-     */
-    public List<Resource> get(ResourceType type, int limit, int offset, Object orderByIdentifier,
-                              ResultOrderType resultOrderType) throws RegistryException{
-        List<Resource> result = new ArrayList<Resource>();
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            QueryGenerator generator;
-            Query q;
-            switch (type) {
-                case PROJECT:
-                    generator = new QueryGenerator(PROJECT);
-                    Users users = em.find(Users.class, getUser());
-                    Gateway gatewayModel = em.find(Gateway.class, gateway.getGatewayId());
-                    generator.setParameter("users", users);
-                    generator.setParameter("gateway", gatewayModel);
-
-                    //ordering - only supported only by CREATION_TIME
-                    if(orderByIdentifier != null && resultOrderType != null
-                            && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {
-                        q = generator.selectQuery(em, ProjectConstants.CREATION_TIME, resultOrderType);
-                    }else{
-                        q = generator.selectQuery(em);
-                    }
-
-                    //pagination
-                    if(limit>0 && offset>=0){
-                        q.setFirstResult(offset);
-                        q.setMaxResults(limit);
-                    }
-
-                    for (Object o : q.getResultList()) {
-                        Project project = (Project) o;
-                        ProjectResource projectResource = (ProjectResource) Utils.getResource(ResourceType.PROJECT, project);
-                        result.add(projectResource);
-                    }
-                    break;
-                case EXPERIMENT:
-                    generator = new QueryGenerator(EXPERIMENT);
-                    generator.setParameter(ExperimentConstants.EXECUTION_USER, getUser());
-
-                    //ordering - only supported only by CREATION_TIME
-                    if(orderByIdentifier != null && resultOrderType != null
-                            && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {
-                        q = generator.selectQuery(em, ExperimentConstants.CREATION_TIME, resultOrderType);
-                    }else{
-                        q = generator.selectQuery(em);
-                    }
-
-                    //pagination
-                    if(limit>0 && offset>=0){
-                        q.setFirstResult(offset);
-                        q.setMaxResults(limit);
-                    }
-                    for (Object o : q.getResultList()) {
-                        Experiment experiment = (Experiment) o;
-                        ExperimentResource experimentResource = (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
-                        result.add(experimentResource);
-                    }
-
-                    break;
-                default:
-                    logger.error("Unsupported resource type for worker resource.", new IllegalArgumentException());
-                    break;
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return result;
-    }
-
-    /**
-     * saveExperiment gateway worker to database
-     */
-	public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            Gateway_Worker existingWorker = em.find(Gateway_Worker.class, new Gateway_Worker_PK(gateway.getGatewayId(), user));
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Gateway_Worker gatewayWorker = new Gateway_Worker();
-            Users existingUser = em.find(Users.class, this.user);
-            gatewayWorker.setUser(existingUser);
-            gatewayWorker.setUser_name(existingUser.getUser_name());
-            Gateway gatewaymodel = em.find(Gateway.class, gateway.getGatewayId());
-            gatewayWorker.setGateway(gatewaymodel);
-            gatewayWorker.setGateway_id(gatewaymodel.getGateway_id());
-            if (existingWorker != null) {
-                existingWorker.setUser_name(existingUser.getUser_name());
-                existingWorker.setUser(existingUser);
-                existingWorker.setGateway(gatewaymodel);
-                existingWorker.setGateway_id(gatewaymodel.getGateway_id());
-                gatewayWorker = em.merge(existingWorker);
-            } else {
-                em.persist(gatewayWorker);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     *
-     * @return user name
-     */
-	public String getUser() {
-		return user;
-	}
-
-    /**
-     *
-     * @param user user name
-     */
-    public void setUser(String user) {
-		this.user = user;
-	}
-
-    /**
-     *
-     * @return gateway resource
-     */
-    public GatewayResource getGateway() {
-        return gateway;
-    }
-
-    /**
-     *
-     * @param gateway  gateway resource
-     */
-    public void setGateway(GatewayResource gateway) {
-        this.gateway = gateway;
-    }
-
-    /**
-     *
-     * @param id  project id
-     * @return whether the project is available under the user
-     */
-    public boolean isProjectExists(String id) throws RegistryException{
-		return isExists(ResourceType.PROJECT, id);
-	}
-
-    /**
-     *
-     * @param projectId project id
-     * @return project resource for the user
-     */
-	public ProjectResource createProject(String projectId) throws RegistryException{
-		ProjectResource project=(ProjectResource)create(ResourceType.PROJECT);
-        project.setId(projectId);
-		return project;
-	}
-
-    public String getProjectId(String projectName) {
-        String pro = projectName.replaceAll("\\s", "");
-        return pro + "_" + UUID.randomUUID();
-    }
-
-    /**
-     *
-     * @param id project id
-     * @return project resource
-     */
-	public ProjectResource getProject(String id) throws RegistryException{
-		return (ProjectResource)get(ResourceType.PROJECT, id);
-	}
-
-    /**
-     *
-     * @param id project id
-     */
-	public void removeProject(String id) throws RegistryException{
-		remove(ResourceType.PROJECT, id);
-	}
-
-    /**
-     * Get projects list of user
-     * @return  list of projects for the user
-     */
-    public List<ProjectResource> getProjects() throws RegistryException{
-		return getProjects(-1, -1, null, null);
-	}
-
-
-    /**
-     * Get projects list of user with pagination and ordering
-     *
-     * @return  list of projects for the user
-     */
-    public List<ProjectResource> getProjects(int limit, int offset, Object orderByIdentifier,
-                                             ResultOrderType resultOrderType) throws RegistryException{
-        List<ProjectResource> result=new ArrayList<ProjectResource>();
-        List<Resource> list = get(ResourceType.PROJECT, limit, offset, orderByIdentifier, resultOrderType);
-        for (Resource resource : list) {
-            result.add((ProjectResource) resource);
-        }
-        return result;
-    }
-
-    /**
-     *
-     * @param name experiment name
-     * @return whether experiment is already exist for the given user
-     */
-	public boolean isExperimentExists(String name) throws RegistryException{
-		return isExists(ResourceType.EXPERIMENT, name);
-	}
-	
-
-    /**
-     *
-     * @param name experiment name
-     * @return experiment resource
-     */
-    public ExperimentResource getExperiment(String name) throws RegistryException{
-		return (ExperimentResource)get(ResourceType.EXPERIMENT, name);
-	}
-//
-//    public GFacJobDataResource getGFacJob(String jobId){
-//    	return (GFacJobDataResource)getExperiment(ResourceType.GFAC_JOB_DATA,jobId);
-//    }
-
-    /**
-     * Method to getExperiment list of expeirments of user
-     * @return list of experiments for the user
-     */
-	public List<ExperimentResource> getExperiments() throws RegistryException{
-		return getExperiments(-1, -1, null, null);
-	}
-
-    /**
-     * Method to getExperiment list of experiments of user with pagination and ordering
-     * @param limit
-     * @param offset
-     * @param orderByIdentifier
-     * @param resultOrderType
-     * @return
-     * @throws RegistryException
-     */
-    public List<ExperimentResource> getExperiments(int limit, int offset, Object orderByIdentifier,
-                                                   ResultOrderType resultOrderType) throws RegistryException{
-        List<ExperimentResource> result=new ArrayList<ExperimentResource>();
-        List<Resource> list = get(ResourceType.EXPERIMENT, limit, offset, orderByIdentifier, resultOrderType);
-        for (Resource resource : list) {
-            result.add((ExperimentResource) resource);
-        }
-        return result;
-    }
-
-    /**
-     *
-     * @param experimentId  experiment name
-     */
-	public void removeExperiment(String experimentId) throws RegistryException{
-		remove(ResourceType.EXPERIMENT, experimentId);
-	}
-
-    /**
-     * To search projects of user with the given filter criteria. All the matching results will be sent.
-     * Results are not ordered in any order
-     * @param filters
-     * @return
-     * @throws RegistryException
-     */
-    public List<ProjectResource> searchProjects (Map<String, String> filters) throws RegistryException{
-        return searchProjects(filters, -1, -1, null, null);
-    }
-
-    /**
-     * To search the projects of user with the given filter criteria and retrieve the results with
-     * pagination support. Results can be ordered based on an identifier (i.e column) either ASC or
-     * DESC. But in the current implementation ordering is only supported based on the project
-     * creation time
-     *
-     * @param filters
-     * @param limit
-     * @param offset
-     * @param orderByIdentifier
-     * @param resultOrderType
-     * @return
-     * @throws RegistryException
-     */
-    public List<ProjectResource> searchProjects(Map<String, String> filters, int limit,
-             int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
-        List<ProjectResource> result = new ArrayList<ProjectResource>();
-        EntityManager em = null;
-        try {
-            String query = "SELECT p from Project p WHERE ";
-            if (filters != null && filters.size() != 0) {
-                for (String field : filters.keySet()) {
-                    String filterVal = filters.get(field);
-                    if (field.equals(ProjectConstants.USERNAME)) {
-                        query += "p." + field + "= '" + filterVal + "' AND ";
-                    }else if (field.equals(ProjectConstants.GATEWAY_ID)) {
-                        query += "p." + field + "= '" + filterVal + "' AND ";
-                    }else {
-                        if (filterVal.contains("*")){
-                            filterVal = filterVal.replaceAll("\\*", "");
-                        }
-                        query += "p." + field + " LIKE '%" + filterVal + "%' AND ";
-                    }
-                }
-            }
-            query = query.substring(0, query.length() - 5);
-
-            //ordering
-            if( orderByIdentifier != null && resultOrderType != null
-                    && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)){
-                String order = (resultOrderType == ResultOrderType.ASC) ? "ASC" : "DESC";
-                query += " ORDER BY p." + ProjectConstants.CREATION_TIME + " " + order;
-            }
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-
-            //pagination
-            if(offset>=0 && limit >=0){
-                q = em.createQuery(query).setFirstResult(offset).setMaxResults(limit);
-            }else{
-                q = em.createQuery(query);
-            }
-
-            List resultList = q.getResultList();
-            for (Object o : resultList) {
-                Project project = (Project) o;
-                ProjectResource projectResource =
-                        (ProjectResource) Utils.getResource(ResourceType.PROJECT, project);
-                result.add(projectResource);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return result;
-    }
-
-    /**
-     * To search experiments of user with the given filter criteria. All the matching results will be sent.
-     * Results are not ordered in any order
-     * @param filters
-     * @return
-     * @throws RegistryException
-     */
-    public List<ExperimentResource> searchExperiments (Map<String, String> filters) throws RegistryException{
-        return searchExperiments(filters, -1, -1, null, null);
-    }
-
-    /**
-     * To search the experiments of user with the given filter criteria and retrieve the results with
-     * pagination support. Results can be ordered based on an identifier (i.e column) either ASC or
-     * DESC. But in the current implementation ordering is only supported based on creationTime
-     *
-     * @param filters
-     * @param limit
-     * @param offset
-     * @param orderByIdentifier
-     * @param resultOrderType
-     * @return
-     * @throws RegistryException
-     */
-    public List<ExperimentResource> searchExperiments(Map<String, String> filters, int limit,
-                                                      int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
-
-        List<ExperimentResource> result = new ArrayList<ExperimentResource>();
-        EntityManager em = null;
-        try {
-            String query = "SELECT e from Experiment e WHERE ";
-            if (filters != null && filters.size() != 0) {
-                for (String field : filters.keySet()) {
-                    String filterVal = filters.get(field);
-                    if (field.equals(ExperimentConstants.EXECUTION_USER)) {
-                        query += "e." + field + "= '" + filterVal + "' AND ";
-                    }else if (field.equals(ExperimentConstants.GATEWAY_ID)) {
-                        query += "e." + field + "= '" + filterVal + "' AND ";
-                    } else if (field.equals(ExperimentConstants.PROJECT_ID)) {
-                        query += "e." + field + "= '" + filterVal + "' AND ";
-                    } else {
-                        if (filterVal.contains("*")){
-                            filterVal = filterVal.replaceAll("\\*", "");
-                        }
-                        query += "e." + field + " LIKE '%" + filterVal + "%' AND ";
-                    }
-                }
-            }
-            query = query.substring(0, query.length() - 5);
-
-            //ordering
-            if( orderByIdentifier != null && resultOrderType != null
-                    && orderByIdentifier.equals(Constants.FieldConstants.ExperimentConstants.CREATION_TIME)){
-                String order = (resultOrderType == ResultOrderType.ASC) ? "ASC" : "DESC";
-                query += " ORDER BY e." + ExperimentConstants.CREATION_TIME + " " + order;
-            }
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-
-            //pagination
-            if(offset>=0 && limit >=0){
-                q = em.createQuery(query).setFirstResult(offset).setMaxResults(limit);
-            }else{
-                q = em.createQuery(query);
-            }
-
-            List resultList = q.getResultList();
-            for (Object o : resultList) {
-                Experiment experiment = (Experiment) o;
-                ExperimentResource experimentResource =
-                        (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
-                result.add(experimentResource);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return result;
-    }
-
-    /**
-     * Method to getExperiment experiments by state
-     * @param filters
-     * @return
-     * @throws RegistryException
-     */
-    public List<ExperimentResource> searchExperimentsByState (Map<String, String> filters) throws RegistryException{
-        return searchExperimentsByState(filters, -1, -1, null, null);
-    }
-
-    /**
-     * Method to getExperiment experiments of the given state with pagination and ordering
-     * @param filters
-     * @param limit
-     * @param offset
-     * @param orderByIdentifier
-     * @param resultOrderType
-     * @return
-     * @throws RegistryException
-     */
-    public List<ExperimentResource> searchExperimentsByState (Map<String, String> filters, int limit, int offset,
-            Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException{
-        List<ExperimentResource> result = new ArrayList<ExperimentResource>();
-        EntityManager em = null;
-        try {
-            String experimentState = ExperimentState.valueOf(filters.get(StatusConstants.STATE)).toString();
-            String query = "SELECT e FROM Status s " +
-                    "JOIN s.experiment e " +
-                    "WHERE s.state='" + experimentState +  "' " +
-                    "AND s.statusType='" + StatusType.EXPERIMENT + "' AND ";
-
-            filters.remove(StatusConstants.STATE);
-            if (filters.size() != 0) {
-                for (String field : filters.keySet()) {
-                    String filterVal = filters.get(field);
-                    if (field.equals(ExperimentConstants.EXECUTION_USER)) {
-                        query += "e." + field + "= '" + filterVal + "' AND ";
-                    }else if (field.equals(ExperimentConstants.GATEWAY_ID)) {
-                        query += "e." + field + "= '" + filterVal + "' AND ";
-                    } else if (field.equals(ExperimentConstants.PROJECT_ID)) {
-                        query += "e." + field + "= '" + filterVal + "' AND ";
-                    } else {
-                        if (filterVal.contains("*")){
-                            filterVal = filterVal.replaceAll("\\*", "");
-                        }
-                        query += "e." + field + " LIKE '%" + filterVal + "%' AND ";
-                    }
-                }
-            }
-            query = query.substring(0, query.length() - 5);
-
-            //ordering
-            if( orderByIdentifier != null && resultOrderType != null
-                    && orderByIdentifier.equals(Constants.FieldConstants.ExperimentConstants.CREATION_TIME)){
-                String order = (resultOrderType == ResultOrderType.ASC) ? "ASC" : "DESC";
-                query += " ORDER BY e." + ExperimentConstants.CREATION_TIME + " " + order;
-            }
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-
-            //pagination
-            if(offset>=0 && limit >=0){
-                q = em.createQuery(query).setFirstResult(offset).setMaxResults(limit);
-            }else{
-                q = em.createQuery(query);
-            }
-
-            List resultList = q.getResultList();
-            for (Object o : resultList) {
-                Experiment experiment = (Experiment) o;
-                ExperimentResource experimentResource = (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
-                result.add(experimentResource);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return result;
-    }
-
-    /**
-     * Search experiments from creation time between interval. Returns all results
-     * @param fromTime
-     * @param toTime
-     * @return
-     * @throws RegistryException
-     */
-    public List<ExperimentResource> searchExperimentsByCreationTime (Timestamp fromTime, Timestamp toTime) throws RegistryException{
-        return  searchExperimentsByCreationTime(fromTime, toTime, -1, -1, null, null);
-    }
-
-
-    /**
-     * Search experiments from creation time between interval. Results are ordered creation time DESC.
-     * Supports pagination
-     *
-     * @param fromTime
-     * @param toTime
-     * @param limit
-     * @param offset
-     * @param orderByIdentifier
-     * @param resultOrderType
-     * @return
-     * @throws RegistryException
-     */
-    public List<ExperimentResource> searchExperimentsByCreationTime(
-            Timestamp fromTime, Timestamp toTime, int limit, int offset, Object orderByIdentifier,
-            ResultOrderType resultOrderType) throws RegistryException{
-
-        List<ExperimentResource> result = new ArrayList<ExperimentResource>();
-        EntityManager em = null;
-        try {
-            String query = "SELECT e FROM Experiment e " +
-                    "WHERE e.creationTime > '" + fromTime +  "' " +
-                    "AND e.creationTime <'" + toTime + "'";
-
-            //ordering
-            if( orderByIdentifier != null && resultOrderType != null
-                    && orderByIdentifier.equals(Constants.FieldConstants.ExperimentConstants.CREATION_TIME)){
-                String order = (resultOrderType == ResultOrderType.ASC) ? "ASC" : "DESC";
-                query += " ORDER BY e." + ExperimentConstants.CREATION_TIME + " " + order;
-            }
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-
-            //pagination
-            if(offset>=0 && limit >=0){
-                q = em.createQuery(query).setFirstResult(offset).setMaxResults(limit);
-            }else{
-                q = em.createQuery(query);
-            }
-
-            List resultList = q.getResultList();
-            for (Object o : resultList) {
-                Experiment experiment = (Experiment) o;
-                ExperimentResource experimentResource = (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
-                result.add(experimentResource);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return result;
-    }
-
-    /**
-     *
-     * @return list of experiments for the user
-     */
-    public List<ExperimentResource> getExperimentsByCaching(String user) throws RegistryException{
-        List<ExperimentResource> result = new ArrayList<ExperimentResource>();
-        EntityManager em = null;
-        try {
-            String query = "SELECT e from Experiment e WHERE e.executionUser = '" + user + "'";
-            em = ResourceUtils.getEntityManager();
-//        OpenJPAEntityManagerFactory oemf = OpenJPAPersistence.cast(em.getEntityManagerFactory());
-//        QueryResultCache qcache = oemf.getQueryResultCache();
-            // qcache.evictAll(Experiment.class);
-            em.getTransaction().begin();
-            Query q = em.createQuery(query);
-            List resultList = q.getResultList();
-            for (Object o : resultList) {
-                Experiment experiment = (Experiment) o;
-                ExperimentResource experimentResource = (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
-                result.add(experimentResource);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return result;
-    }
-}


[39/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
deleted file mode 100644
index e440510..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
+++ /dev/null
@@ -1,190 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.sql.Timestamp;
-
-@DataCache
-@Entity
-@Table(name = "COMPUTATIONAL_RESOURCE_SCHEDULING")
-public class Computational_Resource_Scheduling implements Serializable {
-    @Id
-    @GeneratedValue
-    @Column(name = "RESOURCE_SCHEDULING_ID")
-    private int schedulingId;
-    @Column(name = "EXPERIMENT_ID")
-    private String expId;
-    @Column(name = "TASK_ID")
-    private String taskId;
-    @Column(name = "RESOURCE_HOST_ID")
-    private String resourceHostId;
-    @Column(name = "CPU_COUNT")
-    private int cpuCount;
-    @Column(name = "NODE_COUNT")
-    private int nodeCount;
-    @Column(name = "NO_OF_THREADS")
-    private int numberOfThreads;
-    @Column(name = "QUEUE_NAME")
-    private String queueName;
-    @Column(name = "WALLTIME_LIMIT")
-    private int wallTimeLimit;
-    @Column(name = "JOB_START_TIME")
-    private Timestamp jobStartTime;
-    @Column(name = "TOTAL_PHYSICAL_MEMORY")
-    private int totalPhysicalmemory;
-    @Column(name = "COMPUTATIONAL_PROJECT_ACCOUNT")
-    private String projectName;
-    @Column(name = "CHESSIS_NAME")
-    private String chessisName;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "EXPERIMENT_ID")
-    private Experiment experiment;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "TASK_ID")
-    private TaskDetail task;
-
-    public String getChessisName() {
-        return chessisName;
-    }
-
-    public void setChessisName(String chessisName) {
-        this.chessisName = chessisName;
-    }
-
-    public int getSchedulingId() {
-        return schedulingId;
-    }
-
-    public void setSchedulingId(int schedulingId) {
-        this.schedulingId = schedulingId;
-    }
-
-    public String getExpId() {
-        return expId;
-    }
-
-    public void setExpId(String expId) {
-        this.expId = expId;
-    }
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-
-    public String getResourceHostId() {
-        return resourceHostId;
-    }
-
-    public void setResourceHostId(String resourceHostId) {
-        this.resourceHostId = resourceHostId;
-    }
-
-    public int getCpuCount() {
-        return cpuCount;
-    }
-
-    public void setCpuCount(int cpuCount) {
-        this.cpuCount = cpuCount;
-    }
-
-    public int getNodeCount() {
-        return nodeCount;
-    }
-
-    public void setNodeCount(int nodeCount) {
-        this.nodeCount = nodeCount;
-    }
-
-    public int getNumberOfThreads() {
-        return numberOfThreads;
-    }
-
-    public void setNumberOfThreads(int numberOfThreads) {
-        this.numberOfThreads = numberOfThreads;
-    }
-
-    public String getQueueName() {
-        return queueName;
-    }
-
-    public void setQueueName(String queueName) {
-        this.queueName = queueName;
-    }
-
-    public int getWallTimeLimit() {
-        return wallTimeLimit;
-    }
-
-    public void setWallTimeLimit(int wallTimeLimit) {
-        this.wallTimeLimit = wallTimeLimit;
-    }
-
-    public Timestamp getJobStartTime() {
-        return jobStartTime;
-    }
-
-    public void setJobStartTime(Timestamp jobStartTime) {
-        this.jobStartTime = jobStartTime;
-    }
-
-    public int getTotalPhysicalmemory() {
-        return totalPhysicalmemory;
-    }
-
-    public void setTotalPhysicalmemory(int totalPhysicalmemory) {
-        this.totalPhysicalmemory = totalPhysicalmemory;
-    }
-
-    public String getProjectName() {
-        return projectName;
-    }
-
-    public void setProjectName(String projectName) {
-        this.projectName = projectName;
-    }
-
-    public Experiment getExperiment() {
-        return experiment;
-    }
-
-    public void setExperiment(Experiment experiment) {
-        this.experiment = experiment;
-    }
-
-    public TaskDetail getTask() {
-        return task;
-    }
-
-    public void setTask(TaskDetail task) {
-        this.task = task;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration.java
deleted file mode 100644
index a7a1d4f..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration.java
+++ /dev/null
@@ -1,80 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.sql.Timestamp;
-
-@DataCache
-@Entity
-@Table(name ="CONFIGURATION")
-@IdClass(Configuration_PK.class)
-public class Configuration implements Serializable {
-    @Id
-    @Column(name = "CONFIG_KEY")
-    private String config_key;
-
-    @Id
-    @Column(name = "CONFIG_VAL")
-    private String config_val;
-
-    @Id
-    @Column(name = "CATEGORY_ID")
-    private String category_id;
-
-    @Column(name = "EXPIRE_DATE")
-    private Timestamp expire_date;
-
-    public String getConfig_key() {
-        return config_key;
-    }
-
-    public String getConfig_val() {
-        return config_val;
-    }
-
-    public Timestamp getExpire_date() {
-        return expire_date;
-    }
-
-    public void setConfig_key(String config_key) {
-        this.config_key = config_key;
-    }
-
-    public void setConfig_val(String config_val) {
-        this.config_val = config_val;
-    }
-
-    public void setExpire_date(Timestamp expire_date) {
-        this.expire_date = expire_date;
-    }
-
-    public String getCategory_id() {
-        return category_id;
-    }
-
-    public void setCategory_id(String category_id) {
-        this.category_id = category_id;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java
deleted file mode 100644
index b58fd71..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java
+++ /dev/null
@@ -1,74 +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.persistance.registry.jpa.model;
-
-import java.io.Serializable;
-
-public class Configuration_PK implements Serializable {
-    private String config_key;
-    private String config_val;
-    private String category_id;
-
-    public Configuration_PK(String config_key, String config_val, String category_id) {
-        this.config_key = config_key;
-        this.config_val = config_val;
-        this.category_id = category_id;
-    }
-
-    public Configuration_PK() {
-        ;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-
-    public String getConfig_key() {
-        return config_key;
-    }
-
-    public void setConfig_key(String config_key) {
-        this.config_key = config_key;
-    }
-
-    public void setConfig_val(String config_val) {
-        this.config_val = config_val;
-    }
-
-    public String getConfig_val() {
-        return config_val;
-    }
-
-    public String getCategory_id() {
-        return category_id;
-    }
-
-    public void setCategory_id(String category_id) {
-        this.category_id = category_id;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java
deleted file mode 100644
index 95ad0e9..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java
+++ /dev/null
@@ -1,88 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.sql.Timestamp;
-
-@DataCache
-@Entity
-@Table(name = "DATA_TRANSFER_DETAIL")
-public class DataTransferDetail implements Serializable {
-    @Id
-    @Column(name = "TRANSFER_ID")
-    private String transferId;
-    @Column(name = "TASK_ID")
-    private String taskId;
-    @Column(name = "CREATION_TIME")
-    private Timestamp creationTime;
-    @Lob
-    @Column(name = "TRANSFER_DESC")
-    private char[] transferDesc;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "TASK_ID")
-    private TaskDetail task;
-
-    public String getTransferId() {
-        return transferId;
-    }
-
-    public void setTransferId(String transferId) {
-        this.transferId = transferId;
-    }
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public char[] getTransferDesc() {
-        return transferDesc;
-    }
-
-    public void setTransferDesc(char[] transferDesc) {
-        this.transferDesc = transferDesc;
-    }
-
-    public TaskDetail getTask() {
-        return task;
-    }
-
-    public void setTask(TaskDetail task) {
-        this.task = task;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
deleted file mode 100644
index 28d393f..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
+++ /dev/null
@@ -1,196 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-
-import java.io.Serializable;
-import java.sql.Timestamp;
-
-@DataCache
-@Entity
-@Table(name = "ERROR_DETAIL")
-public class ErrorDetail implements Serializable {
-    @Id
-    @GeneratedValue
-    @Column(name = "ERROR_ID")
-    private int errorID;
-    @Column(name = "EXPERIMENT_ID")
-    private String expId;
-    @Column(name = "TASK_ID")
-    private String taskId;
-    @Column(name = "NODE_INSTANCE_ID")
-    private String nodeId;
-    @Column(name = "CREATION_TIME")
-    private Timestamp creationTime;
-    @Lob
-    @Column(name = "ACTUAL_ERROR_MESSAGE")
-    private char[] actualErrorMsg;
-    
-    @Column(name = "USER_FRIEDNLY_ERROR_MSG")
-    private String userFriendlyErrorMsg;
-    @Column(name = "TRANSIENT_OR_PERSISTENT")
-    private boolean transientPersistent;
-    @Column(name = "ERROR_CATEGORY")
-    private String errorCategory;
-    @Column(name = "CORRECTIVE_ACTION")
-    private String correctiveAction;
-    @Column(name = "ACTIONABLE_GROUP")
-    private String actionableGroup;
-    @Column(name = "JOB_ID")
-    private String jobId;
-
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "EXPERIMENT_ID")
-    private Experiment experiment;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "TASK_ID")
-    private TaskDetail task;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "NODE_INSTANCE_ID")
-    private WorkflowNodeDetail nodeDetails;
-
-    public int getErrorId() {
-        return errorID;
-    }
-
-    public void setErrorId(int errorID) {
-        this.errorID = errorID;
-    }
-
-    public String getExpId() {
-        return expId;
-    }
-
-    public void setExpId(String expId) {
-        this.expId = expId;
-    }
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-
-    public String getNodeId() {
-        return nodeId;
-    }
-
-    public void setNodeId(String nodeId) {
-        this.nodeId = nodeId;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public char[] getActualErrorMsg() {
-		return actualErrorMsg;
-	}
-
-	public void setActualErrorMsg(char[] actualErrorMsg) {
-		this.actualErrorMsg = actualErrorMsg;
-	}
-
-	public String getUserFriendlyErrorMsg() {
-        return userFriendlyErrorMsg;
-    }
-
-    public void setUserFriendlyErrorMsg(String userFriendlyErrorMsg) {
-        this.userFriendlyErrorMsg = userFriendlyErrorMsg;
-    }
-
-    public boolean isTransientPersistent() {
-        return transientPersistent;
-    }
-
-    public void setTransientPersistent(boolean transientPersistent) {
-        this.transientPersistent = transientPersistent;
-    }
-
-    public String getErrorCategory() {
-        return errorCategory;
-    }
-
-    public void setErrorCategory(String errorCategory) {
-        this.errorCategory = errorCategory;
-    }
-
-    public String getActionableGroup() {
-        return actionableGroup;
-    }
-
-    public void setActionableGroup(String actionableGroup) {
-        this.actionableGroup = actionableGroup;
-    }
-
-    public Experiment getExperiment() {
-        return experiment;
-    }
-
-    public void setExperiment(Experiment experiment) {
-        this.experiment = experiment;
-    }
-
-    public TaskDetail getTask() {
-        return task;
-    }
-
-    public void setTask(TaskDetail task) {
-        this.task = task;
-    }
-
-    public WorkflowNodeDetail getNodeDetails() {
-        return nodeDetails;
-    }
-
-    public void setNodeDetails(WorkflowNodeDetail nodeDetails) {
-        this.nodeDetails = nodeDetails;
-    }
-
-    public String getCorrectiveAction() {
-        return correctiveAction;
-    }
-
-    public void setCorrectiveAction(String correctiveAction) {
-        this.correctiveAction = correctiveAction;
-    }
-
-    public String getJobId() {
-        return jobId;
-    }
-
-    public void setJobId(String jobId) {
-        this.jobId = jobId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
deleted file mode 100644
index 1c2d430..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
+++ /dev/null
@@ -1,211 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.sql.Timestamp;
-
-@Entity
-@Table(name = "EXPERIMENT")
-@DataCache
-public class Experiment implements Serializable {
-    @Id
-    @Column(name = "EXPERIMENT_ID")
-    private String expId;
-    @Column(name = "GATEWAY_ID")
-    private String gatewayId;
-    @Column(name = "EXECUTION_USER")
-    private String executionUser;
-    @Column(name = "PROJECT_ID")
-    private String projectID;
-    @Column(name = "CREATION_TIME")
-    private Timestamp creationTime;
-    @Column(name = "EXPERIMENT_NAME")
-    private String expName;
-    @Column(name = "EXPERIMENT_DESCRIPTION")
-    private String expDesc;
-    @Column(name = "APPLICATION_ID")
-    private String applicationId;
-    @Column(name = "APPLICATION_VERSION")
-    private String appVersion;
-    @Column(name = "WORKFLOW_TEMPLATE_ID")
-    private String workflowTemplateId;
-    @Column(name = "WORKFLOW_TEMPLATE_VERSION")
-    private String workflowTemplateVersion;
-    @Column(name = "WORKFLOW_EXECUTION_ID")
-    private String workflowExecutionId;
-    @Column(name = "ALLOW_NOTIFICATION")
-    private boolean allowNotification;
-    @Column(name = "GATEWAY_EXECUTION_ID")
-    private String gatewayExecutionId;
-
-    @ManyToOne(cascade=CascadeType.MERGE)
-    @JoinColumn(name = "GATEWAY_ID")
-    private Gateway gateway;
-
-    @ManyToOne(cascade=CascadeType.MERGE)
-    @JoinColumn(name = "PROJECT_ID")
-    private Project project;
-
-    @ManyToOne(cascade=CascadeType.MERGE)
-    @JoinColumn(name = "EXECUTION_USER", referencedColumnName = "USER_NAME")
-    private Users user;
-
-    public String getExpId() {
-        return expId;
-    }
-
-    public void setExpId(String expId) {
-        this.expId = expId;
-    }
-
-    public String getGatewayId() {
-        return gatewayId;
-    }
-
-    public void setGatewayId(String gatewayId) {
-        this.gatewayId = gatewayId;
-    }
-
-    public String getExecutionUser() {
-        return executionUser;
-    }
-
-    public void setExecutionUser(String executionUser) {
-        this.executionUser = executionUser;
-    }
-
-    public String getProjectId() {
-        return projectID;
-    }
-
-    public void setProjectId(String projectId) {
-        this.projectID = projectId;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public String getExpName() {
-        return expName;
-    }
-
-    public void setExpName(String expName) {
-        this.expName = expName;
-    }
-
-    public String getExpDesc() {
-        return expDesc;
-    }
-
-    public void setExpDesc(String expDesc) {
-        this.expDesc = expDesc;
-    }
-
-    public String getApplicationId() {
-        return applicationId;
-    }
-
-    public void setApplicationId(String applicationId) {
-        this.applicationId = applicationId;
-    }
-
-    public String getAppVersion() {
-        return appVersion;
-    }
-
-    public void setAppVersion(String appVersion) {
-        this.appVersion = appVersion;
-    }
-
-    public String getWorkflowTemplateId() {
-        return workflowTemplateId;
-    }
-
-    public void setWorkflowTemplateId(String workflowTemplateId) {
-        this.workflowTemplateId = workflowTemplateId;
-    }
-
-    public String getWorkflowTemplateVersion() {
-        return workflowTemplateVersion;
-    }
-
-    public void setWorkflowTemplateVersion(String workflowTemplateVersion) {
-        this.workflowTemplateVersion = workflowTemplateVersion;
-    }
-
-    public String getWorkflowExecutionId() {
-        return workflowExecutionId;
-    }
-
-    public void setWorkflowExecutionId(String workflowExecutionId) {
-        this.workflowExecutionId = workflowExecutionId;
-    }
-
-    public Gateway getGateway() {
-        return gateway;
-    }
-
-    public void setGateway(Gateway gateway) {
-        this.gateway = gateway;
-    }
-
-    public Project getProject() {
-        return project;
-    }
-
-    public void setProject(Project project) {
-        this.project = project;
-    }
-
-    public Users getUser() {
-        return user;
-    }
-
-    public void setUser(Users user) {
-        this.user = user;
-    }
-
-    public boolean isAllowNotification() {
-        return allowNotification;
-    }
-
-    public void setAllowNotification(boolean allowNotification) {
-        this.allowNotification = allowNotification;
-    }
-
-    public String getGatewayExecutionId() {
-        return gatewayExecutionId;
-    }
-
-    public void setGatewayExecutionId(String gatewayExecutionId) {
-        this.gatewayExecutionId = gatewayExecutionId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
deleted file mode 100644
index 63e91ad..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@DataCache
-@Entity
-@Table(name = "CONFIG_DATA")
-public class ExperimentConfigData implements Serializable {
-    @Id
-    @Column(name = "EXPERIMENT_ID")
-    private String expId;
-    @Column(name = "AIRAVATA_AUTO_SCHEDULE")
-    private boolean airavataAutoSchedule;
-    @Column(name = "OVERRIDE_MANUAL_SCHEDULE_PARAMS")
-    private boolean overrideManualParams;
-    @Column(name = "SHARE_EXPERIMENT")
-    private boolean shareExp;
-    @Column(name = "USER_DN")
-    private String userDn;
-    @Column(name = "GENERATE_CERT")
-    private boolean generateCert;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "EXPERIMENT_ID")
-    private Experiment experiment;
-
-    public String getExpId() {
-        return expId;
-    }
-
-    public void setExpId(String expId) {
-        this.expId = expId;
-    }
-
-    public boolean isAiravataAutoSchedule() {
-        return airavataAutoSchedule;
-    }
-
-    public void setAiravataAutoSchedule(boolean airavataAutoSchedule) {
-        this.airavataAutoSchedule = airavataAutoSchedule;
-    }
-
-    public boolean isOverrideManualParams() {
-        return overrideManualParams;
-    }
-
-    public void setOverrideManualParams(boolean overrideManualParams) {
-        this.overrideManualParams = overrideManualParams;
-    }
-
-    public boolean isShareExp() {
-        return shareExp;
-    }
-
-    public void setShareExp(boolean shareExp) {
-        this.shareExp = shareExp;
-    }
-
-    public Experiment getExperiment() {
-        return experiment;
-    }
-
-    public void setExperiment(Experiment experiment) {
-        this.experiment = experiment;
-    }
-
-    public String getUserDn() {
-        return userDn;
-    }
-
-    public void setUserDn(String userDn) {
-        this.userDn = userDn;
-    }
-
-    public boolean isGenerateCert() {
-        return generateCert;
-    }
-
-    public void setGenerateCert(boolean generateCert) {
-        this.generateCert = generateCert;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java
deleted file mode 100644
index e8c5087..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java
+++ /dev/null
@@ -1,178 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@DataCache
-@Entity
-@Table(name ="EXPERIMENT_INPUT")
-@IdClass(Experiment_Input_PK.class)
-public class Experiment_Input implements Serializable {
-    @Id
-    @Column(name = "EXPERIMENT_ID")
-    private String experiment_id;
-
-    @Id
-    @Column(name = "INPUT_KEY")
-    private String ex_key;
-
-    @Lob
-    @Column(name = "VALUE")
-    private char[] value;
-
-    @Column(name = "DATA_TYPE")
-    private String dataType;
-
-    @Column(name = "APP_ARGUMENT")
-    private String appArgument;
-
-    @Column(name = "STANDARD_INPUT")
-    private boolean standardInput;
-
-    @Column(name = "USER_FRIENDLY_DESC")
-    private String userFriendlyDesc;
-
-    @Column(name = "METADATA")
-    private String metadata;
-
-    @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
-    @JoinColumn(name = "EXPERIMENT_ID")
-    private Experiment experiment;
-
-    public int getInputOrder() {
-        return inputOrder;
-    }
-
-    public void setInputOrder(int inputOrder) {
-        this.inputOrder = inputOrder;
-    }
-
-    public String getExperiment_id() {
-        return experiment_id;
-    }
-
-    public void setExperiment_id(String experiment_id) {
-        this.experiment_id = experiment_id;
-    }
-
-    public String getEx_key() {
-        return ex_key;
-    }
-
-    public void setEx_key(String ex_key) {
-        this.ex_key = ex_key;
-    }
-
-    public char[] getValue() {
-        return value;
-    }
-
-    public void setValue(char[] value) {
-        this.value = value;
-    }
-
-    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 Experiment getExperiment() {
-        return experiment;
-    }
-
-    public void setExperiment(Experiment experiment) {
-        this.experiment = experiment;
-    }
-
-    public String getAppArgument() {
-        return appArgument;
-    }
-
-    public void setAppArgument(String appArgument) {
-        this.appArgument = appArgument;
-    }
-
-    public boolean isStandardInput() {
-        return standardInput;
-    }
-
-    public void setStandardInput(boolean standardInput) {
-        this.standardInput = standardInput;
-    }
-
-    public String getUserFriendlyDesc() {
-        return userFriendlyDesc;
-    }
-
-    public void setUserFriendlyDesc(String userFriendlyDesc) {
-        this.userFriendlyDesc = userFriendlyDesc;
-    }
-
-    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/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input_PK.java
deleted file mode 100644
index 73a83a7..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input_PK.java
+++ /dev/null
@@ -1,64 +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.persistance.registry.jpa.model;
-
-import java.io.Serializable;
-
-public class Experiment_Input_PK implements Serializable {
-    private String experiment_id;
-    private String ex_key;
-
-    public Experiment_Input_PK(String experiment_id, String ex_key) {
-        this.experiment_id = experiment_id;
-        this.ex_key = ex_key;
-    }
-
-    public Experiment_Input_PK() {
-        ;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-
-    public String getExperiment_id() {
-        return experiment_id;
-    }
-
-    public void setExperiment_id(String experiment_id) {
-        this.experiment_id = experiment_id;
-    }
-
-    public String getEx_key() {
-        return ex_key;
-    }
-
-    public void setEx_key(String ex_key) {
-        this.ex_key = ex_key;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java
deleted file mode 100644
index ece544e..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output.java
+++ /dev/null
@@ -1,151 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@DataCache
-@Entity
-@Table(name ="EXPERIMENT_OUTPUT")
-@IdClass(Experiment_Output_PK.class)
-public class Experiment_Output  implements Serializable {
-    @Id
-    @Column(name = "EXPERIMENT_ID")
-    private String experiment_id;
-
-    @Id
-    @Column(name = "OUTPUT_KEY")
-    private String ex_key;
-    @Lob
-    @Column(name = "VALUE")
-    private char[] value;
-    @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
-    @JoinColumn(name = "EXPERIMENT_ID")
-    private Experiment experiment;
-
-    public String getExperiment_id() {
-        return experiment_id;
-    }
-
-    public void setExperiment_id(String experiment_id) {
-        this.experiment_id = experiment_id;
-    }
-
-    public String getEx_key() {
-        return ex_key;
-    }
-
-    public void setEx_key(String ex_key) {
-        this.ex_key = ex_key;
-    }
-
-    public char[] getValue() {
-        return value;
-    }
-
-    public void setValue(char[] value) {
-        this.value = value;
-    }
-
-    public String getDataType() {
-        return dataType;
-    }
-
-    public void setDataType(String dataType) {
-        this.dataType = dataType;
-    }
-
-    public Experiment getExperiment() {
-        return experiment;
-    }
-
-    public void setExperiment(Experiment experiment) {
-        this.experiment = experiment;
-    }
-
-    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/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output_PK.java
deleted file mode 100644
index c41d8d9..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Output_PK.java
+++ /dev/null
@@ -1,64 +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.persistance.registry.jpa.model;
-
-import java.io.Serializable;
-
-public class Experiment_Output_PK implements Serializable {
-    private String experiment_id;
-    private String ex_key;
-
-    public Experiment_Output_PK(String experiment_id, String ex_key) {
-        this.experiment_id = experiment_id;
-        this.ex_key = ex_key;
-    }
-
-    public Experiment_Output_PK() {
-        ;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-
-    public String getExperiment_id() {
-        return experiment_id;
-    }
-
-    public void setExperiment_id(String experiment_id) {
-        this.experiment_id = experiment_id;
-    }
-
-    public String getEx_key() {
-        return ex_key;
-    }
-
-    public void setEx_key(String ex_key) {
-        this.ex_key = ex_key;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway.java
deleted file mode 100644
index 7619f17..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway.java
+++ /dev/null
@@ -1,76 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import java.io.Serializable;
-
-@DataCache
-@Entity
-@Table(name ="GATEWAY")
-public class Gateway implements Serializable {
-    @Id
-    @Column(name = "GATEWAY_ID")
-    private String gateway_id;
-    @Column(name = "GATEWAY_NAME")
-    private String gateway_name;
-    @Column(name = "DOMAIN")
-    private String domain;
-    @Column(name = "EMAIL_ADDRESS")
-    private String emailAddress;
-
-    public String getGateway_name() {
-        return gateway_name;
-    }
-
-    public void setGateway_name(String gateway_name) {
-        this.gateway_name = gateway_name;
-    }
-
-    public String getDomain() {
-        return domain;
-    }
-
-    public void setDomain(String domain) {
-        this.domain = domain;
-    }
-
-    public String getGateway_id() {
-        return gateway_id;
-    }
-
-    public void setGateway_id(String gateway_id) {
-        this.gateway_id = gateway_id;
-    }
-
-    public String getEmailAddress() {
-        return emailAddress;
-    }
-
-    public void setEmailAddress(String emailAddress) {
-        this.emailAddress = emailAddress;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker.java
deleted file mode 100644
index 12f3202..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker.java
+++ /dev/null
@@ -1,82 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@DataCache
-@Entity
-@Table(name ="GATEWAY_WORKER")
-@IdClass(Gateway_Worker_PK.class)
-public class Gateway_Worker implements Serializable {
-    @Id
-    @Column(name = "GATEWAY_ID")
-    private String gateway_id;
-
-    @Id
-    @Column(name = "USER_NAME")
-    private String user_name;
-
-    @ManyToOne(cascade=CascadeType.MERGE)
-    @JoinColumn(name = "GATEWAY_ID")
-    private Gateway gateway;
-
-
-    @ManyToOne(cascade=CascadeType.MERGE)
-    @JoinColumn(name = "USER_NAME")
-    private Users user;
-
-    public String getUser_name() {
-        return user_name;
-    }
-
-    public void setUser_name(String user_name) {
-        this.user_name = user_name;
-    }
-
-    public void setGateway(Gateway gateway) {
-        this.gateway = gateway;
-    }
-
-    public Gateway getGateway() {
-        return gateway;
-    }
-
-    public Users getUser() {
-        return user;
-    }
-
-    public void setUser(Users user) {
-        this.user = user;
-    }
-
-    public String getGateway_id() {
-        return gateway_id;
-    }
-
-    public void setGateway_id(String gateway_id) {
-        this.gateway_id = gateway_id;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker_PK.java
deleted file mode 100644
index b2a93a6..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Gateway_Worker_PK.java
+++ /dev/null
@@ -1,64 +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.persistance.registry.jpa.model;
-
-import java.io.Serializable;
-
-public class Gateway_Worker_PK implements Serializable {
-    private String gateway_id;
-    private String user_name;
-
-    public Gateway_Worker_PK(String gateway_id, String user_name) {
-        this.gateway_id = gateway_id;
-        this.user_name = user_name;
-    }
-
-    public Gateway_Worker_PK() {
-        ;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-
-    public String getUser_name() {
-        return user_name;
-    }
-
-    public void setUser_name(String user_name) {
-        this.user_name = user_name;
-    }
-
-    public String getGateway_id() {
-        return gateway_id;
-    }
-
-    public void setGateway_id(String gateway_id) {
-        this.gateway_id = gateway_id;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java
deleted file mode 100644
index 36f12f8..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java
+++ /dev/null
@@ -1,120 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.sql.Timestamp;
-
-@DataCache
-@Entity
-@Table(name = "JOB_DETAIL")
-@IdClass(JobDetails_PK.class)
-public class JobDetail implements Serializable {
-    @Id
-    @Column(name = "JOB_ID")
-    private String jobId;
-    @Id
-    @Column(name = "TASK_ID")
-    private String taskId;
-    @Column(name = "JOB_DESCRIPTION")
-    @Lob
-    private char[] jobDescription;
-    @Column(name = "CREATION_TIME")
-    private Timestamp creationTime;
-    @Column(name = "COMPUTE_RESOURCE_CONSUMED")
-    private String computeResourceConsumed;
-    @Column(name = "JOBNAME")
-    private String jobName;
-    @Column(name = "WORKING_DIR")
-    private String workingDir;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "TASK_ID")
-    private TaskDetail task;
-
-    public String getJobId() {
-        return jobId;
-    }
-
-    public void setJobId(String jobId) {
-        this.jobId = jobId;
-    }
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-
-    public char[] getJobDescription() {
-        return jobDescription;
-    }
-
-    public void setJobDescription(char[] jobDescription) {
-        this.jobDescription = jobDescription;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public TaskDetail getTask() {
-        return task;
-    }
-
-    public void setTask(TaskDetail task) {
-        this.task = task;
-    }
-
-    public String getComputeResourceConsumed() {
-        return computeResourceConsumed;
-    }
-
-    public void setComputeResourceConsumed(String computeResourceConsumed) {
-        this.computeResourceConsumed = computeResourceConsumed;
-    }
-
-    public String getJobName() {
-        return jobName;
-    }
-
-    public void setJobName(String jobName) {
-        this.jobName = jobName;
-    }
-
-    public String getWorkingDir() {
-        return workingDir;
-    }
-
-    public void setWorkingDir(String workingDir) {
-        this.workingDir = workingDir;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetails_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetails_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetails_PK.java
deleted file mode 100644
index 1247fb6..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetails_PK.java
+++ /dev/null
@@ -1,64 +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.persistance.registry.jpa.model;
-
-import java.io.Serializable;
-
-public class JobDetails_PK implements Serializable {
-    private String jobId;
-    private String taskId;
-
-    public JobDetails_PK(String jobId, String taskId) {
-        this.jobId = jobId;
-        this.taskId = taskId;
-    }
-
-    public JobDetails_PK() {
-        ;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-
-    public String getJobId() {
-        return jobId;
-    }
-
-    public void setJobId(String jobId) {
-        this.jobId = jobId;
-    }
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput.java
deleted file mode 100644
index 7e48cbf..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput.java
+++ /dev/null
@@ -1,171 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@DataCache
-@Entity
-@Table(name = "NODE_INPUT")
-@IdClass(NodeInput_PK.class)
-public class NodeInput implements Serializable {
-    @Id
-    @Column(name = "NODE_INSTANCE_ID")
-    private String nodeId;
-    @Id
-    @Column(name = "INPUT_KEY")
-    private String inputKey;
-    @Column(name = "DATA_TYPE")
-    private String dataType;
-    @Column(name = "METADATA")
-    private String metadata;
-    @Column(name = "VALUE")
-    private String value;
-    @Column(name = "APP_ARGUMENT")
-    private String appArgument;
-    @Column(name = "INPUT_ORDER")
-    private int inputOrder;
-
-    @Column(name = "STANDARD_INPUT")
-    private boolean standardInput;
-
-    @Column(name = "USER_FRIENDLY_DESC")
-    private String userFriendlyDesc;
-
-    @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 = "NODE_INSTANCE_ID")
-    private WorkflowNodeDetail nodeDetails;
-
-    public String getInputKey() {
-        return inputKey;
-    }
-
-    public void setInputKey(String inputKey) {
-        this.inputKey = inputKey;
-    }
-
-    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 getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public String getNodeId() {
-        return nodeId;
-    }
-
-    public void setNodeId(String nodeId) {
-        this.nodeId = nodeId;
-    }
-
-    public WorkflowNodeDetail getNodeDetails() {
-        return nodeDetails;
-    }
-
-    public void setNodeDetails(WorkflowNodeDetail nodeDetails) {
-        this.nodeDetails = nodeDetails;
-    }
-
-    public String getAppArgument() {
-        return appArgument;
-    }
-
-    public void setAppArgument(String appArgument) {
-        this.appArgument = appArgument;
-    }
-
-    public boolean isStandardInput() {
-        return standardInput;
-    }
-
-    public void setStandardInput(boolean standardInput) {
-        this.standardInput = standardInput;
-    }
-
-    public String getUserFriendlyDesc() {
-        return userFriendlyDesc;
-    }
-
-    public void setUserFriendlyDesc(String userFriendlyDesc) {
-        this.userFriendlyDesc = userFriendlyDesc;
-    }
-
-    public int getInputOrder() {
-        return inputOrder;
-    }
-
-    public void setInputOrder(int inputOrder) {
-        this.inputOrder = inputOrder;
-    }
-
-    public boolean getIsRequired() {
-        return isRequired;
-    }
-
-    public void setIsRequired(boolean isRequired) {
-        this.isRequired = isRequired;
-    }
-
-    public boolean getRequiredToCMD() {
-        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/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput_PK.java
deleted file mode 100644
index 9db1cbe..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeInput_PK.java
+++ /dev/null
@@ -1,64 +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.persistance.registry.jpa.model;
-
-import java.io.Serializable;
-
-public class NodeInput_PK implements Serializable {
-    private String nodeId;
-    private String inputKey;
-
-    public NodeInput_PK(String nodeId, String inputKey) {
-        this.nodeId = nodeId;
-        this.inputKey = inputKey;
-    }
-
-    public NodeInput_PK() {
-        ;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-
-    public String getNodeId() {
-        return nodeId;
-    }
-
-    public void setNodeId(String nodeId) {
-        this.nodeId = nodeId;
-    }
-
-    public String getInputKey() {
-        return inputKey;
-    }
-
-    public void setInputKey(String inputKey) {
-        this.inputKey = inputKey;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java
deleted file mode 100644
index 9281ee8..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput.java
+++ /dev/null
@@ -1,148 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@DataCache
-@Entity
-@Table(name = "NODE_OUTPUT")
-@IdClass(NodeOutput_PK.class)
-public class NodeOutput implements Serializable {
-    @Id
-    @Column(name = "NODE_INSTANCE_ID")
-    private String nodeId;
-    @Id
-    @Column(name = "OUTPUT_KEY")
-    private String outputKey;
-    @Column(name = "DATA_TYPE")
-    private String dataType;
-    @Column(name = "VALUE")
-    private String value;
-    @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 = "NODE_INSTANCE_ID")
-    private WorkflowNodeDetail node;
-
-    public String getNodeId() {
-        return nodeId;
-    }
-
-    public void setNodeId(String nodeId) {
-        this.nodeId = nodeId;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public WorkflowNodeDetail getNode() {
-        return node;
-    }
-
-    public void setNode(WorkflowNodeDetail node) {
-        this.node = node;
-    }
-
-    public String getOutputKey() {
-        return outputKey;
-    }
-
-    public void setOutputKey(String outputKey) {
-        this.outputKey = outputKey;
-    }
-
-    public String getDataType() {
-        return dataType;
-    }
-
-    public void setDataType(String dataType) {
-        this.dataType = dataType;
-    }
-
-    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/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput_PK.java
deleted file mode 100644
index 84fded8..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/NodeOutput_PK.java
+++ /dev/null
@@ -1,64 +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.persistance.registry.jpa.model;
-
-import java.io.Serializable;
-
-public class NodeOutput_PK implements Serializable {
-    private String nodeId;
-    private String outputKey;
-
-    public NodeOutput_PK(String nodeId, String outputKey) {
-        this.nodeId = nodeId;
-        this.outputKey = outputKey;
-    }
-
-    public NodeOutput_PK() {
-        ;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-
-    public String getNodeId() {
-        return nodeId;
-    }
-
-    public void setNodeId(String nodeId) {
-        this.nodeId = nodeId;
-    }
-
-    public String getOutputKey() {
-        return outputKey;
-    }
-
-    public void setOutputKey(String outputKey) {
-        this.outputKey = outputKey;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Notification_Email.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Notification_Email.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Notification_Email.java
deleted file mode 100644
index 524994e..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Notification_Email.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@DataCache
-@Entity
-@Table(name ="NOTIFICATION_EMAIL")
-public class Notification_Email implements Serializable {
-    @Id
-    @GeneratedValue
-    private int emailId;
-    @Column(name = "EXPERIMENT_ID")
-    private String experiment_id;
-    @Column(name = "TASK_ID")
-    private String taskId;
-    @Column(name = "EMAIL_ADDRESS")
-    private String emailAddress;
-
-    @ManyToOne
-    @JoinColumn(name = "EXPERIMENT_ID")
-    private Experiment experiment;
-    @ManyToOne
-    @JoinColumn(name = "TASK_ID")
-    private TaskDetail taskDetail;
-
-    public String getExperiment_id() {
-        return experiment_id;
-    }
-
-    public void setExperiment_id(String experiment_id) {
-        this.experiment_id = experiment_id;
-    }
-
-    public Experiment getExperiment() {
-        return experiment;
-    }
-
-    public void setExperiment(Experiment experiment) {
-        this.experiment = experiment;
-    }
-
-    public String getEmailAddress() {
-        return emailAddress;
-    }
-
-    public void setEmailAddress(String emailAddress) {
-        this.emailAddress = emailAddress;
-    }
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-
-    public TaskDetail getTaskDetail() {
-        return taskDetail;
-    }
-
-    public void setTaskDetail(TaskDetail taskDetail) {
-        this.taskDetail = taskDetail;
-    }
-
-    public int getEmailId() {
-        return emailId;
-    }
-
-    public void setEmailId(int emailId) {
-        this.emailId = emailId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Project.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Project.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Project.java
deleted file mode 100644
index 054411d..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Project.java
+++ /dev/null
@@ -1,125 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.sql.Timestamp;
-
-@DataCache
-@Entity
-@Table(name ="PROJECT")
-public class Project implements Serializable {
-    @Id
-    @Column(name = "PROJECT_ID")
-    private String project_id;
-
-    @Column(name = "GATEWAY_ID")
-    private String gateway_id;
-
-    @Column(name = "PROJECT_NAME")
-    private String project_name;
-
-    @Column(name = "DESCRIPTION")
-    private String description;
-
-    @Column(name = "USER_NAME")
-    private String user_name;
-
-    @Column(name = "CREATION_TIME")
-    private Timestamp creationTime;
-
-    @ManyToOne(cascade=CascadeType.MERGE)
-    @JoinColumn(name = "GATEWAY_ID")
-    private Gateway gateway;
-
-    @ManyToOne(cascade=CascadeType.MERGE)
-    @JoinColumn(name = "USER_NAME")
-    private Users users;
-
-
-    public String getProject_name() {
-        return project_name;
-    }
-
-    public Gateway getGateway() {
-        return gateway;
-    }
-
-    public void setProject_name(String project_name) {
-        this.project_name = project_name;
-    }
-
-    public void setGateway(Gateway gateway) {
-        this.gateway = gateway;
-    }
-
-    public Users getUsers() {
-        return users;
-    }
-
-    public void setUsers(Users users) {
-        this.users = users;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public void setProject_id(String project_id) {
-        this.project_id = project_id;
-    }
-
-    public String getProject_id() {
-        return project_id;
-    }
-
-    public String getUser_name() {
-        return user_name;
-    }
-
-    public void setUser_name(String user_name) {
-        this.user_name = user_name;
-    }
-
-    public String getGateway_id() {
-        return gateway_id;
-    }
-
-    public void setGateway_id(String gateway_id) {
-        this.gateway_id = gateway_id;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java
deleted file mode 100644
index 5b930d1..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java
+++ /dev/null
@@ -1,81 +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.persistance.registry.jpa.model;
-
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@DataCache
-@Entity
-@IdClass(ProjectUser_PK.class)
-@Table(name = "PROJECT_USER")
-public class ProjectUser implements Serializable {
-    @Id
-    @Column(name = "PROJECT_ID")
-    private String projectID;
-    @Id
-    @Column(name = "USER_NAME")
-    private String userName;
-
-    @ManyToOne(cascade=CascadeType.MERGE)
-    @JoinColumn(name = "PROJECT_ID")
-    private Project project;
-
-    @ManyToOne(cascade=CascadeType.MERGE)
-    @JoinColumn(name = "USER_NAME")
-    private Users user;
-
-    public String getProjectId() {
-        return projectID;
-    }
-
-    public void setProjectId(String projectID) {
-        this.projectID = projectID;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public Project getProject() {
-        return project;
-    }
-
-    public void setProject(Project project) {
-        this.project = project;
-    }
-
-    public Users getUser() {
-        return user;
-    }
-
-    public void setUser(Users user) {
-        this.user = user;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java
deleted file mode 100644
index e3eff9c..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java
+++ /dev/null
@@ -1,64 +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.persistance.registry.jpa.model;
-
-import java.io.Serializable;
-
-public class ProjectUser_PK implements Serializable {
-    private String projectID;
-    private String userName;
-
-    public ProjectUser_PK(String projectID, String userName) {
-        this.projectID = projectID;
-        this.userName = userName;
-    }
-
-    public ProjectUser_PK() {
-        ;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-
-    public String getProjectId() {
-        return projectID;
-    }
-
-    public void setProjectId(String projectID) {
-        this.projectID = projectID;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-}


[04/44] airavata git commit: Changing the thrift model variable names to lower camel case

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-application-specific-handlers/src/main/java/org/apache/airavata/application/gaussian/handler/GaussianHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-application-specific-handlers/src/main/java/org/apache/airavata/application/gaussian/handler/GaussianHandler.java b/modules/gfac/gfac-application-specific-handlers/src/main/java/org/apache/airavata/application/gaussian/handler/GaussianHandler.java
index 0d21665..74fef47 100644
--- a/modules/gfac/gfac-application-specific-handlers/src/main/java/org/apache/airavata/application/gaussian/handler/GaussianHandler.java
+++ b/modules/gfac/gfac-application-specific-handlers/src/main/java/org/apache/airavata/application/gaussian/handler/GaussianHandler.java
@@ -75,20 +75,20 @@ public class GaussianHandler extends AbstractHandler {
                     ComputationalResourceScheduling taskScheduling = jobExecutionContext.getTaskData().getTaskScheduling();
                     for (Map.Entry<String, String> inputConfig : configurations.entrySet()) {
                         if (inputConfig.getKey().equals(PROC_SHARED)) {
-                            taskScheduling.setTotalCPUCount(Integer.parseInt(inputConfig.getValue()));
+                            taskScheduling.setTotalCpuCount(Integer.parseInt(inputConfig.getValue()));
                         } else if (inputConfig.getKey().equals(MEM)) {
                             int userRequestedMem = Integer.parseInt(inputConfig.getValue());
                             int additionalMem = (int) (userRequestedMem * 0.2);
                             // TODO check (userRequestedMem + additionalMem)  > maxNode or Queue allowed Mem
                             taskScheduling.setTotalPhysicalMemory(userRequestedMem + additionalMem);
                         } else if (inputConfig.getKey().equals(PROC)) {
-                            taskScheduling.setTotalCPUCount(Integer.parseInt(inputConfig.getValue()));
+                            taskScheduling.setTotalCpuCount(Integer.parseInt(inputConfig.getValue()));
                         } else {
                             // TODO - handle other input configurations
                         }
                         logger.info("$$$$$$$$ " + inputConfig.getKey() + " --> " + inputConfig.getValue() + " $$$$$$$$$$$");
                     }
-                    registry.update(RegistryModelType.TASK_DETAIL, jobExecutionContext.getTaskData(), jobExecutionContext.getTaskData().getTaskID());
+                    registry.update(RegistryModelType.TASK_DETAIL, jobExecutionContext.getTaskData(), jobExecutionContext.getTaskData().getTaskId());
                 } catch (IOException e) {
                     throw new GFacHandlerException("Error while reading main input file ", e);
                 } catch (RegistryException e) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
index dad2a4d..8b42abe 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
@@ -20,24 +20,21 @@
  */
 package org.apache.airavata.gfac.bes.provider.impl;
 
-import java.util.Calendar;
-import java.util.Map;
-
+import de.fzj.unicore.bes.client.ActivityClient;
+import de.fzj.unicore.bes.client.FactoryClient;
+import de.fzj.unicore.bes.faults.UnknownActivityIdentifierFault;
+import de.fzj.unicore.uas.client.StorageClient;
+import de.fzj.unicore.wsrflite.xmlbeans.WSUtilities;
+import eu.emi.security.authn.x509.impl.X500NameUtils;
+import eu.unicore.util.httpclient.DefaultClientConfiguration;
 import org.airavata.appcatalog.cpi.AppCatalogException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.bes.security.UNICORESecurityContext;
 import org.apache.airavata.gfac.bes.security.X509SecurityContext;
-import org.apache.airavata.gfac.bes.utils.BESConstants;
-import org.apache.airavata.gfac.bes.utils.DataTransferrer;
-import org.apache.airavata.gfac.bes.utils.JSDLGenerator;
-import org.apache.airavata.gfac.bes.utils.SecurityUtils;
-import org.apache.airavata.gfac.bes.utils.StorageCreator;
+import org.apache.airavata.gfac.bes.utils.*;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
-import org.apache.airavata.gfac.core.monitor.MonitorID;
 import org.apache.airavata.gfac.core.notification.events.StartExecutionEvent;
-import org.apache.airavata.gfac.core.notification.events.StatusChangeEvent;
-import org.apache.airavata.gfac.core.notification.events.UnicoreJobIDEvent;
 import org.apache.airavata.gfac.core.provider.AbstractProvider;
 import org.apache.airavata.gfac.core.provider.GFacProvider;
 import org.apache.airavata.gfac.core.provider.GFacProviderException;
@@ -51,26 +48,16 @@ import org.apache.airavata.model.workspace.experiment.JobDetails;
 import org.apache.airavata.model.workspace.experiment.JobState;
 import org.apache.xmlbeans.XmlCursor;
 import org.bouncycastle.asn1.x500.style.BCStyle;
-import org.ggf.schemas.bes.x2006.x08.besFactory.ActivityStateEnumeration;
+import org.ggf.schemas.bes.x2006.x08.besFactory.*;
 import org.ggf.schemas.bes.x2006.x08.besFactory.ActivityStateEnumeration.Enum;
-import org.ggf.schemas.bes.x2006.x08.besFactory.ActivityStatusType;
-import org.ggf.schemas.bes.x2006.x08.besFactory.CreateActivityDocument;
-import org.ggf.schemas.bes.x2006.x08.besFactory.CreateActivityResponseDocument;
-import org.ggf.schemas.bes.x2006.x08.besFactory.GetActivityStatusesDocument;
-import org.ggf.schemas.bes.x2006.x08.besFactory.GetActivityStatusesResponseDocument;
 import org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionDocument;
 import org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.w3.x2005.x08.addressing.EndpointReferenceType;
 
-import de.fzj.unicore.bes.client.ActivityClient;
-import de.fzj.unicore.bes.client.FactoryClient;
-import de.fzj.unicore.bes.faults.UnknownActivityIdentifierFault;
-import de.fzj.unicore.uas.client.StorageClient;
-import de.fzj.unicore.wsrflite.xmlbeans.WSUtilities;
-import eu.emi.security.authn.x509.impl.X500NameUtils;
-import eu.unicore.util.httpclient.DefaultClientConfiguration;
+import java.util.Calendar;
+import java.util.Map;
 
 public class BESProvider extends AbstractProvider implements GFacProvider,
 		BESConstants {
@@ -165,7 +152,7 @@ public class BESProvider extends AbstractProvider implements GFacProvider,
                         .toString();
             }
             log.info("JobID: " + jobId);
-            jobDetails.setJobID(jobId);
+            jobDetails.setJobId(jobId);
             jobDetails.setJobDescription(activityEpr.toString());
 
             jobExecutionContext.setJobDetails(jobDetails);
@@ -205,7 +192,7 @@ public class BESProvider extends AbstractProvider implements GFacProvider,
                 sendNotification(jobExecutionContext,applicationJobStatus);
                 GFacUtils.updateJobStatus(jobExecutionContext, jobDetails, applicationJobStatus);
                 throw new GFacProviderException(
-                        jobExecutionContext.getExperimentID() + "Job Canceled");
+                        jobExecutionContext.getExperimentId() + "Job Canceled");
             } else if (activityStatus.getState() == ActivityStateEnumeration.FINISHED) {
                 try {
                     Thread.sleep(5000);
@@ -448,10 +435,10 @@ public class BESProvider extends AbstractProvider implements GFacProvider,
 	}
     private void sendNotification(JobExecutionContext jobExecutionContext,  JobState status) {
         JobStatusChangeRequestEvent jobStatus = new JobStatusChangeRequestEvent();
-        JobIdentifier jobIdentity = new JobIdentifier(jobExecutionContext.getJobDetails().getJobID(),
-        		jobExecutionContext.getTaskData().getTaskID(),
+        JobIdentifier jobIdentity = new JobIdentifier(jobExecutionContext.getJobDetails().getJobId(),
+        		jobExecutionContext.getTaskData().getTaskId(),
         		jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-        		jobExecutionContext.getExperimentID(),
+        		jobExecutionContext.getExperimentId(),
         		jobExecutionContext.getGatewayID());
         jobStatus.setJobIdentity(jobIdentity);
         jobStatus.setState(status);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java
index f2ec94e..2b64bcc 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/security/UNICORESecurityContext.java
@@ -21,11 +21,10 @@
 
 package org.apache.airavata.gfac.bes.security;
 
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Properties;
-import java.util.Set;
-
+import eu.emi.security.authn.x509.X509Credential;
+import eu.emi.security.authn.x509.impl.KeyAndCertCredential;
+import eu.emi.security.authn.x509.impl.X500NameUtils;
+import eu.unicore.util.httpclient.DefaultClientConfiguration;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.credential.store.store.CredentialReader;
@@ -39,10 +38,10 @@ import org.bouncycastle.asn1.x500.style.BCStyle;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import eu.emi.security.authn.x509.X509Credential;
-import eu.emi.security.authn.x509.impl.KeyAndCertCredential;
-import eu.emi.security.authn.x509.impl.X500NameUtils;
-import eu.unicore.util.httpclient.DefaultClientConfiguration;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
 
 public class UNICORESecurityContext extends X509SecurityContext {
 
@@ -88,7 +87,7 @@ public class UNICORESecurityContext extends X509SecurityContext {
 		try{
 			boolean genCert = userData.isGenerateCert();
 				if(genCert) {
-					String userDN = userData.getUserDN();
+					String userDN = userData.getUserDn();
 					if (userDN == null && "".equals(userDN)){
 						log.warn("Cannot generate cert, falling back to container configured MyProxy credentials");
 						return getDefaultConfiguration(enableMessageLogging);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/DataTransferrer.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/DataTransferrer.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/DataTransferrer.java
index d70e4b1..746c8bf 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/DataTransferrer.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/DataTransferrer.java
@@ -231,7 +231,7 @@ public class DataTransferrer {
 //			return outputDataDirectory;
 //		}
 		String outputDataDir = File.separator + "tmp";
-        outputDataDir = outputDataDir + File.separator + jobContext.getExperimentID();
+        outputDataDir = outputDataDir + File.separator + jobContext.getExperimentId();
         (new File(outputDataDir)).mkdirs();
 		return outputDataDir;
 	}

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/JSDLUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/JSDLUtils.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/JSDLUtils.java
index e7dc672..8cd0a4f 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/JSDLUtils.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/JSDLUtils.java
@@ -22,27 +22,10 @@
 package org.apache.airavata.gfac.bes.utils;
 
 
-import javax.xml.namespace.QName;
-
 import org.apache.commons.httpclient.URIException;
 import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlObject;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.ApplicationType;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.BoundaryType;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.CPUArchitectureType;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.CandidateHostsType;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.CreationFlagEnumeration;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.DataStagingType;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.ExactType;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionType;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDescriptionType;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.JobIdentificationType;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.OperatingSystemType;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.OperatingSystemTypeEnumeration;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.OperatingSystemTypeType;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.ProcessorArchitectureEnumeration;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.ResourcesType;
-import org.ggf.schemas.jsdl.x2005.x11.jsdl.SourceTargetType;
+import org.ggf.schemas.jsdl.x2005.x11.jsdl.*;
 import org.ggf.schemas.jsdl.x2005.x11.jsdlPosix.EnvironmentType;
 import org.ggf.schemas.jsdl.x2005.x11.jsdlPosix.POSIXApplicationDocument;
 import org.ggf.schemas.jsdl.x2005.x11.jsdlPosix.POSIXApplicationType;
@@ -51,6 +34,8 @@ import org.ggf.schemas.jsdl.x2006.x07.jsdlHpcpa.HPCProfileApplicationType;
 import org.ogf.schemas.jsdl.x2007.x02.jsdlSpmd.SPMDApplicationDocument;
 import org.ogf.schemas.jsdl.x2007.x02.jsdlSpmd.SPMDApplicationType;
 
+import javax.xml.namespace.QName;
+
 
 /**
  * 
@@ -414,7 +399,7 @@ public class JSDLUtils
 	
 	
 
-	public static RangeValueType getTotalCPUCountRequirements(JobDefinitionType value) {
+	public static RangeValueType getTotalCpuCountRequirements(JobDefinitionType value) {
 		if(value != null && value.getJobDescription() != null && value.getJobDescription().isSetResources() && 
 				value.getJobDescription().getResources().isSetTotalCPUCount()){
 			return toU6RangeValue(value.getJobDescription().getResources().getTotalCPUCount());
@@ -530,7 +515,7 @@ public class JSDLUtils
 		}
 	}
 
-	public static void setTotalCPUCountRequirements(JobDefinitionType value, RangeValueType cpuCount) {
+	public static void setTotalCpuCountRequirements(JobDefinitionType value, RangeValueType cpuCount) {
 		org.ggf.schemas.jsdl.x2005.x11.jsdl.RangeValueType cpuTotalCount = getOrCreateTotalCPUCount(value);        
 		setRangeValue(cpuCount, cpuTotalCount);
 	}

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/ResourceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/ResourceProcessor.java b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/ResourceProcessor.java
index cc3ad8b..984bd6c 100644
--- a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/ResourceProcessor.java
+++ b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/utils/ResourceProcessor.java
@@ -56,7 +56,7 @@ public class ResourceProcessor {
 					rangeType.setExact(crs.getNodeCount());
 					JSDLUtils.setTotalResourceCountRequirements(value, rangeType);
 					// set totalcpu count to -1 as we dont need that
-					crs.setTotalCPUCount(0);
+					crs.setTotalCpuCount(0);
 				}
 	
 				if(crs.getWallTimeLimit() > 0) {
@@ -68,12 +68,12 @@ public class ResourceProcessor {
 					JSDLUtils.setIndividualCPUTimeRequirements(value, cpuTime);
 				}
 				
-				if(crs.getTotalCPUCount() > 0) {
+				if(crs.getTotalCpuCount() > 0) {
 					RangeValueType rangeType = new RangeValueType();
 					rangeType.setLowerBound(Double.NaN);
 					rangeType.setUpperBound(Double.NaN);
-					rangeType.setExact(crs.getTotalCPUCount());
-					JSDLUtils.setTotalCPUCountRequirements(value, rangeType);
+					rangeType.setExact(crs.getTotalCpuCount());
+					JSDLUtils.setTotalCpuCountRequirements(value, rangeType);
 				}
 				
 			} catch (NullPointerException npe) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
index 6a8dd5f..08e58db 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
@@ -201,11 +201,11 @@ public class JobExecutionContext extends AbstractContext implements Serializable
         }
     }
 
-    public String getExperimentID() {
+    public String getExperimentId() {
         return experimentID;
     }
 
-    public void setExperimentID(String experimentID) {
+    public void setExperimentId(String experimentID) {
         this.experimentID = experimentID;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
index bf0e42e..3aa2c8d 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
@@ -36,7 +36,10 @@ import org.apache.airavata.gfac.Scheduler;
 import org.apache.airavata.gfac.core.context.ApplicationContext;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.context.MessageContext;
-import org.apache.airavata.gfac.core.handler.*;
+import org.apache.airavata.gfac.core.handler.GFacHandler;
+import org.apache.airavata.gfac.core.handler.GFacHandlerConfig;
+import org.apache.airavata.gfac.core.handler.GFacHandlerException;
+import org.apache.airavata.gfac.core.handler.ThreadedHandler;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
 import org.apache.airavata.gfac.core.monitor.state.GfacExperimentStateChangeRequest;
 import org.apache.airavata.gfac.core.notification.events.ExecutionFailEvent;
@@ -62,7 +65,6 @@ import org.apache.airavata.registry.cpi.Registry;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.apache.airavata.registry.cpi.RegistryModelType;
 import org.apache.zookeeper.*;
-import org.apache.zookeeper.data.Stat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xml.sax.SAXException;
@@ -214,9 +216,9 @@ public class BetterGfacImpl implements GFac,Watcher {
             // task status will cause to update Experiment status. Remove this chained update approach and fix this correctly (update experiment status)
             if(jobExecutionContext!=null){
                 monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.FAILED));
-                TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+                TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskId(),
                         jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                        jobExecutionContext.getExperimentID(),
+                        jobExecutionContext.getExperimentId(),
                         jobExecutionContext.getGatewayID());
                 TaskStatusChangeRequestEvent event = new TaskStatusChangeRequestEvent(TaskState.FAILED, taskIdentity);
                 monitorPublisher.publish(event);
@@ -284,7 +286,7 @@ public class BetterGfacImpl implements GFac,Watcher {
         // setting experiment/task/workflownode related information
         Experiment experiment = (Experiment) registry.get(RegistryModelType.EXPERIMENT, experimentID);
         jobExecutionContext.setExperiment(experiment);
-        jobExecutionContext.setExperimentID(experimentID);
+        jobExecutionContext.setExperimentId(experimentID);
         jobExecutionContext.setWorkflowNodeDetails(experiment.getWorkflowNodeDetailsList().get(0));
         jobExecutionContext.setTaskData(taskData);
         jobExecutionContext.setGatewayID(gatewayID);
@@ -430,7 +432,7 @@ public class BetterGfacImpl implements GFac,Watcher {
         /**
          * Working dir
          */
-        String workingDir = scratchLocation + File.separator + jobExecutionContext.getExperimentID();
+        String workingDir = scratchLocation + File.separator + jobExecutionContext.getExperimentId();
         jobExecutionContext.setWorkingDir(workingDir);
 
             /*
@@ -498,7 +500,7 @@ public class BetterGfacImpl implements GFac,Watcher {
             } else if (isCompletedJob(gfacExpState)) {
                 log.info("There is nothing to recover in this job so we do not re-submit");
                 ZKUtil.deleteRecursive(zk,
-                        AiravataZKUtils.getExpZnodePath(jobExecutionContext.getExperimentID()));
+                        AiravataZKUtils.getExpZnodePath(jobExecutionContext.getExperimentId()));
             } else {
                 // Now we know this is an old Job, so we have to handle things gracefully
                 log.info("Re-launching the job in GFac because this is re-submitted to GFac");
@@ -570,12 +572,12 @@ public class BetterGfacImpl implements GFac,Watcher {
                 }
             }else if (gfacExpState == GfacExperimentState.INHANDLERSINVOKING || gfacExpState == GfacExperimentState.INHANDLERSINVOKED || gfacExpState == GfacExperimentState.OUTHANDLERSINVOKING){
                 log.info("Experiment should be immedietly cancelled");
-                GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentID(), ExperimentState.CANCELED);
+                GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentId(), ExperimentState.CANCELED);
 
             }
             return true;
             }catch(Exception e){
-                log.error("Error occured while cancelling job for experiment : " + jobExecutionContext.getExperimentID(), e);
+                log.error("Error occured while cancelling job for experiment : " + jobExecutionContext.getExperimentId(), e);
                 throw new GFacException(e.getMessage(), e);
             }finally{
                 closeZK(jobExecutionContext);
@@ -586,7 +588,7 @@ public class BetterGfacImpl implements GFac,Watcher {
 		// Scheduler will decide the execution flow of handlers and provider
 		// which handles
 		// the job.
-		String experimentID = jobExecutionContext.getExperimentID();
+		String experimentID = jobExecutionContext.getExperimentId();
 		try {
 			Scheduler.schedule(jobExecutionContext);
 
@@ -625,13 +627,13 @@ public class BetterGfacImpl implements GFac,Watcher {
                     break;
                 case OUTHANDLERSINVOKED:
                 case COMPLETED:
-                    GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentID(), ExperimentState.COMPLETED);
+                    GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentId(), ExperimentState.COMPLETED);
                     break;
                 case FAILED:
-                    GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentID(), ExperimentState.FAILED);
+                    GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentId(), ExperimentState.FAILED);
                     break;
                 case UNKNOWN:
-                    log.info("All output handlers are invoked successfully, ExperimentId: " + experimentID + " taskId: " + jobExecutionContext.getTaskData().getTaskID());
+                    log.info("All output handlers are invoked successfully, ExperimentId: " + experimentID + " taskId: " + jobExecutionContext.getTaskData().getTaskId());
                     break;
                 default:
                     throw new GFacException("Un-handled GfacExperimentState : " + state.name());
@@ -642,18 +644,18 @@ public class BetterGfacImpl implements GFac,Watcher {
 				// we make the experiment as failed due to exception scenario
 				monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.FAILED));
                 JobIdentifier jobIdentity = new JobIdentifier(
-                        jobExecutionContext.getJobDetails().getJobID(), jobExecutionContext.getTaskData().getTaskID(),
+                        jobExecutionContext.getJobDetails().getJobId(), jobExecutionContext.getTaskData().getTaskId(),
                         jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                        jobExecutionContext.getExperimentID(),
+                        jobExecutionContext.getExperimentId(),
                         jobExecutionContext.getGatewayID());
 				monitorPublisher.publish(new JobStatusChangeEvent(JobState.FAILED, jobIdentity));
                 GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR );
 			} catch (NullPointerException e1) {
 				log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, "
 						+ "NullPointerException occurred because at this point there might not have Job Created", e1, e);
-                TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+                TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskId(),
                         jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                        jobExecutionContext.getExperimentID(),
+                        jobExecutionContext.getExperimentId(),
                         jobExecutionContext.getGatewayID());
 				monitorPublisher.publish(new TaskStatusChangeEvent(TaskState.FAILED, taskIdentity));
                 GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR );
@@ -699,7 +701,7 @@ public class BetterGfacImpl implements GFac,Watcher {
                 return; // if the job is cancelled, status change is handled in cancel operation this thread simply has to be returned
             }
             // if (experimentID != null){
-			// registry2.changeStatus(jobExecutionContext.getExperimentID(),AiravataJobState.State.INHANDLERSDONE);
+			// registry2.changeStatus(jobExecutionContext.getExperimentId(),AiravataJobState.State.INHANDLERSDONE);
 			// }
 
 			// After executing the in handlers provider instance should be set
@@ -718,28 +720,28 @@ public class BetterGfacImpl implements GFac,Watcher {
 				monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.FAILED));
 				// monitorPublisher.publish(new
 				// ExperimentStatusChangedEvent(new
-				// ExperimentIdentity(jobExecutionContext.getExperimentID()),
+				// ExperimentIdentity(jobExecutionContext.getExperimentId()),
 				// ExperimentState.FAILED));
 				// Updating the task status if there's any task associated
 				// monitorPublisher.publish(new TaskStatusChangeRequest(
-				// new TaskIdentity(jobExecutionContext.getExperimentID(),
+				// new TaskIdentity(jobExecutionContext.getExperimentId(),
 				// jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-				// jobExecutionContext.getTaskData().getTaskID()),
+				// jobExecutionContext.getTaskData().getTaskId()),
 				// TaskState.FAILED
 				// ));
                 JobIdentifier jobIdentity = new JobIdentifier(
-                        jobExecutionContext.getJobDetails().getJobID(),jobExecutionContext.getTaskData().getTaskID(),jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                        jobExecutionContext.getExperimentID(),
+                        jobExecutionContext.getJobDetails().getJobId(),jobExecutionContext.getTaskData().getTaskId(),jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
+                        jobExecutionContext.getExperimentId(),
                         jobExecutionContext.getGatewayID());
 				monitorPublisher.publish(new JobStatusChangeEvent(JobState.FAILED, jobIdentity));
 			} catch (NullPointerException e1) {
 				log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, "
 						+ "NullPointerException occurred because at this point there might not have Job Created", e1, e);
-				//monitorPublisher.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()), ExperimentState.FAILED));
+				//monitorPublisher.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentId()), ExperimentState.FAILED));
 				// Updating the task status if there's any task associated
-                TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+                TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskId(),
                         jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                        jobExecutionContext.getExperimentID(),
+                        jobExecutionContext.getExperimentId(),
                         jobExecutionContext.getGatewayID());
                 monitorPublisher.publish(new TaskStatusChangeEvent(TaskState.FAILED, taskIdentity));
 
@@ -932,7 +934,7 @@ public class BetterGfacImpl implements GFac,Watcher {
                 synchronized (mutex) {
                     mutex.wait(5000);  // waiting for the syncConnected event
                 }
-                experimentPath = AiravataZKUtils.getExpZnodePath(jobExecutionContext.getExperimentID());
+                experimentPath = AiravataZKUtils.getExpZnodePath(jobExecutionContext.getExperimentId());
                 if (jobExecutionContext.getZk().exists(experimentPath, false) == null) {
                     log.error("Experiment is already finalized so no output handlers will be invoked");
                     return;
@@ -953,8 +955,8 @@ public class BetterGfacImpl implements GFac,Watcher {
                 handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
             } else {
                 try {
-                    jobExecutionContext = createJEC(jobExecutionContext.getExperimentID(),
-                            jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+                    jobExecutionContext = createJEC(jobExecutionContext.getExperimentId(),
+                            jobExecutionContext.getTaskData().getTaskId(), jobExecutionContext.getGatewayID());
                 } catch (Exception e) {
                     log.error("Error constructing job execution context during outhandler invocation");
                     throw new GFacException(e);
@@ -1016,12 +1018,12 @@ public class BetterGfacImpl implements GFac,Watcher {
         // At this point all the execution is finished so we update the task and experiment statuses.
         // Handler authors does not have to worry about updating experiment or task statuses.
 //        monitorPublisher.publish(new
-//                ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()),
+//                ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentId()),
 //                ExperimentState.COMPLETED));
         // Updating the task status if there's any task associated
-        TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+        TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskId(),
                 jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                jobExecutionContext.getExperimentID(),
+                jobExecutionContext.getExperimentId(),
                 jobExecutionContext.getGatewayID());
         monitorPublisher.publish(new TaskStatusChangeEvent(TaskState.COMPLETED, taskIdentity));
         monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.COMPLETED));
@@ -1101,8 +1103,8 @@ public class BetterGfacImpl implements GFac,Watcher {
             handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
         } else {
             try {
-                jobExecutionContext = createJEC(jobExecutionContext.getExperimentID(),
-                        jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+                jobExecutionContext = createJEC(jobExecutionContext.getExperimentId(),
+                        jobExecutionContext.getTaskData().getTaskId(), jobExecutionContext.getGatewayID());
             } catch (Exception e) {
                 log.error("Error constructing job execution context during outhandler invocation");
                 throw new GFacException(e);
@@ -1176,13 +1178,13 @@ public class BetterGfacImpl implements GFac,Watcher {
         // At this point all the execution is finished so we update the task and experiment statuses.
         // Handler authors does not have to worry about updating experiment or task statuses.
 //        monitorPublisher.publish(new
-//                ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()),
+//                ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentId()),
 //                ExperimentState.COMPLETED));
         // Updating the task status if there's any task associated
 
-        TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+        TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskId(),
                 jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                jobExecutionContext.getExperimentID(),
+                jobExecutionContext.getExperimentId(),
                 jobExecutionContext.getGatewayID());
         monitorPublisher.publish(new TaskStatusChangeEvent(TaskState.COMPLETED, taskIdentity));
         monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext), GfacExperimentState.COMPLETED));
@@ -1225,7 +1227,7 @@ public class BetterGfacImpl implements GFac,Watcher {
     public boolean isCancelled(JobExecutionContext executionContext){
         // we should check whether experiment is cancelled using registry
         try {
-            ExperimentStatus status = (ExperimentStatus)registry.get(RegistryModelType.EXPERIMENT_STATUS, executionContext.getExperimentID());
+            ExperimentStatus status = (ExperimentStatus)registry.get(RegistryModelType.EXPERIMENT_STATUS, executionContext.getExperimentId());
             if (status != null){
                 ExperimentState experimentState = status.getExperimentState();
                 if (experimentState != null){
@@ -1243,7 +1245,7 @@ public class BetterGfacImpl implements GFac,Watcher {
     public boolean isCancelling(JobExecutionContext executionContext){
         // check whether cancelling request came
         try {
-            ExperimentStatus status = (ExperimentStatus)registry.get(RegistryModelType.EXPERIMENT_STATUS, executionContext.getExperimentID());
+            ExperimentStatus status = (ExperimentStatus)registry.get(RegistryModelType.EXPERIMENT_STATUS, executionContext.getExperimentId());
             if (status != null){
                 ExperimentState experimentState = status.getExperimentState();
                 if (experimentState != null){
@@ -1260,7 +1262,7 @@ public class BetterGfacImpl implements GFac,Watcher {
 
     public boolean isCancel(JobExecutionContext jobExecutionContext) {
         try {
-            ExperimentStatus status = (ExperimentStatus) registry.get(RegistryModelType.EXPERIMENT_STATUS, jobExecutionContext.getExperimentID());
+            ExperimentStatus status = (ExperimentStatus) registry.get(RegistryModelType.EXPERIMENT_STATUS, jobExecutionContext.getExperimentId());
             if (status != null) {
                 ExperimentState experimentState = status.getExperimentState();
                 if (experimentState != null) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
index c764b63..a08219e 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
@@ -264,7 +264,7 @@
 //        // setting experiment/task/workflownode related information
 //        Experiment experiment = (Experiment) registry.get(RegistryModelType.EXPERIMENT, experimentID);
 //        jobExecutionContext.setExperiment(experiment);
-//        jobExecutionContext.setExperimentID(experimentID);
+//        jobExecutionContext.setExperimentId(experimentID);
 //        jobExecutionContext.setWorkflowNodeDetails(experiment.getWorkflowNodeDetailsList().get(0));
 //        jobExecutionContext.setTaskData(taskData);
 //
@@ -339,18 +339,18 @@
 //        }catch (Exception e) {
 //            try {
 //                monitorPublisher.publish(new JobStatusChangeRequest(new MonitorID(jobExecutionContext),
-//                        new JobIdentity(jobExecutionContext.getExperimentID(),
+//                        new JobIdentity(jobExecutionContext.getExperimentId(),
 //                                jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-//                                jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getJobDetails().getJobID()), JobState.FAILED));
+//                                jobExecutionContext.getTaskData().getTaskId(), jobExecutionContext.getJobDetails().getJobId()), JobState.FAILED));
 //            } catch (NullPointerException e1) {
 //                log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, " +
 //                        "NullPointerException occurred because at this point there might not have Job Created", e1, e);
 //                // Updating status if job id is not set
 ////				monitorPublisher
-////						.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()), ExperimentState.FAILED));
+////						.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentId()), ExperimentState.FAILED));
 //                // Updating the task status if there's any task associated
-//                monitorPublisher.publish(new TaskStatusChangedEvent(new TaskIdentity(jobExecutionContext.getExperimentID(), jobExecutionContext
-//                        .getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getTaskData().getTaskID()), TaskState.FAILED));
+//                monitorPublisher.publish(new TaskStatusChangedEvent(new TaskIdentity(jobExecutionContext.getExperimentId(), jobExecutionContext
+//                        .getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getTaskData().getTaskId()), TaskState.FAILED));
 //
 //            }
 //            jobExecutionContext.setProperty(ERROR_SENT, "true");
@@ -363,14 +363,14 @@
 //    private void schedule(JobExecutionContext jobExecutionContext) throws GFacException {
 //        // Scheduler will decide the execution flow of handlers and provider which handles
 //        // the job.
-//        String experimentID = jobExecutionContext.getExperimentID();
+//        String experimentID = jobExecutionContext.getExperimentId();
 //        try {
 //            Scheduler.schedule(jobExecutionContext);
 //
 //            // Executing in handlers in the order as they have configured in GFac configuration
 //            invokeInFlowHandlers(jobExecutionContext);
 ////            if (experimentID != null){
-////                registry2.changeStatus(jobExecutionContext.getExperimentID(),AiravataJobState.State.INHANDLERSDONE);
+////                registry2.changeStatus(jobExecutionContext.getExperimentId(),AiravataJobState.State.INHANDLERSDONE);
 ////            }
 ////        }catch (ClassNotFoundException e) {
 ////            log.error("Error loading the listener classes configured in airavata-server.properties",e);
@@ -502,7 +502,7 @@
 ////        // setting experiment/task/workflownode related information
 ////        Experiment experiment = (Experiment) registry.get(RegistryModelType.EXPERIMENT, experimentID);
 ////        jobExecutionContext.setExperiment(experiment);
-////        jobExecutionContext.setExperimentID(experimentID);
+////        jobExecutionContext.setExperimentId(experimentID);
 ////        jobExecutionContext.setWorkflowNodeDetails(experiment.getWorkflowNodeDetailsList().get(0));
 ////        jobExecutionContext.setTaskData(taskData);
 ////
@@ -577,18 +577,18 @@
 ////        }catch (Exception e) {
 ////            try {
 ////                monitorPublisher.publish(new JobStatusChangeRequest(new MonitorID(jobExecutionContext),
-////                        new JobIdentity(jobExecutionContext.getExperimentID(),
+////                        new JobIdentity(jobExecutionContext.getExperimentId(),
 ////                                jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-////                                jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getJobDetails().getJobID()), JobState.FAILED));
+////                                jobExecutionContext.getTaskData().getTaskId(), jobExecutionContext.getJobDetails().getJobId()), JobState.FAILED));
 ////            } catch (NullPointerException e1) {
 ////                log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, " +
 ////                        "NullPointerException occurred because at this point there might not have Job Created", e1, e);
 ////                // Updating status if job id is not set
 //////				monitorPublisher
-//////						.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()), ExperimentState.FAILED));
+//////						.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentId()), ExperimentState.FAILED));
 ////                // Updating the task status if there's any task associated
-////                monitorPublisher.publish(new TaskStatusChangedEvent(new TaskIdentity(jobExecutionContext.getExperimentID(), jobExecutionContext
-////                        .getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getTaskData().getTaskID()), TaskState.FAILED));
+////                monitorPublisher.publish(new TaskStatusChangedEvent(new TaskIdentity(jobExecutionContext.getExperimentId(), jobExecutionContext
+////                        .getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getTaskData().getTaskId()), TaskState.FAILED));
 ////
 ////            }
 ////            jobExecutionContext.setProperty(ERROR_SENT, "true");
@@ -601,14 +601,14 @@
 ////    private void schedule(JobExecutionContext jobExecutionContext) throws GFacException {
 ////        // Scheduler will decide the execution flow of handlers and provider which handles
 ////        // the job.
-////        String experimentID = jobExecutionContext.getExperimentID();
+////        String experimentID = jobExecutionContext.getExperimentId();
 ////        try {
 ////            Scheduler.schedule(jobExecutionContext);
 ////
 ////            // Executing in handlers in the order as they have configured in GFac configuration
 ////            invokeInFlowHandlers(jobExecutionContext);
 //////            if (experimentID != null){
-//////                registry2.changeStatus(jobExecutionContext.getExperimentID(),AiravataJobState.State.INHANDLERSDONE);
+//////                registry2.changeStatus(jobExecutionContext.getExperimentId(),AiravataJobState.State.INHANDLERSDONE);
 //////            }
 ////
 ////            // After executing the in handlers provider instance should be set to job execution context.
@@ -625,18 +625,18 @@
 ////        } catch (Exception e) {
 ////            try {
 ////                monitorPublisher.publish(new JobStatusChangeRequest(new MonitorID(jobExecutionContext),
-////                        new JobIdentity(jobExecutionContext.getExperimentID(),
+////                        new JobIdentity(jobExecutionContext.getExperimentId(),
 ////                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-////                        jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getJobDetails().getJobID()), JobState.FAILED));
+////                        jobExecutionContext.getTaskData().getTaskId(), jobExecutionContext.getJobDetails().getJobId()), JobState.FAILED));
 ////            } catch (NullPointerException e1) {
 ////                log.error("Error occured during updating the statuses of Experiments,tasks or Job statuses to failed, " +
 ////                        "NullPointerException occurred because at this point there might not have Job Created", e1, e);
 ////                // Updating status if job id is not set
 //////				monitorPublisher
-//////						.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()), ExperimentState.FAILED));
+//////						.publish(new ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentId()), ExperimentState.FAILED));
 ////				// Updating the task status if there's any task associated
-////				monitorPublisher.publish(new TaskStatusChangedEvent(new TaskIdentity(jobExecutionContext.getExperimentID(), jobExecutionContext
-////						.getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getTaskData().getTaskID()), TaskState.FAILED));
+////				monitorPublisher.publish(new TaskStatusChangedEvent(new TaskIdentity(jobExecutionContext.getExperimentId(), jobExecutionContext
+////						.getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getTaskData().getTaskId()), TaskState.FAILED));
 ////
 ////            }
 ////            jobExecutionContext.setProperty(ERROR_SENT, "true");
@@ -720,8 +720,8 @@
 ////         handlers = jobExecutionContext.getGFacConfiguration().getOutHandlers();
 ////        }else {
 ////            try {
-////                jobExecutionContext = createJEC(jobExecutionContext.getExperimentID(),
-////                        jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+////                jobExecutionContext = createJEC(jobExecutionContext.getExperimentId(),
+////                        jobExecutionContext.getTaskData().getTaskId(), jobExecutionContext.getGatewayID());
 ////            } catch (Exception e) {
 ////                log.error("Error constructing job execution context during outhandler invocation");
 ////                throw new GFacException(e);
@@ -757,13 +757,13 @@
 ////        // At this point all the execution is finished so we update the task and experiment statuses.
 ////        // Handler authors does not have to worry about updating experiment or task statuses.
 //////        monitorPublisher.publish(new
-//////                ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentID()),
+//////                ExperimentStatusChangedEvent(new ExperimentIdentity(jobExecutionContext.getExperimentId()),
 //////                ExperimentState.COMPLETED));
 ////        // Updating the task status if there's any task associated
 ////        monitorPublisher.publish(new TaskStatusChangeRequest(
-////                new TaskIdentity(jobExecutionContext.getExperimentID(),
+////                new TaskIdentity(jobExecutionContext.getExperimentId(),
 ////                        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-////                        jobExecutionContext.getTaskData().getTaskID()), TaskState.COMPLETED
+////                        jobExecutionContext.getTaskData().getTaskId()), TaskState.COMPLETED
 ////        ));
 ////    }
 ////

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
index ee28c1d..242e658 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/handler/AbstractHandler.java
@@ -78,9 +78,9 @@ public abstract class AbstractHandler implements GFacHandler {
     }
 
     protected void fireTaskOutputChangeEvent(JobExecutionContext jobExecutionContext, List<OutputDataObjectType> outputArray) {
-        TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+        TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskId(),
                 jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                jobExecutionContext.getExperimentID(),
+                jobExecutionContext.getExperimentId(),
                 jobExecutionContext.getGatewayID());
         publisher.publish(new TaskOutputChangeEvent(outputArray, taskIdentity));
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataJobStatusUpdator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataJobStatusUpdator.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataJobStatusUpdator.java
index 0af8df0..b29081c 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataJobStatusUpdator.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataJobStatusUpdator.java
@@ -98,7 +98,7 @@ public class AiravataJobStatusUpdator implements AbstractActivityListener {
         }
         status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
         details.setJobStatus(status);
-        details.setJobID(jobID);
+        details.setJobId(jobID);
         logger.debug("Updating job status for "+jobID+":"+details.getJobStatus().toString());
         airavataRegistry.update(RegistryModelType.JOB_STATUS, status, ids);
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/ExperimentIdentity.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/ExperimentIdentity.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/ExperimentIdentity.java
index dd1d9d8..9fdda87 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/ExperimentIdentity.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/ExperimentIdentity.java
@@ -24,13 +24,13 @@
 //public class ExperimentIdentity {
 //	private String experimentID;
 //	public ExperimentIdentity(String experimentId) {
-//		setExperimentID(experimentId);
+//		setExperimentId(experimentId);
 //	}
-//	public String getExperimentID() {
+//	public String getExperimentId() {
 //		return experimentID;
 //	}
 //
-//	public void setExperimentID(String experimentID) {
+//	public void setExperimentId(String experimentID) {
 //		this.experimentID = experimentID;
 //	}
 //}

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/GfacInternalStatusUpdator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/GfacInternalStatusUpdator.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/GfacInternalStatusUpdator.java
index 836e2c6..e236c4a 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/GfacInternalStatusUpdator.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/GfacInternalStatusUpdator.java
@@ -54,7 +54,7 @@ public class GfacInternalStatusUpdator implements AbstractActivityListener, Watc
         MonitorID monitorID = statusChangeRequest.getMonitorID();
         String experimentNode = ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_EXPERIMENT_NODE, "/gfac-experiments");
         String experimentPath = experimentNode + File.separator + ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_SERVER_NAME)
-                + File.separator + statusChangeRequest.getMonitorID().getExperimentID();
+                + File.separator + statusChangeRequest.getMonitorID().getExperimentId();
         Stat exists = null;
         if(!(GfacExperimentState.COMPLETED.equals(statusChangeRequest.getState()) || GfacExperimentState.FAILED.equals(statusChangeRequest.getState()))) {
             try {
@@ -94,11 +94,11 @@ public class GfacInternalStatusUpdator implements AbstractActivityListener, Watc
         }
         switch (statusChangeRequest.getState()) {
             case COMPLETED:
-                logger.info("Experiment Completed, So removing the ZK entry for the experiment" + monitorID.getExperimentID());
+                logger.info("Experiment Completed, So removing the ZK entry for the experiment" + monitorID.getExperimentId());
                 logger.info("Zookeeper experiment Path: " + experimentPath);
                 break;
             case FAILED:
-                logger.info("Experiment Failed, So removing the ZK entry for the experiment" + monitorID.getExperimentID());
+                logger.info("Experiment Failed, So removing the ZK entry for the experiment" + monitorID.getExperimentId());
                 logger.info("Zookeeper experiment Path: " + experimentPath);
                 break;
             default:

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java
index aefe490..d1cb0e3 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/MonitorID.java
@@ -69,9 +69,9 @@ public class MonitorID {
         this.computeResourceDescription = monitorID.getComputeResourceDescription();
         this.jobStartedTime = new Timestamp((new Date()).getTime());
         this.userName = monitorID.getUserName();
-        this.jobID = monitorID.getJobID();
-        this.taskID = monitorID.getTaskID();
-        this.experimentID = monitorID.getExperimentID();
+        this.jobID = monitorID.getJobId();
+        this.taskID = monitorID.getTaskId();
+        this.experimentID = monitorID.getExperimentId();
         this.workflowNodeID = monitorID.getWorkflowNodeID();
         this.jobName = monitorID.getJobName();
     }
@@ -90,12 +90,12 @@ public class MonitorID {
         this.jobExecutionContext = jobExecutionContext;
         this.computeResourceDescription = jobExecutionContext.getApplicationContext().getComputeResourceDescription();
         userName = jobExecutionContext.getExperiment().getUserName();
-        taskID = jobExecutionContext.getTaskData().getTaskID();
-        experimentID = jobExecutionContext.getExperiment().getExperimentID();
+        taskID = jobExecutionContext.getTaskData().getTaskId();
+        experimentID = jobExecutionContext.getExperiment().getExperimentId();
         workflowNodeID = jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId();// at this point we only have one node todo: fix this
         try {
             jobName = jobExecutionContext.getJobDetails().getJobName();
-            jobID = jobExecutionContext.getJobDetails().getJobID();
+            jobID = jobExecutionContext.getJobDetails().getJobId();
         }catch(NullPointerException e){
             logger.error("There is not job created at this point");
             // this is not a big deal we create MonitorId before having a jobId or job Name
@@ -126,11 +126,11 @@ public class MonitorID {
         this.userName = userName;
     }
 
-    public String getJobID() {
+    public String getJobId() {
         return jobID;
     }
 
-    public void setJobID(String jobID) {
+    public void setJobId(String jobID) {
         this.jobID = jobID;
     }
 
@@ -158,19 +158,19 @@ public class MonitorID {
         this.parameters = parameters;
     }
 
-    public String getExperimentID() {
+    public String getExperimentId() {
         return experimentID;
     }
 
-    public void setExperimentID(String experimentID) {
+    public void setExperimentId(String experimentID) {
         this.experimentID = experimentID;
     }
 
-    public String getTaskID() {
+    public String getTaskId() {
         return taskID;
     }
 
-    public void setTaskID(String taskID) {
+    public void setTaskId(String taskID) {
         this.taskID = taskID;
     }
 
@@ -192,11 +192,11 @@ public class MonitorID {
         // during that case job state comes as unknown.so we handle it here.
         if (this.state != null && status.equals(JobState.UNKNOWN)) {
             this.failedCount++;
-            logger.infoId(this.getJobID(), "{} status came for job {}, Increasing the failed count to: {}.",
+            logger.infoId(this.getJobId(), "{} status came for job {}, Increasing the failed count to: {}.",
                     status.toString(), this.jobID, this.failedCount);
         }else {
             // normal scenario
-            logger.infoId(this.getJobID(), "Valid status {} came for job {}, resetting fail count to 0", status.toString(), this.jobID);
+            logger.infoId(this.getJobId(), "Valid status {} came for job {}, resetting fail count to 0", status.toString(), this.jobID);
             setFailedCount(0);
             this.state = status;
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/GfacExperimentStateChangeRequest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/GfacExperimentStateChangeRequest.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/GfacExperimentStateChangeRequest.java
index 545bcd3..3eb4707 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/GfacExperimentStateChangeRequest.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/GfacExperimentStateChangeRequest.java
@@ -32,10 +32,10 @@ public class GfacExperimentStateChangeRequest {
     private MonitorID monitorID;
 
     public GfacExperimentStateChangeRequest(MonitorID monitorID, GfacExperimentState state) {
-        setIdentity(new JobIdentifier(monitorID.getJobID(),
-                monitorID.getTaskID(),
+        setIdentity(new JobIdentifier(monitorID.getJobId(),
+                monitorID.getTaskId(),
                 monitorID.getWorkflowNodeID(),
-                monitorID.getExperimentID(),
+                monitorID.getExperimentId(),
                 monitorID.getJobExecutionContext().getGatewayID()));
         setMonitorID(monitorID);
         this.state = state;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangeRequest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangeRequest.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangeRequest.java
index 2530ff8..093325d 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangeRequest.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangeRequest.java
@@ -43,8 +43,8 @@
 //    }
 //
 //    public JobStatusChangeRequest(MonitorID monitorID) {
-//        setIdentity(new JobIdentity(monitorID.getExperimentID(),monitorID.getWorkflowNodeID(),
-//                monitorID.getTaskID(),monitorID.getJobID()));
+//        setIdentity(new JobIdentity(monitorID.getExperimentId(),monitorID.getWorkflowNodeID(),
+//                monitorID.getTaskId(),monitorID.getJobId()));
 //    	setMonitorID(monitorID);
 //    	this.state = monitorID.getStatus();
 //    }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangedEvent.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangedEvent.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangedEvent.java
index b5ccf1c..cc1e245 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangedEvent.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/state/JobStatusChangedEvent.java
@@ -43,8 +43,8 @@
 //    }
 //
 //    public JobStatusChangedEvent(MonitorID monitorID) {
-//        setIdentity(new JobIdentity(monitorID.getExperimentID(),monitorID.getWorkflowNodeID(),
-//                monitorID.getTaskID(),monitorID.getJobID()));
+//        setIdentity(new JobIdentity(monitorID.getExperimentId(),monitorID.getWorkflowNodeID(),
+//                monitorID.getTaskId(),monitorID.getJobId()));
 //    	setMonitorID(monitorID);
 //    	this.state = monitorID.getStatus();
 //    }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
index 0810bfd..2c6cbd4 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
@@ -202,9 +202,9 @@ public class GFacUtils {
             details.setJobStatus(status);
             registry.add(ChildDataType.JOB_DETAIL, details,
                     new CompositeIdentifier(jobExecutionContext.getTaskData()
-                            .getTaskID(), details.getJobID()));
-            JobIdentifier identifier = new JobIdentifier(details.getJobID(), jobExecutionContext.getTaskData().getTaskID(),
-                    jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getExperimentID(),
+                            .getTaskId(), details.getJobId()));
+            JobIdentifier identifier = new JobIdentifier(details.getJobId(), jobExecutionContext.getTaskData().getTaskId(),
+                    jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getExperimentId(),
                     jobExecutionContext.getGatewayID());
             JobStatusChangeRequestEvent jobStatusChangeRequestEvent = new JobStatusChangeRequestEvent(state, identifier);
             monitorPublisher.publish(jobStatusChangeRequestEvent);
@@ -225,7 +225,7 @@ public class GFacUtils {
 			details.setJobStatus(status);
 			registry.update(
 					org.apache.airavata.registry.cpi.RegistryModelType.JOB_DETAIL,
-					details, details.getJobID());
+					details, details.getJobId());
 		} catch (Exception e) {
 			throw new GFacException("Error persisting job status"
 					+ e.getLocalizedMessage(), e);
@@ -245,7 +245,7 @@ public class GFacUtils {
 			details.setCreationTime(Calendar.getInstance().getTimeInMillis());
 			details.setErrorCategory(errorCatogory);
 			registry.add(ChildDataType.ERROR_DETAIL, details,
-					jobExecutionContext.getTaskData().getTaskID());
+					jobExecutionContext.getTaskData().getTaskId());
 		} catch (Exception e) {
 			throw new GFacException("Error persisting job status"
 					+ e.getLocalizedMessage(), e);
@@ -273,7 +273,7 @@ public class GFacUtils {
 			throws ApplicationSettingsException, KeeperException,
 			InterruptedException {
 		String expState = AiravataZKUtils.getExpState(zk, jobExecutionContext
-				.getExperimentID());
+				.getExperimentId());
         if (expState == null || expState.isEmpty()) {
             return GfacExperimentState.UNKNOWN;
         }
@@ -285,7 +285,7 @@ public class GFacUtils {
 			throws ApplicationSettingsException, KeeperException,
 			InterruptedException {
 		String expState = AiravataZKUtils.getExpState(zk, jobExecutionContext
-				.getExperimentID());
+				.getExperimentId());
 		if (expState == null) {
 			return -1;
 		}
@@ -306,7 +306,7 @@ public class GFacUtils {
 			throws ApplicationSettingsException, KeeperException,
 			InterruptedException {
 		String expState = AiravataZKUtils.getExpZnodeHandlerPath(
-				jobExecutionContext.getExperimentID(), className);
+				jobExecutionContext.getExperimentId(), className);
 		Stat exists = zk.exists(expState, false);
 		if (exists == null) {
 			zk.create(expState, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE,
@@ -342,7 +342,7 @@ public class GFacUtils {
                                              GfacHandlerState state) throws ApplicationSettingsException,
 			KeeperException, InterruptedException {
 		String expState = AiravataZKUtils.getExpZnodeHandlerPath(
-				jobExecutionContext.getExperimentID(), className);
+				jobExecutionContext.getExperimentId(), className);
 		Stat exists = zk.exists(expState, false);
 		if (exists == null) {
 			zk.create(expState, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE,
@@ -379,7 +379,7 @@ public class GFacUtils {
 			KeeperException, InterruptedException {
 		if(zk.getState().isConnected()) {
 			String expState = AiravataZKUtils.getExpZnodeHandlerPath(
-					jobExecutionContext.getExperimentID(), className);
+					jobExecutionContext.getExperimentId(), className);
 
 			Stat exists = zk.exists(expState + File.separator
 					+ AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, false);
@@ -400,7 +400,7 @@ public class GFacUtils {
                                                   JobExecutionContext jobExecutionContext, String className) {
 		try {
 			String expState = AiravataZKUtils.getExpZnodeHandlerPath(
-					jobExecutionContext.getExperimentID(), className);
+					jobExecutionContext.getExperimentId(), className);
 
 			Stat exists = zk.exists(expState + File.separator
 					+ AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE, false);
@@ -595,7 +595,7 @@ public class GFacUtils {
 			if (zk != null) {
 				String expZnodeHandlerPath = AiravataZKUtils
 						.getExpZnodeHandlerPath(
-								jobExecutionContext.getExperimentID(),
+								jobExecutionContext.getExperimentId(),
 								className);
 				Stat exists = zk.exists(expZnodeHandlerPath, false);
                 if (exists != null) {
@@ -617,7 +617,7 @@ public class GFacUtils {
 		if (zk != null) {
 			String expZnodeHandlerPath = AiravataZKUtils
 					.getExpZnodeHandlerPath(
-							jobExecutionContext.getExperimentID(),
+							jobExecutionContext.getExperimentId(),
 							className);
 			Stat exists = zk.exists(expZnodeHandlerPath, false);
 			return new String(jobExecutionContext.getZk().getData(
@@ -739,7 +739,7 @@ public class GFacUtils {
         Experiment details = (Experiment) airavataRegistry.get(RegistryModelType.EXPERIMENT, experimentId);
         if (details == null) {
             details = new Experiment();
-            details.setExperimentID(experimentId);
+            details.setExperimentId(experimentId);
         }
         org.apache.airavata.model.workspace.experiment.ExperimentStatus status = new org.apache.airavata.model.workspace.experiment.ExperimentStatus();
         status.setExperimentState(state);
@@ -783,9 +783,9 @@ public class GFacUtils {
     }
 
     public static void publishTaskStatus (JobExecutionContext jobExecutionContext, MonitorPublisher publisher, TaskState state){
-        TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+        TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskId(),
                 jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                jobExecutionContext.getExperimentID(),
+                jobExecutionContext.getExperimentId(),
                 jobExecutionContext.getGatewayID());
         publisher.publish(new TaskStatusChangeRequestEvent(state, taskIdentity));
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
index f992f10..a864029 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
@@ -66,7 +66,7 @@ public class OutHandlerWorker implements Runnable {
             gfac.invokeOutFlowHandlers(jEC);
         } catch (Exception e) {
             logger.error(e.getMessage(),e);
-            TaskIdentifier taskIdentifier = new TaskIdentifier(monitorID.getTaskID(), monitorID.getWorkflowNodeID(),monitorID.getExperimentID(), monitorID.getJobExecutionContext().getGatewayID());
+            TaskIdentifier taskIdentifier = new TaskIdentifier(monitorID.getTaskId(), monitorID.getWorkflowNodeID(),monitorID.getExperimentId(), monitorID.getJobExecutionContext().getGatewayID());
             //FIXME this is a case where the output retrieving fails even if the job execution was a success. Thus updating the task status
             monitorPublisher.publish(new TaskStatusChangeRequestEvent(TaskState.FAILED, taskIdentifier));
             try {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
index b4790c7..1122c99 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java
@@ -90,7 +90,7 @@ public class GSISSHDirectorySetupHandler extends AbstractHandler {
             detail.setTransferStatus(status);
             detail.setTransferDescription("Working directory = " + workingDirectory);
 
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
 
 		} catch (Exception e) {
 			DataTransferDetails detail = new DataTransferDetails();
@@ -99,7 +99,7 @@ public class GSISSHDirectorySetupHandler extends AbstractHandler {
 			status.setTransferState(TransferState.FAILED);
 			detail.setTransferStatus(status);
 			try {
-				registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+				registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
 				GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
 			} catch (Exception e1) {
 				throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
index 3b36e86..394d3e6 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHInputHandler.java
@@ -129,7 +129,7 @@ public class GSISSHInputHandler extends AbstractHandler {
                         status.setTransferState(TransferState.UPLOAD);
                         detail.setTransferStatus(status);
                         detail.setTransferDescription("Input Data Staged: " + stageInputFile);
-                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
 
                         GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
                     }
@@ -147,7 +147,7 @@ public class GSISSHInputHandler extends AbstractHandler {
 //                            status.setTransferState(TransferState.UPLOAD);
 //                            detail.setTransferStatus(status);
 //                            detail.setTransferDescription("Input Data Staged: " + stageInputFiles);
-//                            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+//                            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
 //                            StringBuffer temp = new StringBuffer(data.append(stageInputFiles).append(",").toString());
 //                            GFacUtils.savePluginData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
 //                            newFiles.add(stageInputFiles);
@@ -165,7 +165,7 @@ public class GSISSHInputHandler extends AbstractHandler {
             detail.setTransferStatus(status);
             try {
                 GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
-                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
             } catch (Exception e1) {
                 throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
index 18dcb97..fef5be8 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
@@ -107,7 +107,7 @@ public class GSISSHOutputHandler extends AbstractHandler {
                 }
             }
 
-            String timeStampedExperimentID = GFacUtils.createUniqueNameWithDate(jobExecutionContext.getExperimentID());
+            String timeStampedExperimentID = GFacUtils.createUniqueNameWithDate(jobExecutionContext.getExperimentId());
 
             TaskDetails taskData = jobExecutionContext.getTaskData();
             String outputDataDir = null;
@@ -120,7 +120,7 @@ public class GSISSHOutputHandler extends AbstractHandler {
             if (outputDataDir == null) {
                 outputDataDir = File.separator + "tmp";
             }
-            outputDataDir = outputDataDir + File.separator + jobExecutionContext.getExperimentID() + "-" + jobExecutionContext.getTaskData().getTaskID();
+            outputDataDir = outputDataDir + File.separator + jobExecutionContext.getExperimentId() + "-" + jobExecutionContext.getTaskData().getTaskId();
             (new File(outputDataDir)).mkdirs();
          	
             String stdOutStr = "";
@@ -159,12 +159,12 @@ public class GSISSHOutputHandler extends AbstractHandler {
             status.setTransferState(TransferState.STDOUT_DOWNLOAD);
             detail.setTransferStatus(status);
             detail.setTransferDescription("STDOUT:" + localStdOutFile.getAbsolutePath());
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
 
             status.setTransferState(TransferState.STDERROR_DOWNLOAD);
             detail.setTransferStatus(status);
             detail.setTransferDescription("STDERR:" + localStdErrFile.getAbsolutePath());
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
 
             //todo this is a mess we have to fix this
             List<OutputDataObjectType> outputArray = new ArrayList<OutputDataObjectType>();
@@ -296,15 +296,15 @@ public class GSISSHOutputHandler extends AbstractHandler {
             status.setTransferState(TransferState.DOWNLOAD);
             detail.setTransferStatus(status);
             detail.setTransferDescription(outputDataDir);
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-            registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
+            registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentId());
             fireTaskOutputChangeEvent(jobExecutionContext, outputArray);
         } catch (Exception e) {
             try {
                 status.setTransferState(TransferState.FAILED);
                 detail.setTransferStatus(status);
                 detail.setTransferDescription(e.getLocalizedMessage());
-                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
                 GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
             } catch (Exception e1) {
                 throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java
index ed94312..6c1d1e0 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/NewGSISSHOutputHandler.java
@@ -63,7 +63,7 @@ public class NewGSISSHOutputHandler extends AbstractHandler{
 	        super.invoke(jobExecutionContext);
 	        List<OutputDataObjectType> outputArray =  HandleOutputs.handleOutputs(jobExecutionContext, cluster);
             try {
-				registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
+				registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentId());
 			} catch (RegistryException e) {
 				throw new GFacHandlerException(e);
 			}


[43/44] airavata git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata into mongo-registry

Posted by sc...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata into mongo-registry


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

Branch: refs/heads/mongo-registry
Commit: 82176304ab68382241d76fa0964b7eacae274937
Parents: 801489b 5002df5
Author: Supun Nakandala <sc...@apache.org>
Authored: Thu May 28 19:44:32 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Thu May 28 19:44:32 2015 +0530

----------------------------------------------------------------------
 .../main/resources/airavata-server.properties   |  1 +
 .../messaging/core/MessagingConstants.java      |  2 +-
 .../core/impl/RabbitMQProcessConsumer.java      |  6 +-
 .../core/impl/RabbitMQStatusConsumer.java       |  5 +-
 .../core/impl/RabbitMQTaskLaunchConsumer.java   |  6 +-
 .../validator/impl/BatchQueueValidator.java     | 83 ++++++++++++++------
 .../gsi/ssh/api/job/PBSOutputParser.java        |  2 +-
 .../gsi/ssh/api/job/UGEOutputParser.java        |  3 +
 8 files changed, 77 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/82176304/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/82176304/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/UGEOutputParser.java
----------------------------------------------------------------------


[02/44] airavata git commit: Changing the thrift model variable names to lower camel case

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
index eee0001..8442cf2 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
@@ -74,7 +74,7 @@ public class NewOrchestratorTest extends BaseOrchestratorTest {
 //        Registry defaultRegistry = RegistryFactory.getDefaultRegistry();
 //        String experimentId = (String)defaultRegistry.add(ParentDataType.EXPERIMENT, simpleExperiment);
 //
-//        simpleExperiment.setExperimentID(experimentId);
+//        simpleExperiment.setExperimentId(experimentId);
 //        tasks = orchestrator.createTasks(experimentId);
 //          for(TaskDetails details:tasks) {
 //              orchestrator.launchExperiment(simpleExperiment,test, details,null);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
index 7fa678b..c5263ea 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
@@ -56,7 +56,7 @@ public class OrchestratorTestWithGRAM extends BaseOrchestratorTest {
 ////        basicMetadata.setExperimentName("test-trestles");
 ////        basicMetadata.setUserName("admin");
 ////        basicMetadata.setUserNameIsSet(true);
-////        basicMetadata.setProjectID("default");
+////        basicMetadata.setProjectId("default");
 ////
 ////        AdvancedInputDataHandling advancedInputDataHandling = new AdvancedInputDataHandling();
 ////        AdvancedOutputDataHandling advancedOutputDataHandling = new AdvancedOutputDataHandling();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/ValidatorTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/ValidatorTest.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/ValidatorTest.java
index dcf1c6e..2f38a39 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/ValidatorTest.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/ValidatorTest.java
@@ -89,19 +89,19 @@
 //        Registry defaultRegistry = RegistryFactory.getDefaultRegistry();
 //        String experimentId = (String)defaultRegistry.add(ParentDataType.EXPERIMENT, simpleExperiment);
 //
-//        simpleExperiment.setExperimentID(experimentId);
+//        simpleExperiment.setExperimentId(experimentId);
 //        tasks = orchestrator.createTasks(experimentId);
 //
 //        Assert.assertTrue(orchestrator.validateExperiment(simpleExperiment, test, tasks.get(0)).isValidationState());
 //
-//        simpleExperiment.setExperimentID(null);
+//        simpleExperiment.setExperimentId(null);
 //
 //        try {
 //            orchestrator.validateExperiment(simpleExperiment, test, tasks.get(0)).isValidationState();
 //        }catch(LaunchValidationException e){
 //            Assert.assertTrue(true);
 //        }
-//        tasks.get(0).setTaskID(null);
+//        tasks.get(0).setTaskId(null);
 //        try {
 //            orchestrator.validateExperiment(simpleExperiment, test, tasks.get(0));
 //        }catch (LaunchValidationException e){

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/SecondValidator.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/SecondValidator.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/SecondValidator.java
index 578aa9c..07001f1 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/SecondValidator.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/SecondValidator.java
@@ -31,7 +31,7 @@ public class SecondValidator implements JobMetadataValidator {
     public ValidationResults validate(Experiment experiment, WorkflowNodeDetails workflowNodeDetail, TaskDetails taskID) {
         ValidationResults validationResults = new ValidationResults();
         validationResults.setValidationState(true);
-        if(taskID.getTaskID() == null) {
+        if(taskID.getTaskId() == null) {
             ValidatorResult validatorResult = new ValidatorResult(false);
             validatorResult.setErrorDetails("No taskID is set, so Validation failed");
             validationResults.addToValidationResultList(validatorResult);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/TestValidator.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/TestValidator.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/TestValidator.java
index dd4310c..3a38ff2 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/TestValidator.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/TestValidator.java
@@ -36,13 +36,13 @@ public class TestValidator implements JobMetadataValidator {
     public ValidationResults validate(Experiment experiment, WorkflowNodeDetails workflowNodeDetail, TaskDetails taskID) {
         ValidationResults validationResults = new ValidationResults();
         validationResults.setValidationState(true);
-        if (experiment.getProjectID() == null) {
+        if (experiment.getProjectId() == null) {
             logger.error("Project ID is not set");
             ValidatorResult validatorResult = new ValidatorResult(false);
             validatorResult.setErrorDetails("Project ID is not set");
             validationResults.addToValidationResultList(validatorResult);
             validationResults.setValidationState(false);
-        } else if (experiment.getExperimentID() == null) {
+        } else if (experiment.getExperimentId() == null) {
             logger.error("This experiment is wrong, no experimentID set");
             ValidatorResult validatorResult = new ValidatorResult(false);
             validatorResult.setErrorDetails("This experiment is wrong, no experimentID set");

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
index 536c054..a6909f1 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
@@ -64,8 +64,8 @@ public class ExperimentRegistry {
                 ResourceUtils.addUser(experiment.getUserName(), null);
             }
 
-            experimentID = getExperimentID(experiment.getName());
-            experiment.setExperimentID(experimentID);
+            experimentID = getExperimentId(experiment.getName());
+            experiment.setExperimentId(experimentID);
             ExperimentResource experimentResource = new ExperimentResource();
             experimentResource.setExpID(experimentID);
             experimentResource.setExpName(experiment.getName());
@@ -74,11 +74,11 @@ public class ExperimentRegistry {
             experimentResource.setGateway(gateway);
             experimentResource.setGatewayExecutionId(experiment.getGatewayExecutionId());
             experimentResource.setEnableEmailNotifications(experiment.isEnableEmailNotification());
-            if (!workerResource.isProjectExists(experiment.getProjectID())) {
+            if (!workerResource.isProjectExists(experiment.getProjectId())) {
                 logger.error("Project does not exist in the system..");
                 throw new Exception("Project does not exist in the system, Please create the project first...");
             }
-            ProjectResource project = workerResource.getProject(experiment.getProjectID());
+            ProjectResource project = workerResource.getProject(experiment.getProjectId());
             experimentResource.setProject(project);
             experimentResource.setCreationTime(AiravataUtils.getTime(experiment.getCreationTime()));
             experimentResource.setDescription(experiment.getDescription());
@@ -154,7 +154,7 @@ public class ExperimentRegistry {
             configData.setAiravataAutoSchedule(configurationData.isAiravataAutoSchedule());
             configData.setOverrideManualParams(configurationData.isOverrideManualScheduledParams());
             configData.setShareExp(configurationData.isShareExperimentPublicly());
-            configData.setUserDn(configurationData.getUserDN());
+            configData.setUserDn(configurationData.getUserDn());
             configData.setGenerateCert(configurationData.isGenerateCert());
             configData.save();
             ComputationalResourceScheduling resourceScheduling = configurationData.getComputationalResourceScheduling();
@@ -265,7 +265,7 @@ public class ExperimentRegistry {
                 cmsr.setExperimentResource(taskDetailResource.getWorkflowNodeDetailResource().getExperimentResource());
             }
             cmsr.setResourceHostId(resourceScheduling.getResourceHostId());
-            cmsr.setCpuCount(resourceScheduling.getTotalCPUCount());
+            cmsr.setCpuCount(resourceScheduling.getTotalCpuCount());
             cmsr.setNodeCount(resourceScheduling.getNodeCount());
             cmsr.setNumberOfThreads(resourceScheduling.getNumberOfThreads());
             cmsr.setQueueName(resourceScheduling.getQueueName());
@@ -841,7 +841,7 @@ public class ExperimentRegistry {
             List<TaskDetails> taskDetails = nodeDetails.getTaskDetailsList();
             if (taskDetails != null && !taskDetails.isEmpty()) {
                 for (TaskDetails task : taskDetails) {
-                    String taskID = task.getTaskID();
+                    String taskID = task.getTaskId();
                     if (isTaskDetailExist(taskID)) {
                         updateTaskDetails(task, taskID);
                     } else {
@@ -919,7 +919,7 @@ public class ExperimentRegistry {
             experiment = workflowNode.getExperimentResource();
             TaskDetailResource taskDetail = (TaskDetailResource) workflowNode.create(ResourceType.TASK_DETAIL);
             taskDetail.setWorkflowNodeDetailResource(workflowNode);
-            taskDetail.setTaskId(getTaskID(workflowNode.getNodeName()));
+            taskDetail.setTaskId(getTaskId(workflowNode.getNodeName()));
             taskDetail.setApplicationId(taskDetails.getApplicationId());
             taskDetail.setApplicationVersion(taskDetails.getApplicationVersion());
             taskDetail.setCreationTime(AiravataUtils.getTime(taskDetails.getCreationTime()));
@@ -961,7 +961,7 @@ public class ExperimentRegistry {
             List<JobDetails> jobDetailsList = taskDetails.getJobDetailsList();
             if (jobDetailsList != null && !jobDetailsList.isEmpty()) {
                 for (JobDetails job : jobDetailsList) {
-                    CompositeIdentifier ids = new CompositeIdentifier(taskDetail.getTaskId(), job.getJobID());
+                    CompositeIdentifier ids = new CompositeIdentifier(taskDetail.getTaskId(), job.getJobId());
                     addJobDetails(job, ids);
                 }
             }
@@ -1046,7 +1046,7 @@ public class ExperimentRegistry {
             List<JobDetails> jobDetailsList = taskDetails.getJobDetailsList();
             if (jobDetailsList != null && !jobDetailsList.isEmpty()) {
                 for (JobDetails job : jobDetailsList) {
-                    CompositeIdentifier ids = new CompositeIdentifier(taskId, job.getJobID());
+                    CompositeIdentifier ids = new CompositeIdentifier(taskId, job.getJobId());
                     updateJobDetails(job, ids);
                 }
             }
@@ -1054,7 +1054,7 @@ public class ExperimentRegistry {
             List<DataTransferDetails> dataTransferDetailsList = taskDetails.getDataTransferDetailsList();
             if (dataTransferDetailsList != null && !dataTransferDetailsList.isEmpty()) {
                 for (DataTransferDetails transferDetails : dataTransferDetailsList) {
-                    updateDataTransferDetails(transferDetails, transferDetails.getTransferID());
+                    updateDataTransferDetails(transferDetails, transferDetails.getTransferId());
                 }
             }
 
@@ -1350,7 +1350,7 @@ public class ExperimentRegistry {
             }
             schedulingResource.setExperimentResource(experiment);
             schedulingResource.setResourceHostId(scheduling.getResourceHostId());
-            schedulingResource.setCpuCount(scheduling.getTotalCPUCount());
+            schedulingResource.setCpuCount(scheduling.getTotalCpuCount());
             schedulingResource.setNodeCount(scheduling.getNodeCount());
             schedulingResource.setNumberOfThreads(scheduling.getNumberOfThreads());
             schedulingResource.setQueueName(scheduling.getQueueName());
@@ -1464,11 +1464,11 @@ public class ExperimentRegistry {
                     workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
                     taskDetail = workflowNode.getTaskDetail((String) id);
                     errorResource = (ErrorDetailResource) taskDetail.create(ResourceType.ERROR_DETAIL);
-                    if (error.getErrorID() != null && !error.getErrorID().equals(experimentModelConstants.DEFAULT_ID)) {
+                    if (error.getErrorId() != null && !error.getErrorId().equals(experimentModelConstants.DEFAULT_ID)) {
                         List<ErrorDetailResource> errorDetailList = taskDetail.getErrorDetailList();
                         if (errorDetailList != null && !errorDetailList.isEmpty()) {
                             for (ErrorDetailResource errorDetailResource : errorDetailList) {
-                                if (errorDetailResource.getErrorId() == Integer.parseInt(error.getErrorID())) {
+                                if (errorDetailResource.getErrorId() == Integer.parseInt(error.getErrorId())) {
                                     errorResource = errorDetailResource;
                                 }
                             }
@@ -1488,11 +1488,11 @@ public class ExperimentRegistry {
                     taskDetail = workflowNode.getTaskDetail((String) cid.getTopLevelIdentifier());
                     JobDetailResource jobDetail = taskDetail.getJobDetail((String) cid.getSecondLevelIdentifier());
                     errorResource = (ErrorDetailResource) jobDetail.create(ResourceType.ERROR_DETAIL);
-                    if (error.getErrorID() != null && !error.getErrorID().equals(experimentModelConstants.DEFAULT_ID)) {
+                    if (error.getErrorId() != null && !error.getErrorId().equals(experimentModelConstants.DEFAULT_ID)) {
                         List<ErrorDetailResource> errorDetailList = taskDetail.getErrorDetailList();
                         if (errorDetailList != null && !errorDetailList.isEmpty()) {
                             for (ErrorDetailResource errorDetailResource : errorDetailList) {
-                                if (errorDetailResource.getErrorId() == Integer.parseInt(error.getErrorID())) {
+                                if (errorDetailResource.getErrorId() == Integer.parseInt(error.getErrorId())) {
                                     errorResource = errorDetailResource;
                                 }
                             }
@@ -1541,12 +1541,12 @@ public class ExperimentRegistry {
         return node + "_" + UUID.randomUUID();
     }
 
-    public String getExperimentID(String experimentName) {
+    public String getExperimentId(String experimentName) {
         String exp = experimentName.replaceAll("\\s", "");
         return exp + "_" + UUID.randomUUID();
     }
 
-    public String getTaskID(String nodeName) {
+    public String getTaskId(String nodeName) {
         String node = nodeName.replaceAll("\\s", "");
         return node + "_" + UUID.randomUUID();
     }
@@ -1628,11 +1628,11 @@ public class ExperimentRegistry {
             existingExperiment.setExecutionUser(experiment.getUserName());
             existingExperiment.setGateway(gatewayResource);
             existingExperiment.setGatewayExecutionId(experiment.getGatewayExecutionId());
-            if (!workerResource.isProjectExists(experiment.getProjectID())) {
+            if (!workerResource.isProjectExists(experiment.getProjectId())) {
                 logger.error("Project does not exist in the system..");
                 throw new Exception("Project does not exist in the system, Please create the project first...");
             }
-            ProjectResource project = workerResource.getProject(experiment.getProjectID());
+            ProjectResource project = workerResource.getProject(experiment.getProjectId());
             existingExperiment.setProject(project);
             existingExperiment.setCreationTime(AiravataUtils.getTime(experiment.getCreationTime()));
             existingExperiment.setDescription(experiment.getDescription());
@@ -1701,7 +1701,7 @@ public class ExperimentRegistry {
             resource.setAiravataAutoSchedule(configData.isAiravataAutoSchedule());
             resource.setOverrideManualParams(configData.isOverrideManualScheduledParams());
             resource.setShareExp(configData.isShareExperimentPublicly());
-            resource.setUserDn(configData.getUserDN());
+            resource.setUserDn(configData.getUserDn());
             resource.setGenerateCert(configData.isGenerateCert());
             resource.save();
             ComputationalResourceScheduling resourceScheduling = configData.getComputationalResourceScheduling();
@@ -1809,7 +1809,7 @@ public class ExperimentRegistry {
                 cmsr.setExperimentResource(taskDetailResource.getWorkflowNodeDetailResource().getExperimentResource());
             }
             cmsr.setResourceHostId(resourceScheduling.getResourceHostId());
-            cmsr.setCpuCount(resourceScheduling.getTotalCPUCount());
+            cmsr.setCpuCount(resourceScheduling.getTotalCpuCount());
             cmsr.setNodeCount(resourceScheduling.getNodeCount());
             cmsr.setNumberOfThreads(resourceScheduling.getNumberOfThreads());
             cmsr.setQueueName(resourceScheduling.getQueueName());
@@ -1939,7 +1939,7 @@ public class ExperimentRegistry {
                 if (value instanceof List<?>) {
                     return getWFNodeDetails(fieldName, ((List<?>) value).get(0));
                 } else if (value instanceof TaskDetails) {
-                    TaskDetailResource taskDetailResource = getTaskDetailResource(((TaskDetails) value).getTaskID());
+                    TaskDetailResource taskDetailResource = getTaskDetailResource(((TaskDetails) value).getTaskId());
                     if (taskDetailResource != null) {
                         return Arrays.asList(new WorkflowNodeDetails[]{ThriftDataModelConversion
                                 .getWorkflowNodeDetails(taskDetailResource
@@ -2420,7 +2420,7 @@ public class ExperimentRegistry {
         }
     }
 
-    public List<String> getExperimentIDs(String fieldName, Object value) throws RegistryException {
+    public List<String> getExperimentIds(String fieldName, Object value) throws RegistryException {
         List<String> expIDs = new ArrayList<String>();
         try {
             if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
@@ -2465,7 +2465,7 @@ public class ExperimentRegistry {
         List<String> taskDetailIds = new ArrayList<String>();
         List<TaskDetails> taskDetails = getTaskDetails(fieldName, value);
         for (TaskDetails td : taskDetails) {
-            taskDetailIds.add(td.getTaskID());
+            taskDetailIds.add(td.getTaskId());
         }
         return taskDetailIds;
     }
@@ -2474,7 +2474,7 @@ public class ExperimentRegistry {
         List<String> jobIds = new ArrayList<String>();
         List<JobDetails> jobDetails = getJobDetails(fieldName, value);
         for (JobDetails jd : jobDetails) {
-            jobIds.add(jd.getJobID());
+            jobIds.add(jd.getJobId());
         }
         return jobIds;
     }
@@ -2483,7 +2483,7 @@ public class ExperimentRegistry {
         List<String> transferIds = new ArrayList<String>();
         List<DataTransferDetails> dataTransferDetails = getDataTransferDetails(fieldName, value);
         for (DataTransferDetails dtd : dataTransferDetails) {
-            transferIds.add(dtd.getTransferID());
+            transferIds.add(dtd.getTransferId());
         }
         return transferIds;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
index e0e2a46..928fe64 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
@@ -63,7 +63,7 @@ public class ProjectRegistry {
             ProjectResource projectResource = new ProjectResource();
             projectId = getProjectId(project.getName());
             projectResource.setId(projectId);
-            project.setProjectID(projectId);
+            project.setProjectId(projectId);
             projectResource.setName(project.getName());
             projectResource.setDescription(project.getDescription());
             projectResource.setCreationTime(AiravataUtils.getTime(project.getCreationTime()));
@@ -74,7 +74,7 @@ public class ProjectRegistry {
             projectResource.save();
             ProjectUserResource resource = (ProjectUserResource)projectResource.create(
                     ResourceType.PROJECT_USER);
-            resource.setProjectId(project.getProjectID());
+            resource.setProjectId(project.getProjectId());
             resource.setUserName(project.getOwner());
             resource.save();
             List<String> sharedGroups = project.getSharedGroups();
@@ -264,7 +264,7 @@ public class ProjectRegistry {
         return null;
     }
 
-    public List<String> getProjectIDs (String fieldName, Object value) throws RegistryException{
+    public List<String> getProjectIds (String fieldName, Object value) throws RegistryException{
         List<String> projectIds = new ArrayList<String>();
         try {
             if (fieldName.equals(Constants.FieldConstants.ProjectConstants.OWNER)){

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
index 953b11e..6aacacc 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
@@ -602,11 +602,11 @@ public class RegistryImpl implements Registry {
         try {
             switch (dataType) {
                 case PROJECT:
-                    return projectRegistry.getProjectIDs(fieldName, value);
+                    return projectRegistry.getProjectIds(fieldName, value);
                 case EXPERIMENT:
-                    return experimentRegistry.getExperimentIDs(fieldName, value);
+                    return experimentRegistry.getExperimentIds(fieldName, value);
                 case EXPERIMENT_CONFIGURATION_DATA:
-                    return experimentRegistry.getExperimentIDs(fieldName, value);
+                    return experimentRegistry.getExperimentIds(fieldName, value);
                 case WORKFLOW_NODE_DETAIL:
                     return experimentRegistry.getWorkflowNodeIds(fieldName, value);
                 case TASK_DETAIL:

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
index 9d1d21e..28d393f 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
@@ -74,11 +74,11 @@ public class ErrorDetail implements Serializable {
     @JoinColumn(name = "NODE_INSTANCE_ID")
     private WorkflowNodeDetail nodeDetails;
 
-    public int getErrorID() {
+    public int getErrorId() {
         return errorID;
     }
 
-    public void setErrorID(int errorID) {
+    public void setErrorId(int errorID) {
         this.errorID = errorID;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java
index 1509612..5b930d1 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser.java
@@ -47,11 +47,11 @@ public class ProjectUser implements Serializable {
     @JoinColumn(name = "USER_NAME")
     private Users user;
 
-    public String getProjectID() {
+    public String getProjectId() {
         return projectID;
     }
 
-    public void setProjectID(String projectID) {
+    public void setProjectId(String projectID) {
         this.projectID = projectID;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java
index 4b1be3e..e3eff9c 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ProjectUser_PK.java
@@ -46,11 +46,11 @@ public class ProjectUser_PK implements Serializable {
         return 1;
     }
 
-    public String getProjectID() {
+    public String getProjectId() {
         return projectID;
     }
 
-    public void setProjectID(String projectID) {
+    public void setProjectId(String projectID) {
         this.projectID = projectID;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
index 9299bad..56a4e57 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
@@ -180,11 +180,11 @@ public class ErrorDetailResource extends AbstractResource {
             ErrorDetail errorDetail;
             if (errorId != 0) {
                 errorDetail = em.find(ErrorDetail.class, errorId);
-                errorDetail.setErrorID(errorId);
+                errorDetail.setErrorId(errorId);
             } else {
                 errorDetail = new ErrorDetail();
             }
-            errorDetail.setErrorID(errorId);
+            errorDetail.setErrorId(errorId);
             Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
             errorDetail.setExperiment(experiment);
             errorDetail.setExpId(experimentResource.getExpID());
@@ -211,7 +211,7 @@ public class ErrorDetailResource extends AbstractResource {
             errorDetail.setActionableGroup(actionableGroup);
             errorDetail.setJobId(jobId);
             em.persist(errorDetail);
-            errorId = errorDetail.getErrorID();
+            errorId = errorDetail.getErrorId();
             em.getTransaction().commit();
             em.close();
         } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java
index dd50b7c..336a9ee 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java
@@ -89,7 +89,7 @@ public class ProjectUserResource extends AbstractResource {
             em = ResourceUtils.getEntityManager();
             em.getTransaction().begin();
             ProjectUser prUser = new ProjectUser();
-            prUser.setProjectID(projectId);
+            prUser.setProjectId(projectId);
             prUser.setUserName(userName);
             Users user = em.find(Users.class, userName);
             prUser.setUser(user);
@@ -97,7 +97,7 @@ public class ProjectUserResource extends AbstractResource {
             prUser.setProject(project);
 
             if (existingPrUser != null) {
-                existingPrUser.setProjectID(projectId);
+                existingPrUser.setProjectId(projectId);
                 existingPrUser.setUserName(userName);
                 existingPrUser.setUser(user);
                 existingPrUser.setProject(project);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
index 34bd1fd..69ada6d 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
@@ -389,7 +389,7 @@ public class Utils {
         ProjectUserResource projectUserResource = new ProjectUserResource();
         if (o != null){
             projectUserResource.setUserName(o.getUser().getUser_name());
-            projectUserResource.setProjectId(o.getProjectID());
+            projectUserResource.setProjectId(o.getProjectId());
         }
         return projectUserResource;
     }
@@ -571,7 +571,7 @@ public class Utils {
                 WorkflowNodeDetailResource nodeDetailResource = (WorkflowNodeDetailResource)createWorkflowNodeDetail(o.getNodeDetails());
                 errorDetailResource.setNodeDetail(nodeDetailResource);
             }
-            errorDetailResource.setErrorId(o.getErrorID());
+            errorDetailResource.setErrorId(o.getErrorId());
             errorDetailResource.setJobId(o.getJobId());
             errorDetailResource.setCreationTime(o.getCreationTime());
             if (o.getActualErrorMsg() != null){

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
index d3609b8..8be98c3 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
@@ -418,7 +418,7 @@ public class WorkerResource extends AbstractResource {
 		return project;
 	}
 
-    public String getProjectID(String projectName) {
+    public String getProjectId(String projectName) {
         String pro = projectName.replaceAll("\\s", "");
         return pro + "_" + UUID.randomUUID();
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
index 8f385e8..ef3152f 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
@@ -68,7 +68,7 @@ public class ThriftDataModelConversion {
     public static Project getProject (ProjectResource pr) throws RegistryException {
         if (pr != null) {
             Project project = new Project();
-            project.setProjectID(pr.getId());
+            project.setProjectId(pr.getId());
             project.setName(pr.getName());
             if (pr.getCreationTime()!=null) {
 				project.setCreationTime(pr.getCreationTime().getTime());
@@ -110,9 +110,9 @@ public class ThriftDataModelConversion {
         if (experimentResource != null){
             Experiment experiment = new Experiment();
             if (experimentResource.getProject()!= null){
-                experiment.setProjectID(experimentResource.getProject().getId());
+                experiment.setProjectId(experimentResource.getProject().getId());
             }
-            experiment.setExperimentID(experimentResource.getExpID());
+            experiment.setExperimentId(experimentResource.getExpID());
             experiment.setCreationTime(experimentResource.getCreationTime().getTime());
             experiment.setUserName(experimentResource.getExecutionUser());
             experiment.setName(experimentResource.getExpName());
@@ -163,9 +163,9 @@ public class ThriftDataModelConversion {
         if (experimentResource != null){
             ExperimentSummary experimentSummary = new ExperimentSummary();
             if (experimentResource.getProject()!= null){
-                experimentSummary.setProjectID(experimentResource.getProject().getId());
+                experimentSummary.setProjectId(experimentResource.getProject().getId());
             }
-            experimentSummary.setExperimentID(experimentResource.getExpID());
+            experimentSummary.setExperimentId(experimentResource.getExpID());
             experimentSummary.setCreationTime(experimentResource.getCreationTime().getTime());
             experimentSummary.setUserName(experimentResource.getExecutionUser());
             experimentSummary.setName(experimentResource.getExpName());
@@ -494,7 +494,7 @@ public class ThriftDataModelConversion {
         if (taskDetailResource != null){
             TaskDetails taskDetails = new TaskDetails();
             String taskId = taskDetailResource.getTaskId();
-            taskDetails.setTaskID(taskId);
+            taskDetails.setTaskId(taskId);
             taskDetails.setApplicationId(taskDetailResource.getApplicationId());
             taskDetails.setApplicationVersion(taskDetailResource.getApplicationVersion());
             List<ApplicationInputResource> applicationInputs = taskDetailResource.getApplicationInputs();
@@ -556,7 +556,7 @@ public class ThriftDataModelConversion {
     public static JobDetails getJobDetail(JobDetailResource jobDetailResource) throws RegistryException {
         if (jobDetailResource != null){
             JobDetails jobDetails = new JobDetails();
-            jobDetails.setJobID(jobDetailResource.getJobId());
+            jobDetails.setJobId(jobDetailResource.getJobId());
             jobDetails.setJobDescription(jobDetailResource.getJobDescription());
             jobDetails.setCreationTime(jobDetailResource.getCreationTime().getTime());
             StatusResource jobStatus = jobDetailResource.getJobStatus();
@@ -576,7 +576,7 @@ public class ThriftDataModelConversion {
     public static ErrorDetails getErrorDetails (ErrorDetailResource resource){
         if (resource != null){
             ErrorDetails errorDetails = new ErrorDetails();
-            errorDetails.setErrorID(String.valueOf(resource.getErrorId()));
+            errorDetails.setErrorId(String.valueOf(resource.getErrorId()));
             errorDetails.setCreationTime(resource.getCreationTime().getTime());
             errorDetails.setActualErrorMessage(resource.getActualErrorMsg());
             errorDetails.setUserFriendlyMessage(resource.getUserFriendlyErrorMsg());
@@ -602,7 +602,7 @@ public class ThriftDataModelConversion {
     public static DataTransferDetails getDataTransferDetail (DataTransferDetailResource resource) throws RegistryException {
         if (resource != null){
             DataTransferDetails details = new DataTransferDetails();
-            details.setTransferID(resource.getTransferId());
+            details.setTransferId(resource.getTransferId());
             details.setCreationTime(resource.getCreationTime().getTime());
             details.setTransferDescription(resource.getTransferDescription());
             details.setTransferStatus(getTransferStatus(resource.getDataTransferStatus()));
@@ -628,7 +628,7 @@ public class ThriftDataModelConversion {
             data.setAiravataAutoSchedule(resource.isAiravataAutoSchedule());
             data.setOverrideManualScheduledParams(resource.isOverrideManualParams());
             data.setShareExperimentPublicly(resource.isShareExp());
-            data.setUserDN(resource.getUserDn());
+            data.setUserDn(resource.getUserDn());
             data.setGenerateCert(resource.isGenerateCert());
             ExperimentResource experimentResource = resource.getExperimentResource();
             String expID = experimentResource.getExpID();
@@ -661,7 +661,7 @@ public class ThriftDataModelConversion {
         if (csr != null){
             ComputationalResourceScheduling scheduling = new ComputationalResourceScheduling();
             scheduling.setResourceHostId(csr.getResourceHostId());
-            scheduling.setTotalCPUCount(csr.getCpuCount());
+            scheduling.setTotalCpuCount(csr.getCpuCount());
             scheduling.setNodeCount(csr.getNodeCount());
             scheduling.setNumberOfThreads(csr.getNumberOfThreads());
             scheduling.setQueueName(csr.getQueueName());

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExecutionErrorResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExecutionErrorResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExecutionErrorResourceTest.java
index 2d1aeb5..9238ea8 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExecutionErrorResourceTest.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExecutionErrorResourceTest.java
@@ -54,7 +54,7 @@
 //        workflowDataResource = (WorkflowDataResource) experimentResource.create(ResourceType.WORKFLOW_DATA);
 //        workflowDataResource.setWorkflowInstanceID("testWFInstance");
 //        workflowDataResource.setTemplateName("testTemplate");
-//        workflowDataResource.setExperimentID("testExpID");
+//        workflowDataResource.setExperimentId("testExpID");
 //        Timestamp timestamp = getCurrentTimestamp();
 //        workflowDataResource.setLastUpdatedTime(timestamp);
 //        workflowDataResource.save();
@@ -82,9 +82,9 @@
 //        executionErrorResource.setErrorDes("testDes");
 //        executionErrorResource.setErrorMsg("errorMsg");
 //        executionErrorResource.save();
-//        System.out.println(executionErrorResource.getErrorID());
+//        System.out.println(executionErrorResource.getErrorId());
 //
-//        assertTrue("Execution Error saved successfully", workflowDataResource.isExists(ResourceType.EXECUTION_ERROR, executionErrorResource.getErrorID()));
+//        assertTrue("Execution Error saved successfully", workflowDataResource.isExists(ResourceType.EXECUTION_ERROR, executionErrorResource.getErrorId()));
 //
 //    }
 //

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentDataResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentDataResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentDataResourceTest.java
index 487f977..f3c9023 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentDataResourceTest.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentDataResourceTest.java
@@ -56,7 +56,7 @@
 //        experimentMetadataResource.setMetadata("testMetadata");
 //        experimentMetadataResource.save();
 //
-//        workflowDataResource.setExperimentID("testExpID");
+//        workflowDataResource.setExperimentId("testExpID");
 //        workflowDataResource.setStatus("testStatus");
 //        workflowDataResource.setTemplateName("testWorkflowInstance");
 //

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentMetadataResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentMetadataResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentMetadataResourceTest.java
index 8d6e22e..d164d79 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentMetadataResourceTest.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentMetadataResourceTest.java
@@ -58,7 +58,7 @@
 //        exConfig.save();
 //
 //        workflowDataResource = experimentResource.createWorkflowInstanceResource("testWFInstance");
-//        workflowDataResource.setExperimentID("testExpID");
+//        workflowDataResource.setExperimentId("testExpID");
 //        workflowDataResource.setStatus("testStatus");
 //        workflowDataResource.setTemplateName("testWFInstance");
 //        workflowDataResource.setLastUpdatedTime(getCurrentTimestamp());

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GFacJobDataResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GFacJobDataResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GFacJobDataResourceTest.java
index 7c6a191..fb3dc54 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GFacJobDataResourceTest.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GFacJobDataResourceTest.java
@@ -47,7 +47,7 @@
 //        workflowDataResource = (WorkflowDataResource) experimentResource.create(ResourceType.WORKFLOW_DATA);
 //        workflowDataResource.setWorkflowInstanceID("testWFInstance");
 //        workflowDataResource.setTemplateName("testTemplate");
-//        workflowDataResource.setExperimentID("testExpID");
+//        workflowDataResource.setExperimentId("testExpID");
 //        Calendar calender = Calendar.getInstance();
 //        java.util.Date d = calender.getTime();
 //        Timestamp timestamp = new Timestamp(d.getTime());

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GFacJobStatusResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GFacJobStatusResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GFacJobStatusResourceTest.java
index 1254e33..a7b720f 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GFacJobStatusResourceTest.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GFacJobStatusResourceTest.java
@@ -47,7 +47,7 @@
 //        WorkflowDataResource workflowDataResource = (WorkflowDataResource) experimentResource.create(ResourceType.WORKFLOW_DATA);
 //        workflowDataResource.setWorkflowInstanceID("testWFInstance");
 //        workflowDataResource.setTemplateName("testTemplate");
-//        workflowDataResource.setExperimentID("testExpID");
+//        workflowDataResource.setExperimentId("testExpID");
 //        Calendar calender = Calendar.getInstance();
 //        java.util.Date d = calender.getTime();
 //        Timestamp timestamp = new Timestamp(d.getTime());

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GramDataResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GramDataResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GramDataResourceTest.java
index 4fd1894..332e055 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GramDataResourceTest.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GramDataResourceTest.java
@@ -45,7 +45,7 @@
 //        workflowDataResource = (WorkflowDataResource) experimentResource.create(ResourceType.WORKFLOW_DATA);
 //        workflowDataResource.setWorkflowInstanceID("testWFInstance");
 //        workflowDataResource.setTemplateName("testTemplate");
-//        workflowDataResource.setExperimentID("testExpID");
+//        workflowDataResource.setExperimentId("testExpID");
 //        Calendar calender = Calendar.getInstance();
 //        java.util.Date d = calender.getTime();
 //        Timestamp timestamp = new Timestamp(d.getTime());

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/NodeDataResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/NodeDataResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/NodeDataResourceTest.java
index ff5cf7e..b404cfd 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/NodeDataResourceTest.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/NodeDataResourceTest.java
@@ -45,7 +45,7 @@
 //        workflowDataResource = (WorkflowDataResource) experimentResource.create(ResourceType.WORKFLOW_DATA);
 //        workflowDataResource.setWorkflowInstanceID("testWFInstance");
 //        workflowDataResource.setTemplateName("testTemplate");
-//        workflowDataResource.setExperimentID("testExpID");
+//        workflowDataResource.setExperimentId("testExpID");
 //        Calendar calender = Calendar.getInstance();
 //        java.util.Date d = calender.getTime();
 //        Timestamp timestamp = new Timestamp(d.getTime());

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/OrchestratorDataResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/OrchestratorDataResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/OrchestratorDataResourceTest.java
index ad552e5..9af4b24 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/OrchestratorDataResourceTest.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/OrchestratorDataResourceTest.java
@@ -51,7 +51,7 @@
 //     }
 //
 //	    public void testSave() throws Exception {
-//	        dataResource.setExperimentID("testExpID");
+//	        dataResource.setExperimentId("testExpID");
 //	        dataResource.setStatus(AiravataJobState.State.CREATED.toString());
 //	        dataResource.setApplicationName(applicationName);
 //	        dataResource.save();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/RegistryUseCaseTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/RegistryUseCaseTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/RegistryUseCaseTest.java
index 125efc6..e0f29dd 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/RegistryUseCaseTest.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/RegistryUseCaseTest.java
@@ -77,7 +77,7 @@ public class RegistryUseCaseTest {
 
             //testing the update of a project
             Project updatedProject = new Project();
-            updatedProject.setProjectID(projectId1);
+            updatedProject.setProjectId(projectId1);
             updatedProject.setOwner("TestUser"+TAG);
             updatedProject.setName("UpdatedTestProject"+TAG);
             updatedProject.setDescription("This is an updated test project"+TAG);
@@ -85,7 +85,7 @@ public class RegistryUseCaseTest {
 
             //testing project retrieval
             Project retrievedProject = (Project)registry.get(RegistryModelType.PROJECT, projectId1);
-            Assert.assertEquals(updatedProject.getProjectID(), retrievedProject.getProjectID());
+            Assert.assertEquals(updatedProject.getProjectId(), retrievedProject.getProjectId());
             Assert.assertEquals(updatedProject.getOwner(), retrievedProject.getOwner());
             Assert.assertEquals(updatedProject.getName(), retrievedProject.getName());
             Assert.assertEquals(updatedProject.getDescription(), retrievedProject.getDescription());
@@ -187,7 +187,7 @@ public class RegistryUseCaseTest {
             ComputationalResourceScheduling scheduling = new ComputationalResourceScheduling();
             scheduling.setResourceHostId(UUID.randomUUID().toString());
             scheduling.setComputationalProjectAccount("TG-STA110014S");
-            scheduling.setTotalCPUCount(1);
+            scheduling.setTotalCpuCount(1);
             scheduling.setNodeCount(1);
             scheduling.setWallTimeLimit(15);
             scheduling.setQueueName("normal");
@@ -198,7 +198,7 @@ public class RegistryUseCaseTest {
             userConfigurationData.setComputationalResourceScheduling(scheduling);
 
             Experiment experiment = new Experiment();
-            experiment.setProjectID(projectId1);
+            experiment.setProjectId(projectId1);
             experiment.setUserName("TestUser" + TAG);
             experiment.setName("TestExperiment"+TAG);
             experiment.setDescription("Test 1 experiment");
@@ -213,7 +213,7 @@ public class RegistryUseCaseTest {
             Experiment retrievedExperiment = (Experiment)registry.get(RegistryModelType.EXPERIMENT,
                     experimentId1);
             Assert.assertNotNull(retrievedExperiment);
-            Assert.assertEquals(retrievedExperiment.getProjectID(), experiment.getProjectID());
+            Assert.assertEquals(retrievedExperiment.getProjectId(), experiment.getProjectId());
             Assert.assertEquals(retrievedExperiment.getDescription(), experiment.getDescription());
             Assert.assertEquals(retrievedExperiment.getName(), experiment.getName());
             Assert.assertEquals(retrievedExperiment.getApplicationId(), experiment.getApplicationId());
@@ -230,7 +230,7 @@ public class RegistryUseCaseTest {
 
             //creating more experiments
             experiment = new Experiment();
-            experiment.setProjectID(projectId1);
+            experiment.setProjectId(projectId1);
             experiment.setUserName("TestUser" + TAG);
             experiment.setName("TestExperiment2" + TAG);
             experiment.setDescription("Test 2 experiment");
@@ -242,7 +242,7 @@ public class RegistryUseCaseTest {
             Assert.assertNotNull(experimentId2);
 
             experiment = new Experiment();
-            experiment.setProjectID(projectId1);
+            experiment.setProjectId(projectId1);
             experiment.setUserName("TestUser" + TAG);
             experiment.setName("TestExperiment3"+TAG);
             experiment.setDescription("Test 3 experiment");

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/WorkflowDataResourceTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/WorkflowDataResourceTest.java b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/WorkflowDataResourceTest.java
index 9c3b107..392ba01 100644
--- a/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/WorkflowDataResourceTest.java
+++ b/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/WorkflowDataResourceTest.java
@@ -48,7 +48,7 @@
 //        workflowDataResource = (WorkflowDataResource) experimentResource.create(ResourceType.WORKFLOW_DATA);
 //        workflowDataResource.setWorkflowInstanceID("testWFInstance");
 //        workflowDataResource.setTemplateName("testTemplate");
-//        workflowDataResource.setExperimentID("testExpID");
+//        workflowDataResource.setExperimentId("testExpID");
 //        Calendar calender = Calendar.getInstance();
 //        java.util.Date d = calender.getTime();
 //        Timestamp timestamp = new Timestamp(d.getTime());

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/CompositeIdentifier.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/CompositeIdentifier.java b/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/CompositeIdentifier.java
index fee8aec..b140660 100644
--- a/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/CompositeIdentifier.java
+++ b/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/CompositeIdentifier.java
@@ -28,12 +28,20 @@ package org.apache.airavata.registry.cpi;
 public class CompositeIdentifier {
     private Object topLevelIdentifier;
     private Object secondLevelIdentifier;
+    private Object thirdLevelIdentifier;
 
     public CompositeIdentifier(Object topLevelIdentifier, Object secondLevelIdentifier) {
         this.topLevelIdentifier = topLevelIdentifier;
         this.secondLevelIdentifier = secondLevelIdentifier;
     }
 
+    public CompositeIdentifier(Object topLevelIdentifier, Object secondLevelIdentifier,
+                               Object thirdLevelIdentifier) {
+        this.topLevelIdentifier = topLevelIdentifier;
+        this.secondLevelIdentifier = secondLevelIdentifier;
+        this.thirdLevelIdentifier = thirdLevelIdentifier;
+    }
+
     public Object getTopLevelIdentifier() {
         return topLevelIdentifier;
     }
@@ -42,11 +50,18 @@ public class CompositeIdentifier {
         return secondLevelIdentifier;
     }
 
+    public Object getThirdLevelIdentifier() {
+        return thirdLevelIdentifier;
+    }
+
     @Override
     public String toString() {
-        if (topLevelIdentifier instanceof String && secondLevelIdentifier instanceof String) {
-            return topLevelIdentifier + "," + secondLevelIdentifier;
-        }else if (topLevelIdentifier instanceof String ) {
+        if (topLevelIdentifier instanceof String && secondLevelIdentifier instanceof String
+                && thirdLevelIdentifier instanceof  String) {
+            return topLevelIdentifier + "," + secondLevelIdentifier + "," + thirdLevelIdentifier;
+        }else if (topLevelIdentifier instanceof String && secondLevelIdentifier instanceof String) {
+            return topLevelIdentifier.toString() + "," + secondLevelIdentifier;
+        } else if(topLevelIdentifier instanceof  String) {
             return topLevelIdentifier.toString();
         } else {
             return secondLevelIdentifier.toString();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
----------------------------------------------------------------------
diff --git a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
index f0cf564..1c881b6 100644
--- a/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
+++ b/modules/test-suite/multi-tenanted-airavata/src/main/java/org/apache/airavata/testsuite/multitenantedairavata/ExperimentExecution.java
@@ -444,7 +444,7 @@ public class ExperimentExecution {
                         List<Project> projectsPerGateway = projectsMap.get(gatewayId);
                         String projectID = null;
                         if (projectsPerGateway != null && !projectsPerGateway.isEmpty()){
-                            projectID = projectsPerGateway.get(0).getProjectID();
+                            projectID = projectsPerGateway.get(0).getProjectId();
                         }
                         Experiment simpleExperiment =
                                 ExperimentModelUtil.createSimpleExperiment(projectID, testUser, "Amber Experiment", "Amber Experiment run", appId, applicationInputs);
@@ -528,7 +528,7 @@ public class ExperimentExecution {
                             List<Project> projectsPerGateway = projectsMap.get(gatewayId);
                             String projectID = null;
                             if (projectsPerGateway != null && !projectsPerGateway.isEmpty()){
-                                projectID = projectsPerGateway.get(0).getProjectID();
+                                projectID = projectsPerGateway.get(0).getProjectId();
                             }
                             Experiment simpleExperiment =
                                     ExperimentModelUtil.createSimpleExperiment(projectID, testUser, "TestFR_Ultrascan_Experiment", "Ultrascan Experiment run", appId, applicationInputs);
@@ -630,7 +630,7 @@ public class ExperimentExecution {
                                 List<Project> projectsPerGateway = projectsMap.get(gatewayId);
                                 String projectID = null;
                                 if (projectsPerGateway != null && !projectsPerGateway.isEmpty()) {
-                                    projectID = projectsPerGateway.get(0).getProjectID();
+                                    projectID = projectsPerGateway.get(0).getProjectId();
                                 }
                                 Experiment simpleExperiment =
                                         ExperimentModelUtil.createSimpleExperiment(projectID, "admin", "Echo Experiment", "Echo Experiment run", appId, applicationInputs);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java
index 5c604d5..a09d236 100644
--- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java
+++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java
@@ -201,7 +201,7 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 				inputDataStrings.put(dataObjectType.getName(), dataObjectType.getValue());
 			}
 			for (Node node : inputNodes) {
-                publishNodeStatusChange(WorkflowNodeState.EXECUTING,node.getID(),experiment.getExperimentID());
+                publishNodeStatusChange(WorkflowNodeState.EXECUTING,node.getID(),experiment.getExperimentId());
 				if (inputDataStrings.containsKey(node.getID())){
 					((InputNode)node).setDefaultValue(inputDataStrings.get(node.getID()));
 				} else {
@@ -212,7 +212,7 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 				Node node = inputNodes.get(i);
 				invokedNode.add(node);
 				node.setState(NodeExecutionState.FINISHED);
-                publishNodeStatusChange(WorkflowNodeState.INVOKED, node.getID(), experiment.getExperimentID());
+                publishNodeStatusChange(WorkflowNodeState.INVOKED, node.getID(), experiment.getExperimentId());
 				notifyViaInteractor(WorkflowExecutionMessage.NODE_STATE_CHANGED, null);
 				String portId= ((InputNode) node).getID();
 				Object portValue = ((InputNode) node).getDefaultValue();
@@ -226,7 +226,7 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 				workflowNode.addToNodeInputs(elem);
 				getRegistry().update(RegistryModelType.WORKFLOW_NODE_DETAIL, workflowNode, workflowNode.getNodeInstanceId());
 				updateWorkflowNodeStatus(workflowNode, WorkflowNodeState.COMPLETED);
-                publishNodeStatusChange(WorkflowNodeState.COMPLETED, node.getID(), experiment.getExperimentID());
+                publishNodeStatusChange(WorkflowNodeState.COMPLETED, node.getID(), experiment.getExperimentId());
 			}
 
 			while (this.getWorkflow().getExecutionState() != WorkflowExecutionState.STOPPED) {
@@ -236,7 +236,7 @@ public class WorkflowInterpreter implements AbstractActivityListener{
                 }
                 // ok we have paused sleep
                 if (this.getWorkflow().getExecutionState() == WorkflowExecutionState.PAUSED) {
-                	log.info("Workflow execution "+experiment.getExperimentID()+" is paused.");
+                	log.info("Workflow execution "+experiment.getExperimentId()+" is paused.");
 	                while (this.getWorkflow().getExecutionState() == WorkflowExecutionState.PAUSED) {
 	                    try {
 	                        Thread.sleep(400);
@@ -247,7 +247,7 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 	                if (this.getWorkflow().getExecutionState() == WorkflowExecutionState.STOPPED) {
 	                	continue;
 	                }
-	                log.info("Workflow execution "+experiment.getExperimentID()+" is resumed.");
+	                log.info("Workflow execution "+experiment.getExperimentId()+" is resumed.");
                 }
                 // get task list and execute them
                 ArrayList<Node> readyNodes = this.getReadyNodesDynamically();
@@ -279,7 +279,7 @@ public class WorkflowInterpreter implements AbstractActivityListener{
                         }
                     };
                 	updateWorkflowNodeStatus(workflowNodeDetails, WorkflowNodeState.INVOKED);
-                    publishNodeStatusChange(WorkflowNodeState.INVOKED, node.getID(), experiment.getExperimentID());
+                    publishNodeStatusChange(WorkflowNodeState.INVOKED, node.getID(), experiment.getExperimentId());
                     threadList.add(th);
                     th.start();
 					if (this.getWorkflow().getExecutionState() == WorkflowExecutionState.STEP) {
@@ -364,7 +364,7 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 		} finally{
         	cleanup();
 			this.getWorkflow().setExecutionState(WorkflowExecutionState.NONE);
-            ExperimentStatusChangeEvent event = new ExperimentStatusChangeEvent(ExperimentState.COMPLETED, experiment.getExperimentID(), gatewayId);
+            ExperimentStatusChangeEvent event = new ExperimentStatusChangeEvent(ExperimentState.COMPLETED, experiment.getExperimentId(), gatewayId);
             MessageContext msgCtx = new MessageContext(event, MessageType.EXPERIMENT, AiravataUtils.getId("EXPERIMENT"), gatewayId);
             msgCtx.setUpdatedTime(new Timestamp(Calendar.getInstance().getTimeInMillis()));
             publisher.publish(msgCtx);
@@ -397,7 +397,7 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 		}  
 		workflowNode.setExecutionUnit(executionUnit);
 		workflowNode.setExecutionUnitData(executionData);
-		workflowNode.setNodeInstanceId((String) getRegistry().add(ChildDataType.WORKFLOW_NODE_DETAIL, workflowNode, getExperiment().getExperimentID()));
+		workflowNode.setNodeInstanceId((String) getRegistry().add(ChildDataType.WORKFLOW_NODE_DETAIL, workflowNode, getExperiment().getExperimentId()));
 		nodeInstanceList.put(node, workflowNode);
 		setupNodeDetailsInput(node, workflowNode);
 		return workflowNode;
@@ -435,10 +435,10 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 				// next run
 				// even if the next run runs before the notification arrives
 				WorkflowNodeDetails workflowNodeDetails = createWorkflowNodeDetails(node);
-//				workflowNodeDetails.setNodeInstanceId((String)getRegistry().add(ChildDataType.WORKFLOW_NODE_DETAIL, workflowNodeDetails, getExperiment().getExperimentID()));
+//				workflowNodeDetails.setNodeInstanceId((String)getRegistry().add(ChildDataType.WORKFLOW_NODE_DETAIL, workflowNodeDetails, getExperiment().getExperimentId()));
 				node.setState(NodeExecutionState.EXECUTING);
 				updateWorkflowNodeStatus(workflowNodeDetails, WorkflowNodeState.EXECUTING);
-                publishNodeStatusChange(WorkflowNodeState.EXECUTING, node.getID(), experiment.getExperimentID());
+                publishNodeStatusChange(WorkflowNodeState.EXECUTING, node.getID(), experiment.getExperimentId());
 				// OutputNode node = (OutputNode) outputNode;
 				List<DataPort> inputPorts = node.getInputPorts();
 
@@ -491,7 +491,7 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 					}
 				}
 				node.setState(NodeExecutionState.FINISHED);
-                publishNodeStatusChange(WorkflowNodeState.COMPLETED, node.getID(), experiment.getExperimentID());
+                publishNodeStatusChange(WorkflowNodeState.COMPLETED, node.getID(), experiment.getExperimentId());
                 updateWorkflowNodeStatus(workflowNodeDetails, WorkflowNodeState.COMPLETED);
 				notifyViaInteractor(WorkflowExecutionMessage.NODE_STATE_CHANGED, null);
 			}
@@ -545,7 +545,7 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 		node.setState(NodeExecutionState.EXECUTING);
         invokedNode.add(node);
         updateWorkflowNodeStatus(nodeInstanceList.get(node), WorkflowNodeState.EXECUTING);
-        publishNodeStatusChange(WorkflowNodeState.EXECUTING, node.getID(), experiment.getExperimentID());
+        publishNodeStatusChange(WorkflowNodeState.EXECUTING, node.getID(), experiment.getExperimentId());
         Component component = node.getComponent();
 		if (component instanceof SubWorkflowComponent) {
 			handleSubWorkComponent(node);
@@ -645,7 +645,7 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 	protected void handleWSComponent(Node node) throws WorkflowException, TException, RegistryException {
         TaskDetails taskDetails = createTaskDetails(node);
         log.debug("Launching task , node = " + node.getName() + " node id = " + node.getID());
-        getOrchestratorClient().launchTask(taskDetails.getTaskID(), getCredentialStoreToken());
+        getOrchestratorClient().launchTask(taskDetails.getTaskId(), getCredentialStoreToken());
 	}
 	
 	private void addToAwaitingTaskList(String taskId, Node node){
@@ -995,8 +995,8 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 	
 	private String createInvokerForEachSingleWSNode(Node foreachWSNode, WSComponent wsComponent) throws WorkflowException, RegistryException, TException {
         TaskDetails taskDetails = createTaskDetails(foreachWSNode);
-        getOrchestratorClient().launchTask(taskDetails.getTaskID(), getCredentialStoreToken());
-		return taskDetails.getTaskID();
+        getOrchestratorClient().launchTask(taskDetails.getTaskId(), getCredentialStoreToken());
+		return taskDetails.getTaskId();
 	}
 
 	private void setupNodeDetailsInput(Node node, WorkflowNodeDetails nodeDetails){
@@ -1056,8 +1056,8 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 			throws RegistryException {
 		setupNodeDetailsInput(node, nodeInstanceList.get(node));
 		TaskDetails taskDetails = ExperimentModelUtil.cloneTaskFromWorkflowNodeDetails(experiment, nodeInstanceList.get(node));
-        taskDetails.setTaskID(getRegistry().add(ChildDataType.TASK_DETAIL, taskDetails,nodeInstanceList.get(node).getNodeInstanceId()).toString());
-        addToAwaitingTaskList(taskDetails.getTaskID(), node);
+        taskDetails.setTaskId(getRegistry().add(ChildDataType.TASK_DETAIL, taskDetails,nodeInstanceList.get(node).getNodeInstanceId()).toString());
+        addToAwaitingTaskList(taskDetails.getTaskId(), node);
 		return taskDetails;
 	}
 
@@ -1441,7 +1441,7 @@ public class WorkflowInterpreter implements AbstractActivityListener{
 			setupNodeDetailsOutput(node);
 			node.setState(NodeExecutionState.FINISHED);
         	try {
-                publishNodeStatusChange(WorkflowNodeState.COMPLETED, node.getID(), experiment.getExperimentID());
+                publishNodeStatusChange(WorkflowNodeState.COMPLETED, node.getID(), experiment.getExperimentId());
                 updateWorkflowNodeStatus(nodeInstanceList.get(node), state);
 			} catch (RegistryException e) {
                 log.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/workflow/workflow-core/src/main/java/org/apache/airavata/workflow/core/SimpleWorkflowInterpreter.java
----------------------------------------------------------------------
diff --git a/modules/workflow/workflow-core/src/main/java/org/apache/airavata/workflow/core/SimpleWorkflowInterpreter.java b/modules/workflow/workflow-core/src/main/java/org/apache/airavata/workflow/core/SimpleWorkflowInterpreter.java
index 778fee2..35872a4 100644
--- a/modules/workflow/workflow-core/src/main/java/org/apache/airavata/workflow/core/SimpleWorkflowInterpreter.java
+++ b/modules/workflow/workflow-core/src/main/java/org/apache/airavata/workflow/core/SimpleWorkflowInterpreter.java
@@ -111,7 +111,7 @@ class SimpleWorkflowInterpreter{
      */
     void launchWorkflow() throws Exception {
         WorkflowFactoryImpl wfFactory = WorkflowFactoryImpl.getInstance();
-        WorkflowParser workflowParser = wfFactory.getWorkflowParser(experiment.getExperimentID(), credentialToken);
+        WorkflowParser workflowParser = wfFactory.getWorkflowParser(experiment.getExperimentId(), credentialToken);
         log.debug("Initialized workflow parser");
         setWorkflowInputNodes(workflowParser.parse());
         log.debug("Parsed the workflow and got the workflow input nodes");
@@ -175,8 +175,8 @@ class SimpleWorkflowInterpreter{
     private void publishToProcessQueue(TaskDetails process) throws AiravataException {
         ProcessSubmitEvent processSubmitEvent = new ProcessSubmitEvent();
         processSubmitEvent.setCredentialToken(credentialToken);
-        processSubmitEvent.setTaskId(process.getTaskID());
-        MessageContext messageContext = new MessageContext(processSubmitEvent, MessageType.TASK, process.getTaskID(), null);
+        processSubmitEvent.setTaskId(process.getTaskId());
+        MessageContext messageContext = new MessageContext(processSubmitEvent, MessageType.TASK, process.getTaskId(), null);
         messageContext.setUpdatedTime(AiravataUtils.getCurrentTimestamp());
         publisher.publish(messageContext);
     }
@@ -184,7 +184,7 @@ class SimpleWorkflowInterpreter{
     private TaskDetails getProcess(WorkflowNodeDetails wfNodeDetails) throws RegistryException {
         // create workflow taskDetails from workflowNodeDetails
         TaskDetails taskDetails = ExperimentModelUtil.cloneTaskFromWorkflowNodeDetails(getExperiment(), wfNodeDetails);
-        taskDetails.setTaskID(getRegistry()
+        taskDetails.setTaskId(getRegistry()
                 .add(ChildDataType.TASK_DETAIL, taskDetails, wfNodeDetails.getNodeInstanceId()).toString());
         return taskDetails;
     }
@@ -205,7 +205,7 @@ class SimpleWorkflowInterpreter{
         wfNodeDetails.setExecutionUnit(executionUnit);
         wfNodeDetails.setExecutionUnitData(executionData);
         wfNodeDetails.setNodeInstanceId((String) getRegistry()
-                .add(ChildDataType.WORKFLOW_NODE_DETAIL, wfNodeDetails, getExperiment().getExperimentID()));
+                .add(ChildDataType.WORKFLOW_NODE_DETAIL, wfNodeDetails, getExperiment().getExperimentId()));
         return wfNodeDetails;
     }
 
@@ -288,12 +288,12 @@ class SimpleWorkflowInterpreter{
      */
     private synchronized void addToProcessingQueue(ProcessContext processContext) {
         readyList.remove(processContext.getWorkflowNode().getId());
-        processingQueue.put(processContext.getTaskDetails().getTaskID(), processContext);
+        processingQueue.put(processContext.getTaskDetails().getTaskId(), processContext);
     }
 
     private synchronized void addToCompleteQueue(ProcessContext processContext) {
-        processingQueue.remove(processContext.getTaskDetails().getTaskID());
-        completeList.put(processContext.getTaskDetails().getTaskID(), processContext);
+        processingQueue.remove(processContext.getTaskDetails().getTaskId());
+        completeList.put(processContext.getTaskDetails().getTaskId(), processContext);
     }
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java
index 96fd117..cef7948 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java
@@ -180,12 +180,12 @@
 //        if (type == MonitorUtil.EventType.WORKFLOW_INVOKED) {
 //            workflowStarted(graph, forward);
 //            //todo ideally experimentID and workflowInstanceID has to be different
-//            workflowStatusUpdater.saveWorkflowData(event.getExperimentID(), event.getExperimentID(),
+//            workflowStatusUpdater.saveWorkflowData(event.getExperimentId(), event.getExperimentId(),
 //                    this.workflowInterpreterConfiguration.getWorkflow().getName());
-//            workflowStatusUpdater.workflowStarted(event.getExperimentID());
+//            workflowStatusUpdater.workflowStarted(event.getExperimentId());
 //        } else if (type == MonitorUtil.EventType.WORKFLOW_TERMINATED) {
 //            workflowFinished(graph, forward);
-//            workflowStatusUpdater.workflowFinished(event.getExperimentID());
+//            workflowStatusUpdater.workflowFinished(event.getExperimentId());
 //            try {
 //                this.unsubscribe();
 //            } catch (MonitorException e) {
@@ -198,7 +198,7 @@
 //				}
 //            } else {
 //                nodeStarted(node, forward);
-//                workflowNodeStatusUpdater.workflowNodeStarted(event.getExperimentID(), event.getNodeID()
+//                workflowNodeStatusUpdater.workflowNodeStarted(event.getExperimentId(), event.getNodeID()
 //                        , event.getMessage(), event.getWorkflowID().toASCIIString());
 //            }
 //        } else if (type == MonitorUtil.EventType.RECEIVED_RESULT
@@ -211,7 +211,7 @@
 //				}
 //        	} else {
 //                nodeFinished(node, forward);
-//                workflowNodeStatusUpdater.workflowNodeFinished(event.getExperimentID(), event.getNodeID(), event.getMessage(),
+//                workflowNodeStatusUpdater.workflowNodeFinished(event.getExperimentId(), event.getNodeID(), event.getMessage(),
 //                        event.getWorkflowID().toASCIIString());
 //            }
 //        } else if (type == EventType.RECEIVED_FAULT
@@ -219,9 +219,9 @@
 //            //Constructing NodeExecutionError with required data...
 //            logger.error(event.getMessage());
 //            NodeExecutionError nodeExecutionError = new NodeExecutionError();
-//            nodeExecutionError.setExperimentId(event.getExperimentID());
+//            nodeExecutionError.setExperimentId(event.getExperimentId());
 //            nodeExecutionError.setNodeId(event.getNodeID());
-//            nodeExecutionError.setWorkflowInstanceId(event.getExperimentID());
+//            nodeExecutionError.setWorkflowInstanceId(event.getExperimentId());
 //            nodeExecutionError.setErrorMessage(event.getMessage());
 //            nodeExecutionError.setErrorDescription(event.getMessage());
 //            nodeExecutionError.setErrorTime(event.getTimestamp());
@@ -232,7 +232,7 @@
 //				}
 //            } else {
 //                nodeFailed(node, forward);
-//                workflowNodeStatusUpdater.workflowNodeFailed(event.getExperimentID(), event.getNodeID());
+//                workflowNodeStatusUpdater.workflowNodeFailed(event.getExperimentId(), event.getNodeID());
 //            }
 //            try {
 //                this.unsubscribe();
@@ -246,17 +246,17 @@
 //				}
 //            } else {
 //                // nodeResourceMapped(node, event.getEvent(), forward);
-//                workflowNodeStatusUpdater.workflowNodeRunning(event.getExperimentID(), event.getNodeID());
+//                workflowNodeStatusUpdater.workflowNodeRunning(event.getExperimentId(), event.getNodeID());
 //            }
 //        } else if(type == MonitorUtil.EventType.LOG_INFO){
 //            // This is not very gram specific, if these data is required in other provider they have to send
 //            // the notification in info mode with ending these text, DONE,PENDING and ACTIVE
 //            if(event.getMessage().endsWith("DONE")) {
-//                workflowNodeStatusUpdater.workflowNodeStatusDone(event.getExperimentID(), event.getNodeID());
+//                workflowNodeStatusUpdater.workflowNodeStatusDone(event.getExperimentId(), event.getNodeID());
 //            } else if(event.getMessage().endsWith("PENDING")){
-//                workflowNodeStatusUpdater.workflowNodeStatusPending(event.getExperimentID(), event.getNodeID());
+//                workflowNodeStatusUpdater.workflowNodeStatusPending(event.getExperimentId(), event.getNodeID());
 //            } else if(event.getMessage().endsWith("ACTIVE")){
-//                workflowNodeStatusUpdater.workflowNodeStatusActive(event.getExperimentID(), event.getNodeID());
+//                workflowNodeStatusUpdater.workflowNodeStatusActive(event.getExperimentId(), event.getNodeID());
 //            }
 //        } else {
 //            // Ignore the rest.


[23/44] airavata git commit: fixing merge conflicts

Posted by sc...@apache.org.
fixing merge conflicts


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

Branch: refs/heads/mongo-registry
Commit: 847f2d93009e2a2e2fd61418140c6cf42fdee367
Parents: 9306457 9f3d55b
Author: Supun Nakandala <sc...@apache.org>
Authored: Wed May 27 00:30:23 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Wed May 27 00:30:23 2015 +0530

----------------------------------------------------------------------
 .../airavata/api/server/AiravataAPIServer.java  |  1 -
 .../api/server/AiravataDerbyServer.java         |  1 -
 .../handler/AiravataServerHandlerTest.java      |  1 -
 .../app/catalog/test/AppDeploymentTest.java     |  1 -
 .../app/catalog/test/AppInterfaceTest.java      |  1 -
 .../app/catalog/test/ComputeResourceTest.java   |  1 -
 .../app/catalog/test/GatewayProfileTest.java    |  1 -
 .../airavata/common/utils/AiravataUtils.java    | 28 --------------------
 .../common/utils/ApplicationSettings.java       |  9 +------
 .../common/utils/ApplicationSettingsTest.java   |  1 -
 .../servlet/CredentialStoreCallbackServlet.java |  1 -
 .../store/store/impl/db/SSHCredentialTest.java  |  1 -
 .../credential/store/client/TestSSLClient.java  |  1 -
 .../airavata/gfac/client/util/Initialize.java   |  1 -
 .../core/monitor/AiravataJobStatusUpdator.java  | 25 ++++++++++-------
 .../core/monitor/AiravataTaskStatusUpdator.java |  8 +++---
 .../AiravataWorkflowNodeStatusUpdator.java      | 15 ++++++-----
 .../apache/airavata/job/GFacConfigXmlTest.java  |  2 --
 .../GSISecurityContextTestWithMyProxyAuth.java  |  1 -
 .../gfac/monitor/email/EmailBasedMonitor.java   |  3 ++-
 .../messaging/client/RabbitMQListener.java      |  1 -
 .../airavata/messaging/core/TestClient.java     |  1 -
 .../orchestrator/client/util/Initialize.java    |  1 -
 .../orchestrator/core/util/Initialize.java      |  1 -
 .../registry/jpa/util/Initialize.java           |  1 -
 .../org/apache/airavata/server/ServerMain.java  |  1 -
 .../multitenantedairavata/GatewayRegister.java  |  1 -
 27 files changed, 32 insertions(+), 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/847f2d93/airavata-api/airavata-api-server/src/test/java/org/apache/airavata/api/server/handler/AiravataServerHandlerTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/847f2d93/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/AiravataJobStatusUpdator.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/847f2d93/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
----------------------------------------------------------------------


[19/44] airavata git commit: Adding mongo-registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/GatewayRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/GatewayRegistry.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/GatewayRegistry.java
new file mode 100644
index 0000000..d38b5df
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/GatewayRegistry.java
@@ -0,0 +1,115 @@
+/*
+ *
+ * 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.persistance.registry.jpa.impl;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
+import org.apache.airavata.persistance.registry.jpa.utils.ThriftDataModelConversion;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class GatewayRegistry {
+
+    private final static Logger logger = LoggerFactory.getLogger(GatewayRegistry.class);
+    public GatewayResource getDefaultGateway () throws ApplicationSettingsException, RegistryException {
+        return (GatewayResource)ResourceUtils.getGateway(ServerSettings.getDefaultUserGateway());
+    }
+
+    public GatewayResource getExistingGateway (String gatewayName) throws RegistryException {
+        return (GatewayResource)ResourceUtils.getGateway(gatewayName);
+    }
+
+    public String addGateway (Gateway gateway) throws RegistryException{
+        try {
+            GatewayResource resource = (GatewayResource)ResourceUtils.createGateway(gateway.getGatewayId());
+            resource.setGatewayName(gateway.getGatewayName());
+            resource.setEmailAddress(gateway.getEmailAddress());
+            resource.setDomain(gateway.getDomain());
+            resource.save();
+            return gateway.getGatewayId();
+        }catch (RegistryException e){
+            logger.error("Error while saving gateway to registry", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public void updateGateway (String gatewayId, Gateway updatedGateway) throws RegistryException{
+        try {
+            GatewayResource existingGateway = (GatewayResource)ResourceUtils.getGateway(gatewayId);
+            existingGateway.setGatewayName(updatedGateway.getGatewayName());
+            existingGateway.setEmailAddress(updatedGateway.getEmailAddress());
+            existingGateway.setDomain(updatedGateway.getDomain());
+            existingGateway.save();
+        }catch (RegistryException e){
+            logger.error("Error while updating gateway to registry", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public Gateway getGateway (String gatewayId) throws RegistryException{
+        try {
+            GatewayResource resource = (GatewayResource)ResourceUtils.getGateway(gatewayId);
+            return ThriftDataModelConversion.getGateway(resource);
+        }catch (RegistryException e){
+            logger.error("Error while getting gateway", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean isGatewayExist (String gatewayId) throws RegistryException{
+        try {
+            return ResourceUtils.isGatewayExist(gatewayId);
+        }catch (RegistryException e){
+            logger.error("Error while checking gateway exists", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public boolean removeGateway (String gatewayId) throws RegistryException{
+        try {
+            return ResourceUtils.removeGateway(gatewayId);
+        }catch (Exception e){
+            logger.error("Error while removing the gateway", e);
+            throw new RegistryException(e);
+        }
+    }
+
+    public List<Gateway> getAllGateways () throws RegistryException {
+        List<Gateway> gatewayList = new ArrayList<Gateway>();
+        try {
+            List<Resource> allGateways = ResourceUtils.getAllGateways();
+            return ThriftDataModelConversion.getAllGateways(allGateways);
+        }catch (Exception e){
+            logger.error("Error while getting all the gateways", e);
+            throw new RegistryException(e);
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java
new file mode 100644
index 0000000..0274518
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java
@@ -0,0 +1,97 @@
+/*
+ *
+ * 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.persistance.registry.jpa.impl;
+
+import org.apache.airavata.registry.cpi.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.Map;
+
+public class LoggingRegistryImpl implements Registry {
+    private final static Logger logger = LoggerFactory.getLogger(LoggingRegistryImpl.class);
+
+    @Override
+    public Object add(ParentDataType dataType, Object newObjectToAdd, String gatewayId) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public Object add(ChildDataType dataType, Object newObjectToAdd, Object dependentIdentifiers) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public void update(RegistryModelType dataType, Object newObjectToUpdate, Object identifier) throws RegistryException {
+
+    }
+
+    @Override
+    public void update(RegistryModelType dataType, Object identifier, String fieldName, Object value) throws RegistryException {
+
+    }
+
+    @Override
+    public Object get(RegistryModelType dataType, Object identifier) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public List<Object> get(RegistryModelType dataType, String fieldName, Object value) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public List<Object> get(RegistryModelType dataType, String fieldName, Object value, int limit, int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public List<Object> search(RegistryModelType dataType, Map<String, String> filters) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public List<Object> search(RegistryModelType dataType, Map<String, String> filters, int limit, int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public Object getValue(RegistryModelType dataType, Object identifier, String field) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public List<String> getIds(RegistryModelType dataType, String fieldName, Object value) throws RegistryException {
+        return null;
+    }
+
+    @Override
+    public void remove(RegistryModelType dataType, Object identifier) throws RegistryException {
+
+    }
+
+    @Override
+    public boolean isExist(RegistryModelType dataType, Object identifier) throws RegistryException {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
new file mode 100644
index 0000000..928fe64
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
@@ -0,0 +1,305 @@
+/*
+ *
+ * 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.persistance.registry.jpa.impl;
+
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.resources.*;
+import org.apache.airavata.persistance.registry.jpa.utils.ThriftDataModelConversion;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.ResultOrderType;
+import org.apache.airavata.registry.cpi.utils.Constants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.*;
+
+public class ProjectRegistry {
+    private GatewayResource gatewayResource;
+    private WorkerResource workerResource;
+    private final static Logger logger = LoggerFactory.getLogger(ProjectRegistry.class);
+
+    public ProjectRegistry(GatewayResource gatewayResource, UserResource user) throws RegistryException {
+        if (!ResourceUtils.isGatewayExist(gatewayResource.getGatewayId())){
+            this.gatewayResource = gatewayResource;
+        }else {
+            this.gatewayResource = (GatewayResource)ResourceUtils.getGateway(gatewayResource.getGatewayId());
+        }
+        if (!gatewayResource.isExists(ResourceType.GATEWAY_WORKER, user.getUserName())){
+            workerResource = ResourceUtils.addGatewayWorker(gatewayResource, user);
+        }else {
+            workerResource = (WorkerResource)ResourceUtils.getWorker(gatewayResource.getGatewayId(),
+                    user.getUserName());
+        }
+    }
+
+    public String addProject (Project project, String gatewayId) throws RegistryException{
+        String projectId;
+        try {
+            if (!ResourceUtils.isUserExist(project.getOwner())){
+                ResourceUtils.addUser(project.getOwner(), null);
+            }
+            ProjectResource projectResource = new ProjectResource();
+            projectId = getProjectId(project.getName());
+            projectResource.setId(projectId);
+            project.setProjectId(projectId);
+            projectResource.setName(project.getName());
+            projectResource.setDescription(project.getDescription());
+            projectResource.setCreationTime(AiravataUtils.getTime(project.getCreationTime()));
+            GatewayResource gateway = (GatewayResource)ResourceUtils.getGateway(gatewayId);
+            projectResource.setGateway(gateway);
+            WorkerResource worker = new WorkerResource(project.getOwner(), workerResource.getGateway());
+            projectResource.setWorker(worker);
+            projectResource.save();
+            ProjectUserResource resource = (ProjectUserResource)projectResource.create(
+                    ResourceType.PROJECT_USER);
+            resource.setProjectId(project.getProjectId());
+            resource.setUserName(project.getOwner());
+            resource.save();
+            List<String> sharedGroups = project.getSharedGroups();
+            if (sharedGroups != null && !sharedGroups.isEmpty()){
+                for (String group : sharedGroups){
+                    //TODO - add shared groups
+                    logger.info("Groups are not supported at the moment...");
+                }
+            }
+
+            List<String> sharedUsers = project.getSharedUsers();
+            if (sharedUsers != null && !sharedUsers.isEmpty()){
+                for (String username : sharedUsers){
+                    ProjectUserResource pr = (ProjectUserResource)projectResource.
+                            create(ResourceType.PROJECT_USER);
+                    pr.setUserName(username);
+                    pr.save();
+                }
+            }
+        }catch (Exception e){
+            logger.error("Error while saving project to registry", e);
+           throw new RegistryException(e);
+        }
+        return projectId;
+    }
+
+    private String getProjectId (String projectName){
+        String pro = projectName.replaceAll("\\s", "");
+        return pro + "_" + UUID.randomUUID();
+    }
+
+    public void updateProject (Project project, String projectId) throws RegistryException{
+        try {
+            ProjectResource existingProject = workerResource.getProject(projectId);
+            existingProject.setDescription(project.getDescription());
+            existingProject.setName(project.getName());
+            existingProject.setCreationTime(AiravataUtils.getTime(project.getCreationTime()));
+//            existingProject.setGateway(gatewayResource);
+            UserResource user = (UserResource)ResourceUtils.getUser(project.getOwner());
+            if (!gatewayResource.isExists(ResourceType.GATEWAY_WORKER, user.getUserName())){
+                workerResource = ResourceUtils.addGatewayWorker(gatewayResource, user);
+            }else {
+                workerResource = (WorkerResource)ResourceUtils.getWorker(
+                        gatewayResource.getGatewayName(), user.getUserName());
+            }
+            WorkerResource worker = new WorkerResource(project.getOwner(), gatewayResource);
+            existingProject.setWorker(worker);
+            existingProject.save();
+            ProjectUserResource resource = (ProjectUserResource)existingProject.create(
+                    ResourceType.PROJECT_USER);
+            resource.setProjectId(projectId);
+            resource.setUserName(project.getOwner());
+            resource.save();
+            List<String> sharedGroups = project.getSharedGroups();
+            if (sharedGroups != null && !sharedGroups.isEmpty()){
+                for (String group : sharedGroups){
+                    //TODO - add shared groups
+                    logger.info("Groups are not supported at the moment...");
+                }
+            }
+
+            List<String> sharedUsers = project.getSharedUsers();
+            if (sharedUsers != null && !sharedUsers.isEmpty()){
+                for (String username : sharedUsers){
+                    ProjectUserResource pr = (ProjectUserResource)existingProject.create(
+                            ResourceType.PROJECT_USER);
+                    pr.setUserName(username);
+                    pr.save();
+                }
+            }
+        }catch (Exception e){
+            logger.error("Error while saving project to registry", e);
+           throw new RegistryException(e);
+        }
+    }
+
+    public Project getProject (String projectId) throws RegistryException{
+        try {
+            ProjectResource project = workerResource.getProject(projectId);
+            if (project != null){
+                return ThriftDataModelConversion.getProject(project);
+            }
+        }catch (Exception e){
+            logger.error("Error while retrieving project from registry", e);
+           throw new RegistryException(e);
+        }
+        return null;
+    }
+
+    /**
+     * Get list of projects of the user
+     * @param fieldName
+     * @param value
+     * @return
+     * @throws RegistryException
+     */
+    public List<Project> getProjectList (String fieldName, Object value) throws RegistryException{
+        return getProjectList(fieldName, value, -1, -1, null, null);
+    }
+
+    /**
+     * Get projects list with pagination and result ordering
+     * @param fieldName
+     * @param value
+     * @param limit
+     * @param offset
+     * @param orderByIdentifier
+     * @param resultOrderType
+     * @return
+     * @throws RegistryException
+     */
+    public List<Project> getProjectList (String fieldName, Object value, int limit, int offset,
+                                         Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException{
+        List<Project> projects = new ArrayList<Project>();
+        try {
+            if (fieldName.equals(Constants.FieldConstants.ProjectConstants.OWNER)){
+                workerResource.setUser((String)value);
+                List<ProjectResource> projectList = workerResource.getProjects();
+                if (projectList != null && !projectList.isEmpty()){
+                    for (ProjectResource pr : projectList){
+                        projects.add(ThriftDataModelConversion.getProject(pr));
+                    }
+                }
+                return projects;
+            }
+        }catch (Exception e){
+            logger.error("Error while retrieving project from registry", e);
+            throw new RegistryException(e);
+        }
+        return projects;
+    }
+
+    /**
+     * To search projects of user with the given filter criteria. All the matching results will be sent.
+     * Results are not ordered in any order
+     * @param filters
+     * @return
+     * @throws RegistryException
+     */
+    public List<Project> searchProjects (Map<String, String> filters) throws RegistryException{
+        return searchProjects(filters, -1, -1, null, null);
+    }
+
+    /**
+     * To search the projects of user with the given filter criteria and retrieve the results with
+     * pagination support. Results can be ordered based on an identifier (i.e column) either ASC or
+     * DESC.
+     *
+     * @param filters
+     * @param limit
+     * @param offset
+     * @param orderByIdentifier
+     * @param resultOrderType
+     * @return
+     * @throws RegistryException
+     */
+    public List<Project> searchProjects(Map<String, String> filters, int limit,
+            int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+        Map<String, String> fil = new HashMap<String, String>();
+        if (filters != null && filters.size() != 0){
+            List<Project> projects = new ArrayList<Project>();
+            try {
+                for (String field : filters.keySet()){
+                    if (field.equals(Constants.FieldConstants.ProjectConstants.PROJECT_NAME)){
+                        fil.put(AbstractResource.ProjectConstants.PROJECT_NAME, filters.get(field));
+                    }else if (field.equals(Constants.FieldConstants.ProjectConstants.OWNER)){
+                        fil.put(AbstractResource.ProjectConstants.USERNAME, filters.get(field));
+                    }else if (field.equals(Constants.FieldConstants.ProjectConstants.DESCRIPTION)){
+                        fil.put(AbstractResource.ProjectConstants.DESCRIPTION, filters.get(field));
+                    }else if (field.equals(Constants.FieldConstants.ProjectConstants.GATEWAY_ID)){
+                        fil.put(AbstractResource.ProjectConstants.GATEWAY_ID, filters.get(field));
+                    }
+                }
+                List<ProjectResource> projectResources = workerResource
+                        .searchProjects(fil, limit, offset, orderByIdentifier, resultOrderType);
+                if (projectResources != null && !projectResources.isEmpty()){
+                    for (ProjectResource pr : projectResources){
+                        projects.add(ThriftDataModelConversion.getProject(pr));
+                    }
+                }
+                return projects;
+            }catch (Exception e){
+                logger.error("Error while retrieving project from registry", e);
+                throw new RegistryException(e);
+            }
+        }
+        return null;
+    }
+
+    public List<String> getProjectIds (String fieldName, Object value) throws RegistryException{
+        List<String> projectIds = new ArrayList<String>();
+        try {
+            if (fieldName.equals(Constants.FieldConstants.ProjectConstants.OWNER)){
+                workerResource.setUser((String)value);
+                List<ProjectResource> projectList = workerResource.getProjects();
+                if (projectList != null && !projectList.isEmpty()){
+                    for (ProjectResource pr : projectList){
+                        projectIds.add(pr.getName());
+                    }
+                }
+                return projectIds;
+            }
+        }catch (Exception e){
+            logger.error("Error while retrieving projects from registry", e);
+           throw new RegistryException(e);
+        }
+        return projectIds;
+    }
+
+    public void removeProject (String projectId) throws RegistryException {
+        try {
+            workerResource.removeProject(projectId);
+        } catch (Exception e) {
+            logger.error("Error while removing the project..", e);
+           throw new RegistryException(e);
+        }
+    }
+
+    public boolean isProjectExist(String projectId) throws RegistryException {
+        try {
+            return workerResource.isProjectExists(projectId);
+        } catch (Exception e) {
+            logger.error("Error while retrieving project...", e);
+           throw new RegistryException(e);
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java
new file mode 100644
index 0000000..8af4f19
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java
@@ -0,0 +1,80 @@
+/*
+ *
+ * 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.persistance.registry.jpa.impl;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RegistryFactory {
+    private static Registry registry;
+    private static Logger logger = LoggerFactory.getLogger(RegistryFactory.class);
+
+    public static Registry getRegistry(String gateway, String username, String password) throws RegistryException {
+        try {
+            if (registry == null) {
+                registry = new RegistryImpl(gateway, username, password);
+            }
+        } catch (RegistryException e) {
+            logger.error("Unable to create registry instance", e);
+            throw new RegistryException(e);
+        }
+        return registry;
+    }
+
+    public static Registry getRegistry(String gateway) throws RegistryException {
+        try {
+            if (registry == null) {
+                registry = new RegistryImpl(gateway, ServerSettings.getDefaultUser(), ServerSettings.getDefaultUserPassword());
+            }
+        } catch (RegistryException e) {
+            logger.error("Unable to create registry instance", e);
+            throw new RegistryException(e);
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to create registry instance", e);
+            throw new RegistryException(e);
+        }
+        return registry;
+    }
+
+    public static Registry getDefaultRegistry () throws RegistryException {
+        try {
+            if (registry == null) {
+                registry = new RegistryImpl();
+            }
+        } catch (RegistryException e) {
+            logger.error("Unable to create registry instance", e);
+            throw new RegistryException(e);
+        }
+        return registry;
+    }
+
+    public static Registry getLoggingRegistry() {
+        if(registry == null) {
+            registry = new LoggingRegistryImpl();
+        }
+        return registry;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java
new file mode 100644
index 0000000..7920200
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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.persistance.registry.jpa.impl;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
+import org.apache.airavata.registry.cpi.RegistryException;
+
+public class UserReg {
+    public WorkerResource getSystemUser() throws ApplicationSettingsException, RegistryException {
+        return (WorkerResource)ResourceUtils.getWorker(ServerSettings.getDefaultUserGateway(), ServerSettings.getDefaultUser());
+    }
+
+    public WorkerResource getExistingUser (String gatewayName, String userName) throws RegistryException {
+        return (WorkerResource)ResourceUtils.getWorker(gatewayName, userName);
+    }
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java
new file mode 100644
index 0000000..8f40f2d
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java
@@ -0,0 +1,129 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name = "ADVANCE_INPUT_DATA_HANDLING")
+public class AdvancedInputDataHandling implements Serializable {
+    @Id
+    @GeneratedValue
+    @Column(name = "INPUT_DATA_HANDLING_ID")
+    private int dataHandlingId;
+    @Column(name = "EXPERIMENT_ID")
+    private String expId;
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Column(name = "WORKING_DIR_PARENT")
+    private String parentWorkingDir;
+    @Column(name = "UNIQUE_WORKING_DIR")
+    private String workingDir;
+    @Column(name = "STAGE_INPUT_FILES_TO_WORKING_DIR")
+    private boolean stageInputsToWorkingDir;
+    @Column(name = "CLEAN_AFTER_JOB")
+    private boolean cleanAfterJob;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail task;
+
+    public int getDataHandlingId() {
+        return dataHandlingId;
+    }
+
+    public void setDataHandlingId(int dataHandlingId) {
+        this.dataHandlingId = dataHandlingId;
+    }
+
+    public String getExpId() {
+        return expId;
+    }
+
+    public void setExpId(String expId) {
+        this.expId = expId;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getParentWorkingDir() {
+        return parentWorkingDir;
+    }
+
+    public void setParentWorkingDir(String parentWorkingDir) {
+        this.parentWorkingDir = parentWorkingDir;
+    }
+
+    public String getWorkingDir() {
+        return workingDir;
+    }
+
+    public void setWorkingDir(String workingDir) {
+        this.workingDir = workingDir;
+    }
+
+    public boolean isStageInputsToWorkingDir() {
+        return stageInputsToWorkingDir;
+    }
+
+    public void setStageInputsToWorkingDir(boolean stageInputsToWorkingDir) {
+        this.stageInputsToWorkingDir = stageInputsToWorkingDir;
+    }
+
+    public boolean isCleanAfterJob() {
+        return cleanAfterJob;
+    }
+
+    public void setCleanAfterJob(boolean cleanAfterJob) {
+        this.cleanAfterJob = cleanAfterJob;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java
new file mode 100644
index 0000000..d305f22
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java
@@ -0,0 +1,119 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name = "ADVANCE_OUTPUT_DATA_HANDLING")
+public class AdvancedOutputDataHandling implements Serializable {
+    @Id
+    @GeneratedValue
+    @Column(name = "OUTPUT_DATA_HANDLING_ID")
+    private int outputDataHandlingId;
+    @Column(name = "EXPERIMENT_ID")
+    private String expId;
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Column(name = "OUTPUT_DATA_DIR")
+    private String outputDataDir;
+    @Column(name = "DATA_REG_URL")
+    private String dataRegUrl;
+    @Column(name = "PERSIST_OUTPUT_DATA")
+    private boolean persistOutputData;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail task;
+
+    public int getOutputDataHandlingId() {
+        return outputDataHandlingId;
+    }
+
+    public void setOutputDataHandlingId(int outputDataHandlingId) {
+        this.outputDataHandlingId = outputDataHandlingId;
+    }
+
+    public String getExpId() {
+        return expId;
+    }
+
+    public void setExpId(String expId) {
+        this.expId = expId;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getOutputDataDir() {
+        return outputDataDir;
+    }
+
+    public void setOutputDataDir(String outputDataDir) {
+        this.outputDataDir = outputDataDir;
+    }
+
+    public String getDataRegUrl() {
+        return dataRegUrl;
+    }
+
+    public void setDataRegUrl(String dataRegUrl) {
+        this.dataRegUrl = dataRegUrl;
+    }
+
+    public boolean isPersistOutputData() {
+        return persistOutputData;
+    }
+
+    public void setPersistOutputData(boolean persistOutputData) {
+        this.persistOutputData = persistOutputData;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java
new file mode 100644
index 0000000..66a9796
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java
@@ -0,0 +1,173 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name = "APPLICATION_INPUT")
+@IdClass(ApplicationInput_PK.class)
+public class ApplicationInput implements Serializable {
+    @Id
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Id
+    @Column(name = "INPUT_KEY")
+    private String inputKey;
+    @Column(name = "DATA_TYPE")
+    private String dataType;
+    @Column(name = "METADATA")
+    private String metadata;
+    @Lob
+    @Column(name = "VALUE")
+    private char[] value;
+    @Column(name = "APP_ARGUMENT")
+    private String appArgument;
+
+    @Column(name = "INPUT_ORDER")
+    private int inputOrder;
+
+    @Column(name = "STANDARD_INPUT")
+    private boolean standardInput;
+
+    @Column(name = "USER_FRIENDLY_DESC")
+    private String userFriendlyDesc;
+
+    @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 = "TASK_ID")
+    private TaskDetail task;
+
+    public int getInputOrder() {
+        return inputOrder;
+    }
+
+    public void setInputOrder(int inputOrder) {
+        this.inputOrder = inputOrder;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getInputKey() {
+        return inputKey;
+    }
+
+    public void setInputKey(String inputKey) {
+        this.inputKey = inputKey;
+    }
+
+    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 char[] getValue() {
+        return value;
+    }
+
+    public void setValue(char[] value) {
+        this.value = value;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+
+    public String getAppArgument() {
+        return appArgument;
+    }
+
+    public void setAppArgument(String appArgument) {
+        this.appArgument = appArgument;
+    }
+
+    public boolean isStandardInput() {
+        return standardInput;
+    }
+
+    public void setStandardInput(boolean standardInput) {
+        this.standardInput = standardInput;
+    }
+
+    public String getUserFriendlyDesc() {
+        return userFriendlyDesc;
+    }
+
+    public void setUserFriendlyDesc(String userFriendlyDesc) {
+        this.userFriendlyDesc = userFriendlyDesc;
+    }
+
+    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/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java
new file mode 100644
index 0000000..e99cbd2
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java
@@ -0,0 +1,65 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import java.io.Serializable;
+
+public class ApplicationInput_PK implements Serializable {
+    private String taskId;
+    private String inputKey;
+
+    public ApplicationInput_PK(String inputKey, String taskId) {
+        this.inputKey = inputKey;
+        this.taskId = taskId;
+    }
+
+    public ApplicationInput_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getInputKey() {
+        return inputKey;
+    }
+
+    public void setInputKey(String inputKey) {
+        this.inputKey = inputKey;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java
new file mode 100644
index 0000000..c95f934
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java
@@ -0,0 +1,150 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name = "APPLICATION_OUTPUT")
+@IdClass(ApplicationOutput_PK.class)
+public class ApplicationOutput implements Serializable {
+    @Id
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Id
+    @Column(name = "OUTPUT_KEY")
+    private String outputKey;
+    @Column(name = "DATA_TYPE")
+    private String dataType;
+    @Lob
+    @Column(name = "VALUE")
+    private char[] value;
+
+    @Column(name = "IS_REQUIRED")
+    private boolean isRequired;
+    @Column(name="REQUIRED_TO_COMMANDLINE")
+    private boolean addedToCmd;
+    @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 = "TASK_ID")
+    private TaskDetail task;
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public char[] getValue() {
+        return value;
+    }
+
+    public void setValue(char[] value) {
+        this.value = value;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+
+    public String getOutputKey() {
+        return outputKey;
+    }
+
+    public void setOutputKey(String outputKey) {
+        this.outputKey = outputKey;
+    }
+
+    public String getDataType() {
+        return dataType;
+    }
+
+    public void setDataType(String dataType) {
+        this.dataType = dataType;
+    }
+
+    public boolean isRequired() {
+        return isRequired;
+    }
+
+    public void setRequired(boolean isRequired) {
+        this.isRequired = isRequired;
+    }
+
+    public boolean isAddedToCmd() {
+        return addedToCmd;
+    }
+
+    public void setAddedToCmd(boolean addedToCmd) {
+        this.addedToCmd = addedToCmd;
+    }
+
+    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/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java
new file mode 100644
index 0000000..17a5021
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import java.io.Serializable;
+
+public class ApplicationOutput_PK implements Serializable {
+    private String taskId;
+    private String outputKey;
+
+    public ApplicationOutput_PK(String outputKey, String taskId) {
+        this.outputKey = outputKey;
+        this.taskId = taskId;
+    }
+
+    public ApplicationOutput_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getOutputKey() {
+        return outputKey;
+    }
+
+    public void setOutputKey(String outputKey) {
+        this.outputKey = outputKey;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
new file mode 100644
index 0000000..e440510
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Computational_Resource_Scheduling.java
@@ -0,0 +1,190 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@DataCache
+@Entity
+@Table(name = "COMPUTATIONAL_RESOURCE_SCHEDULING")
+public class Computational_Resource_Scheduling implements Serializable {
+    @Id
+    @GeneratedValue
+    @Column(name = "RESOURCE_SCHEDULING_ID")
+    private int schedulingId;
+    @Column(name = "EXPERIMENT_ID")
+    private String expId;
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Column(name = "RESOURCE_HOST_ID")
+    private String resourceHostId;
+    @Column(name = "CPU_COUNT")
+    private int cpuCount;
+    @Column(name = "NODE_COUNT")
+    private int nodeCount;
+    @Column(name = "NO_OF_THREADS")
+    private int numberOfThreads;
+    @Column(name = "QUEUE_NAME")
+    private String queueName;
+    @Column(name = "WALLTIME_LIMIT")
+    private int wallTimeLimit;
+    @Column(name = "JOB_START_TIME")
+    private Timestamp jobStartTime;
+    @Column(name = "TOTAL_PHYSICAL_MEMORY")
+    private int totalPhysicalmemory;
+    @Column(name = "COMPUTATIONAL_PROJECT_ACCOUNT")
+    private String projectName;
+    @Column(name = "CHESSIS_NAME")
+    private String chessisName;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail task;
+
+    public String getChessisName() {
+        return chessisName;
+    }
+
+    public void setChessisName(String chessisName) {
+        this.chessisName = chessisName;
+    }
+
+    public int getSchedulingId() {
+        return schedulingId;
+    }
+
+    public void setSchedulingId(int schedulingId) {
+        this.schedulingId = schedulingId;
+    }
+
+    public String getExpId() {
+        return expId;
+    }
+
+    public void setExpId(String expId) {
+        this.expId = expId;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getResourceHostId() {
+        return resourceHostId;
+    }
+
+    public void setResourceHostId(String resourceHostId) {
+        this.resourceHostId = resourceHostId;
+    }
+
+    public int getCpuCount() {
+        return cpuCount;
+    }
+
+    public void setCpuCount(int cpuCount) {
+        this.cpuCount = cpuCount;
+    }
+
+    public int getNodeCount() {
+        return nodeCount;
+    }
+
+    public void setNodeCount(int nodeCount) {
+        this.nodeCount = nodeCount;
+    }
+
+    public int getNumberOfThreads() {
+        return numberOfThreads;
+    }
+
+    public void setNumberOfThreads(int numberOfThreads) {
+        this.numberOfThreads = numberOfThreads;
+    }
+
+    public String getQueueName() {
+        return queueName;
+    }
+
+    public void setQueueName(String queueName) {
+        this.queueName = queueName;
+    }
+
+    public int getWallTimeLimit() {
+        return wallTimeLimit;
+    }
+
+    public void setWallTimeLimit(int wallTimeLimit) {
+        this.wallTimeLimit = wallTimeLimit;
+    }
+
+    public Timestamp getJobStartTime() {
+        return jobStartTime;
+    }
+
+    public void setJobStartTime(Timestamp jobStartTime) {
+        this.jobStartTime = jobStartTime;
+    }
+
+    public int getTotalPhysicalmemory() {
+        return totalPhysicalmemory;
+    }
+
+    public void setTotalPhysicalmemory(int totalPhysicalmemory) {
+        this.totalPhysicalmemory = totalPhysicalmemory;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration.java
new file mode 100644
index 0000000..a7a1d4f
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration.java
@@ -0,0 +1,80 @@
+/*
+*
+* 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@DataCache
+@Entity
+@Table(name ="CONFIGURATION")
+@IdClass(Configuration_PK.class)
+public class Configuration implements Serializable {
+    @Id
+    @Column(name = "CONFIG_KEY")
+    private String config_key;
+
+    @Id
+    @Column(name = "CONFIG_VAL")
+    private String config_val;
+
+    @Id
+    @Column(name = "CATEGORY_ID")
+    private String category_id;
+
+    @Column(name = "EXPIRE_DATE")
+    private Timestamp expire_date;
+
+    public String getConfig_key() {
+        return config_key;
+    }
+
+    public String getConfig_val() {
+        return config_val;
+    }
+
+    public Timestamp getExpire_date() {
+        return expire_date;
+    }
+
+    public void setConfig_key(String config_key) {
+        this.config_key = config_key;
+    }
+
+    public void setConfig_val(String config_val) {
+        this.config_val = config_val;
+    }
+
+    public void setExpire_date(Timestamp expire_date) {
+        this.expire_date = expire_date;
+    }
+
+    public String getCategory_id() {
+        return category_id;
+    }
+
+    public void setCategory_id(String category_id) {
+        this.category_id = category_id;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java
new file mode 100644
index 0000000..b58fd71
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Configuration_PK.java
@@ -0,0 +1,74 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import java.io.Serializable;
+
+public class Configuration_PK implements Serializable {
+    private String config_key;
+    private String config_val;
+    private String category_id;
+
+    public Configuration_PK(String config_key, String config_val, String category_id) {
+        this.config_key = config_key;
+        this.config_val = config_val;
+        this.category_id = category_id;
+    }
+
+    public Configuration_PK() {
+        ;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getConfig_key() {
+        return config_key;
+    }
+
+    public void setConfig_key(String config_key) {
+        this.config_key = config_key;
+    }
+
+    public void setConfig_val(String config_val) {
+        this.config_val = config_val;
+    }
+
+    public String getConfig_val() {
+        return config_val;
+    }
+
+    public String getCategory_id() {
+        return category_id;
+    }
+
+    public void setCategory_id(String category_id) {
+        this.category_id = category_id;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java
new file mode 100644
index 0000000..95ad0e9
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/DataTransferDetail.java
@@ -0,0 +1,88 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@DataCache
+@Entity
+@Table(name = "DATA_TRANSFER_DETAIL")
+public class DataTransferDetail implements Serializable {
+    @Id
+    @Column(name = "TRANSFER_ID")
+    private String transferId;
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Column(name = "CREATION_TIME")
+    private Timestamp creationTime;
+    @Lob
+    @Column(name = "TRANSFER_DESC")
+    private char[] transferDesc;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail task;
+
+    public String getTransferId() {
+        return transferId;
+    }
+
+    public void setTransferId(String transferId) {
+        this.transferId = transferId;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public char[] getTransferDesc() {
+        return transferDesc;
+    }
+
+    public void setTransferDesc(char[] transferDesc) {
+        this.transferDesc = transferDesc;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
new file mode 100644
index 0000000..28d393f
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ErrorDetail.java
@@ -0,0 +1,196 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@DataCache
+@Entity
+@Table(name = "ERROR_DETAIL")
+public class ErrorDetail implements Serializable {
+    @Id
+    @GeneratedValue
+    @Column(name = "ERROR_ID")
+    private int errorID;
+    @Column(name = "EXPERIMENT_ID")
+    private String expId;
+    @Column(name = "TASK_ID")
+    private String taskId;
+    @Column(name = "NODE_INSTANCE_ID")
+    private String nodeId;
+    @Column(name = "CREATION_TIME")
+    private Timestamp creationTime;
+    @Lob
+    @Column(name = "ACTUAL_ERROR_MESSAGE")
+    private char[] actualErrorMsg;
+    
+    @Column(name = "USER_FRIEDNLY_ERROR_MSG")
+    private String userFriendlyErrorMsg;
+    @Column(name = "TRANSIENT_OR_PERSISTENT")
+    private boolean transientPersistent;
+    @Column(name = "ERROR_CATEGORY")
+    private String errorCategory;
+    @Column(name = "CORRECTIVE_ACTION")
+    private String correctiveAction;
+    @Column(name = "ACTIONABLE_GROUP")
+    private String actionableGroup;
+    @Column(name = "JOB_ID")
+    private String jobId;
+
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "TASK_ID")
+    private TaskDetail task;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "NODE_INSTANCE_ID")
+    private WorkflowNodeDetail nodeDetails;
+
+    public int getErrorId() {
+        return errorID;
+    }
+
+    public void setErrorId(int errorID) {
+        this.errorID = errorID;
+    }
+
+    public String getExpId() {
+        return expId;
+    }
+
+    public void setExpId(String expId) {
+        this.expId = expId;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getNodeId() {
+        return nodeId;
+    }
+
+    public void setNodeId(String nodeId) {
+        this.nodeId = nodeId;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public char[] getActualErrorMsg() {
+		return actualErrorMsg;
+	}
+
+	public void setActualErrorMsg(char[] actualErrorMsg) {
+		this.actualErrorMsg = actualErrorMsg;
+	}
+
+	public String getUserFriendlyErrorMsg() {
+        return userFriendlyErrorMsg;
+    }
+
+    public void setUserFriendlyErrorMsg(String userFriendlyErrorMsg) {
+        this.userFriendlyErrorMsg = userFriendlyErrorMsg;
+    }
+
+    public boolean isTransientPersistent() {
+        return transientPersistent;
+    }
+
+    public void setTransientPersistent(boolean transientPersistent) {
+        this.transientPersistent = transientPersistent;
+    }
+
+    public String getErrorCategory() {
+        return errorCategory;
+    }
+
+    public void setErrorCategory(String errorCategory) {
+        this.errorCategory = errorCategory;
+    }
+
+    public String getActionableGroup() {
+        return actionableGroup;
+    }
+
+    public void setActionableGroup(String actionableGroup) {
+        this.actionableGroup = actionableGroup;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    public TaskDetail getTask() {
+        return task;
+    }
+
+    public void setTask(TaskDetail task) {
+        this.task = task;
+    }
+
+    public WorkflowNodeDetail getNodeDetails() {
+        return nodeDetails;
+    }
+
+    public void setNodeDetails(WorkflowNodeDetail nodeDetails) {
+        this.nodeDetails = nodeDetails;
+    }
+
+    public String getCorrectiveAction() {
+        return correctiveAction;
+    }
+
+    public void setCorrectiveAction(String correctiveAction) {
+        this.correctiveAction = correctiveAction;
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
new file mode 100644
index 0000000..1c2d430
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
@@ -0,0 +1,211 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+
+package org.apache.airavata.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@Entity
+@Table(name = "EXPERIMENT")
+@DataCache
+public class Experiment implements Serializable {
+    @Id
+    @Column(name = "EXPERIMENT_ID")
+    private String expId;
+    @Column(name = "GATEWAY_ID")
+    private String gatewayId;
+    @Column(name = "EXECUTION_USER")
+    private String executionUser;
+    @Column(name = "PROJECT_ID")
+    private String projectID;
+    @Column(name = "CREATION_TIME")
+    private Timestamp creationTime;
+    @Column(name = "EXPERIMENT_NAME")
+    private String expName;
+    @Column(name = "EXPERIMENT_DESCRIPTION")
+    private String expDesc;
+    @Column(name = "APPLICATION_ID")
+    private String applicationId;
+    @Column(name = "APPLICATION_VERSION")
+    private String appVersion;
+    @Column(name = "WORKFLOW_TEMPLATE_ID")
+    private String workflowTemplateId;
+    @Column(name = "WORKFLOW_TEMPLATE_VERSION")
+    private String workflowTemplateVersion;
+    @Column(name = "WORKFLOW_EXECUTION_ID")
+    private String workflowExecutionId;
+    @Column(name = "ALLOW_NOTIFICATION")
+    private boolean allowNotification;
+    @Column(name = "GATEWAY_EXECUTION_ID")
+    private String gatewayExecutionId;
+
+    @ManyToOne(cascade=CascadeType.MERGE)
+    @JoinColumn(name = "GATEWAY_ID")
+    private Gateway gateway;
+
+    @ManyToOne(cascade=CascadeType.MERGE)
+    @JoinColumn(name = "PROJECT_ID")
+    private Project project;
+
+    @ManyToOne(cascade=CascadeType.MERGE)
+    @JoinColumn(name = "EXECUTION_USER", referencedColumnName = "USER_NAME")
+    private Users user;
+
+    public String getExpId() {
+        return expId;
+    }
+
+    public void setExpId(String expId) {
+        this.expId = expId;
+    }
+
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
+
+    public String getExecutionUser() {
+        return executionUser;
+    }
+
+    public void setExecutionUser(String executionUser) {
+        this.executionUser = executionUser;
+    }
+
+    public String getProjectId() {
+        return projectID;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectID = projectId;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public String getExpName() {
+        return expName;
+    }
+
+    public void setExpName(String expName) {
+        this.expName = expName;
+    }
+
+    public String getExpDesc() {
+        return expDesc;
+    }
+
+    public void setExpDesc(String expDesc) {
+        this.expDesc = expDesc;
+    }
+
+    public String getApplicationId() {
+        return applicationId;
+    }
+
+    public void setApplicationId(String applicationId) {
+        this.applicationId = applicationId;
+    }
+
+    public String getAppVersion() {
+        return appVersion;
+    }
+
+    public void setAppVersion(String appVersion) {
+        this.appVersion = appVersion;
+    }
+
+    public String getWorkflowTemplateId() {
+        return workflowTemplateId;
+    }
+
+    public void setWorkflowTemplateId(String workflowTemplateId) {
+        this.workflowTemplateId = workflowTemplateId;
+    }
+
+    public String getWorkflowTemplateVersion() {
+        return workflowTemplateVersion;
+    }
+
+    public void setWorkflowTemplateVersion(String workflowTemplateVersion) {
+        this.workflowTemplateVersion = workflowTemplateVersion;
+    }
+
+    public String getWorkflowExecutionId() {
+        return workflowExecutionId;
+    }
+
+    public void setWorkflowExecutionId(String workflowExecutionId) {
+        this.workflowExecutionId = workflowExecutionId;
+    }
+
+    public Gateway getGateway() {
+        return gateway;
+    }
+
+    public void setGateway(Gateway gateway) {
+        this.gateway = gateway;
+    }
+
+    public Project getProject() {
+        return project;
+    }
+
+    public void setProject(Project project) {
+        this.project = project;
+    }
+
+    public Users getUser() {
+        return user;
+    }
+
+    public void setUser(Users user) {
+        this.user = user;
+    }
+
+    public boolean isAllowNotification() {
+        return allowNotification;
+    }
+
+    public void setAllowNotification(boolean allowNotification) {
+        this.allowNotification = allowNotification;
+    }
+
+    public String getGatewayExecutionId() {
+        return gatewayExecutionId;
+    }
+
+    public void setGatewayExecutionId(String gatewayExecutionId) {
+        this.gatewayExecutionId = gatewayExecutionId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
new file mode 100644
index 0000000..63e91ad
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ExperimentConfigData.java
@@ -0,0 +1,106 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name = "CONFIG_DATA")
+public class ExperimentConfigData implements Serializable {
+    @Id
+    @Column(name = "EXPERIMENT_ID")
+    private String expId;
+    @Column(name = "AIRAVATA_AUTO_SCHEDULE")
+    private boolean airavataAutoSchedule;
+    @Column(name = "OVERRIDE_MANUAL_SCHEDULE_PARAMS")
+    private boolean overrideManualParams;
+    @Column(name = "SHARE_EXPERIMENT")
+    private boolean shareExp;
+    @Column(name = "USER_DN")
+    private String userDn;
+    @Column(name = "GENERATE_CERT")
+    private boolean generateCert;
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    public String getExpId() {
+        return expId;
+    }
+
+    public void setExpId(String expId) {
+        this.expId = expId;
+    }
+
+    public boolean isAiravataAutoSchedule() {
+        return airavataAutoSchedule;
+    }
+
+    public void setAiravataAutoSchedule(boolean airavataAutoSchedule) {
+        this.airavataAutoSchedule = airavataAutoSchedule;
+    }
+
+    public boolean isOverrideManualParams() {
+        return overrideManualParams;
+    }
+
+    public void setOverrideManualParams(boolean overrideManualParams) {
+        this.overrideManualParams = overrideManualParams;
+    }
+
+    public boolean isShareExp() {
+        return shareExp;
+    }
+
+    public void setShareExp(boolean shareExp) {
+        this.shareExp = shareExp;
+    }
+
+    public Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    public String getUserDn() {
+        return userDn;
+    }
+
+    public void setUserDn(String userDn) {
+        this.userDn = userDn;
+    }
+
+    public boolean isGenerateCert() {
+        return generateCert;
+    }
+
+    public void setGenerateCert(boolean generateCert) {
+        this.generateCert = generateCert;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java
new file mode 100644
index 0000000..e8c5087
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment_Input.java
@@ -0,0 +1,178 @@
+/*
+ *
+ * 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.persistance.registry.jpa.model;
+
+import org.apache.openjpa.persistence.DataCache;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+@DataCache
+@Entity
+@Table(name ="EXPERIMENT_INPUT")
+@IdClass(Experiment_Input_PK.class)
+public class Experiment_Input implements Serializable {
+    @Id
+    @Column(name = "EXPERIMENT_ID")
+    private String experiment_id;
+
+    @Id
+    @Column(name = "INPUT_KEY")
+    private String ex_key;
+
+    @Lob
+    @Column(name = "VALUE")
+    private char[] value;
+
+    @Column(name = "DATA_TYPE")
+    private String dataType;
+
+    @Column(name = "APP_ARGUMENT")
+    private String appArgument;
+
+    @Column(name = "STANDARD_INPUT")
+    private boolean standardInput;
+
+    @Column(name = "USER_FRIENDLY_DESC")
+    private String userFriendlyDesc;
+
+    @Column(name = "METADATA")
+    private String metadata;
+
+    @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
+    @JoinColumn(name = "EXPERIMENT_ID")
+    private Experiment experiment;
+
+    public int getInputOrder() {
+        return inputOrder;
+    }
+
+    public void setInputOrder(int inputOrder) {
+        this.inputOrder = inputOrder;
+    }
+
+    public String getExperiment_id() {
+        return experiment_id;
+    }
+
+    public void setExperiment_id(String experiment_id) {
+        this.experiment_id = experiment_id;
+    }
+
+    public String getEx_key() {
+        return ex_key;
+    }
+
+    public void setEx_key(String ex_key) {
+        this.ex_key = ex_key;
+    }
+
+    public char[] getValue() {
+        return value;
+    }
+
+    public void setValue(char[] value) {
+        this.value = value;
+    }
+
+    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 Experiment getExperiment() {
+        return experiment;
+    }
+
+    public void setExperiment(Experiment experiment) {
+        this.experiment = experiment;
+    }
+
+    public String getAppArgument() {
+        return appArgument;
+    }
+
+    public void setAppArgument(String appArgument) {
+        this.appArgument = appArgument;
+    }
+
+    public boolean isStandardInput() {
+        return standardInput;
+    }
+
+    public void setStandardInput(boolean standardInput) {
+        this.standardInput = standardInput;
+    }
+
+    public String getUserFriendlyDesc() {
+        return userFriendlyDesc;
+    }
+
+    public void setUserFriendlyDesc(String userFriendlyDesc) {
+        this.userFriendlyDesc = userFriendlyDesc;
+    }
+
+    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;
+    }
+}


[09/44] airavata git commit: Adding mongo-registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/ExperimentDaoTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/ExperimentDaoTest.java b/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/ExperimentDaoTest.java
new file mode 100644
index 0000000..6b4d5cf
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/ExperimentDaoTest.java
@@ -0,0 +1,268 @@
+/*
+ *
+ * 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.persistence.registry.mongo;
+
+import com.mongodb.MongoClient;
+import junit.framework.Assert;
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
+import org.apache.airavata.persistance.registry.jpa.mongo.dao.ExperimentDao;
+import org.apache.airavata.persistance.registry.jpa.mongo.utils.MongoUtil;
+import org.apache.airavata.registry.cpi.Registry;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.apache.airavata.registry.cpi.RegistryModelType;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.List;
+import java.util.UUID;
+
+public class ExperimentDaoTest {
+    private final static Logger logger = LoggerFactory.getLogger(ExperimentDaoTest.class);
+
+    private static String gatewayId = "php_reference_gateway";
+
+    private static ExperimentDao experimentDao;
+    @BeforeClass
+    public static void setupBeforeClass() throws Exception{
+        experimentDao = new ExperimentDao();
+    }
+
+    @AfterClass
+    public static void tearDown(){
+        MongoClient mongoClient = MongoUtil.getMongoClient();
+        mongoClient.dropDatabase("airavata-data");
+    }
+
+    @Test
+    public void testExperimentDao() throws RegistryException {
+        String TAG = System.currentTimeMillis() + "";
+        //creating sample echo experiment
+        InputDataObjectType inputDataObjectType = new InputDataObjectType();
+        inputDataObjectType.setName("Input_to_Echo");
+        inputDataObjectType.setValue("Hello World");
+
+        ComputationalResourceScheduling scheduling = new ComputationalResourceScheduling();
+        scheduling.setResourceHostId(UUID.randomUUID().toString());
+        scheduling.setComputationalProjectAccount("TG-STA110014S");
+        scheduling.setTotalCpuCount(1);
+        scheduling.setNodeCount(1);
+        scheduling.setWallTimeLimit(15);
+        scheduling.setQueueName("normal");
+
+        UserConfigurationData userConfigurationData = new UserConfigurationData();
+        userConfigurationData.setAiravataAutoSchedule(false);
+        userConfigurationData.setOverrideManualScheduledParams(false);
+        userConfigurationData.setComputationalResourceScheduling(scheduling);
+
+        Experiment experiment = new Experiment();
+        experiment.setExperimentId("28395669237854235"+TAG);
+        experiment.setProjectId("2392519y92312341" + TAG);
+        experiment.setUserName("TestUser" + TAG);
+        experiment.setName("TestExperiment"+TAG);
+        experiment.setDescription("experiment");
+        experiment.setApplicationId("2358382458362846287"+TAG);
+        experiment.setUserConfigurationData(userConfigurationData);
+        experiment.addToExperimentInputs(inputDataObjectType);
+        experiment.setGatewayExecutionId("329619820461624214"+TAG);
+
+        experimentDao.createExperiment(experiment);
+        Experiment persistedExperiement = experimentDao.getExperiment(experiment.getExperimentId());
+        Assert.assertNotNull(persistedExperiement);
+        Assert.assertEquals(experiment, persistedExperiement);
+
+        experiment.setName("New Name"+TAG);
+        experimentDao.updateExperiment(experiment);
+        persistedExperiement = experimentDao.getExperiment(experiment.getExperimentId());
+        Assert.assertEquals(experiment, persistedExperiement);
+
+        List<Experiment> experimentList = experimentDao.getAllExperiments();
+        Assert.assertTrue(experimentList.size()==1);
+
+        experimentDao.deleteExperiment(experiment);
+        experimentList = experimentDao.getAllExperiments();
+        Assert.assertTrue(experimentList.size()==0);
+    }
+
+    @Test
+    public void test() throws RegistryException, IOException {
+        AiravataUtils.setExecutionAsServer();
+        Registry registry = RegistryFactory.getDefaultRegistry();
+        MongoUtil.dropAiravataRegistry();
+
+        ExperimentDao experimentDao = new ExperimentDao();
+        BufferedReader reader = new BufferedReader(new FileReader("/home/supun/Downloads/EXPERIMENT.csv"));
+        String temp = reader.readLine();
+        int i = 1;
+        long time1 = System.currentTimeMillis();
+        while(temp != null && !temp.isEmpty()){
+            try{
+                Experiment experiement = (Experiment) registry.get(RegistryModelType.EXPERIMENT, temp.trim());
+                experimentDao.createExperiment(experiement);
+                Experiment persistedExperiment = experimentDao.getExperiment(temp.trim());
+//                List<Experiment> experimentList = experimentDao.getAllExperiments();
+                Assert.assertEquals(experiement, persistedExperiment);
+                System.out.println(i+" :"+experiement.getExperimentId());
+                i++;
+            }catch (Exception e){
+                System.out.println(temp);
+                e.printStackTrace();
+            }
+            temp = reader.readLine();
+        }
+        long time2  = System.currentTimeMillis();
+        System.out.println(time2-time1);
+    }
+
+    @Test
+    public void testGetExperimentOfWFNode() throws RegistryException, IOException {
+//        String nodeId = "IDontNeedaNode_48c545a1-bedd-46cf-90d4-e4390b129693";
+//        ExperimentDao experimentDao = new ExperimentDao();
+//        long time1 = System.currentTimeMillis();
+//        Experiment experiment = experimentDao.getExperimentOfWFNode(nodeId);
+//        long time2 = System.currentTimeMillis();
+//        System.out.println(time2-time1);
+//        Assert.assertNotNull(experiment);
+        AiravataUtils.setExecutionAsServer();
+
+        ExperimentDao experimentDao = new ExperimentDao();
+        BufferedReader reader = new BufferedReader(new FileReader("/home/supun/Downloads/WORKFLOW_NODE_DETAIL.csv"));
+        String temp = reader.readLine();
+        int i = 1;
+        int count  = 0;
+        long time1 = System.currentTimeMillis();
+        while(temp != null && !temp.isEmpty()){
+            try{
+                Experiment experiment = experimentDao.getExperimentOfWFNode(temp.trim());
+                if(experiment != null) {
+                    System.out.println(i + " :" + experiment.getExperimentId());
+                    count++;
+                }else{
+                    System.out.println("FAILED: " + temp);
+                }
+                i++;
+            }catch (Exception e){
+                System.out.println(temp);
+                e.printStackTrace();
+            }
+            temp = reader.readLine();
+        }
+        long time2  = System.currentTimeMillis();
+        System.out.println(count);
+        System.out.println(time2-time1);
+    }
+
+    @Test
+    public void testGetExperimentOfTask() throws RegistryException, IOException {
+//        String taskId = "tempNode_fceda7f7-267c-4197-bf20-a54f4fff395b";
+//        ExperimentDao experimentDao = new ExperimentDao();
+//        long time1 = System.currentTimeMillis();
+//        Experiment experiment = experimentDao.getExperimentOfTask(taskId);
+//        long time2 = System.currentTimeMillis();
+//        System.out.println(time2-time1);
+//        Assert.assertNotNull(experiment);
+//        AiravataUtils.setExecutionAsServer();
+//        Registry registry = RegistryFactory.getDefaultRegistry();
+//        MongoUtil.dropAiravataRegistry();
+        AiravataUtils.setExecutionAsServer();
+
+        ExperimentDao experimentDao = new ExperimentDao();
+        BufferedReader reader = new BufferedReader(new FileReader("/home/supun/Downloads/TASK_DETAIL.csv"));
+        String temp = reader.readLine();
+        int i = 1;
+        int count  = 0;
+        long time1 = System.currentTimeMillis();
+        while(temp != null && !temp.isEmpty()){
+            try{
+                Experiment experiment = experimentDao.getExperimentOfTask(temp.trim());
+                if(experiment != null) {
+                    //System.out.println(i + " :" + experiment.getExperimentId());
+                    count++;
+                }else{
+                    System.out.println("FAILED: " + temp);
+                }
+                i++;
+            }catch (Exception e){
+                System.out.println(temp);
+                e.printStackTrace();
+            }
+            temp = reader.readLine();
+        }
+        long time2  = System.currentTimeMillis();
+        System.out.println(count);
+        System.out.println(time2-time1);
+    }
+
+    @Test
+    public void testWorkFlow() throws RegistryException {
+        String nodeId = "tempNode_758b52ba-091b-43a5-a7b7-4c3a239c5d1e";
+        String newNodeId = "newNode_758b52ba-091b-43a5-a7b7-4c3a2325d1e";
+        String expId = "AlamoTest3_3965f4e2-0213-4434-9c3f-fe898b018666";
+        AiravataUtils.setExecutionAsServer();
+        ExperimentDao experimentDao = new ExperimentDao();
+        WorkflowNodeDetails wfNode = experimentDao.getWFNode("newNode_758b52ba-091b-43a5-a7b7-4c3a239c5d1e");
+        Assert.assertTrue(wfNode.getNodeInstanceId().equals("newNode_758b52ba-091b-43a5-a7b7-4c3a239c5d1e"));
+
+        wfNode.setNodeName("New2 Name"+System.currentTimeMillis());
+        experimentDao.updateWFNode(wfNode);
+        WorkflowNodeDetails updatedWfNode = experimentDao.getWFNode("newNode_758b52ba-091b-43a5-a7b7-4c3a239c5d1e");
+        Assert.assertTrue(updatedWfNode.getNodeName().equals(wfNode.getNodeName()));
+
+        WorkflowNodeDetails newWfNode = wfNode;
+        newWfNode.setTaskDetailsList(null);
+        newWfNode.setNodeInstanceId(newNodeId);
+        experimentDao.createWFNode(expId, newWfNode);
+
+        Experiment experiment = experimentDao.getExperiment(expId);
+
+        experimentDao.deleteWFNode(newWfNode);
+
+        experiment = experimentDao.getExperiment(expId);
+
+        System.out.println();
+    }
+
+    @Test
+    public void testTask() throws RegistryException {
+        String taskId = "tempNode_f43e1a37-5aec-4061-ae15-111a050b98e0";
+        AiravataUtils.setExecutionAsServer();
+        ExperimentDao experimentDao = new ExperimentDao();
+        TaskDetails taskDetails = experimentDao.getTaskDetail(taskId);
+        Assert.assertTrue(taskDetails.getTaskId().equals(taskId));
+
+        taskDetails.setTaskStatus(null);
+        experimentDao.updateTaskDetail(taskDetails);
+        taskDetails = experimentDao.getTaskDetail(taskId);
+        Assert.assertTrue(taskDetails.getTaskId().equals(taskId));
+
+        String expid = "AlamoTest1_6107d1f0-d64e-4690-8686-71ce87c4ad24";
+        Experiment experiment = experimentDao.getExperiment(expid);
+        System.out.println();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/org/apache/airavata/persistence/registry/RegistryUseCaseTest.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/org/apache/airavata/persistence/registry/RegistryUseCaseTest.java b/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/org/apache/airavata/persistence/registry/RegistryUseCaseTest.java
new file mode 100644
index 0000000..0f0bd85
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/test/java/org/apache/airavata/persistence/registry/mongo/org/apache/airavata/persistence/registry/RegistryUseCaseTest.java
@@ -0,0 +1,291 @@
+/*
+ *
+ * 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.persistence.registry.mongo.org.apache.airavata.persistence.registry;
+
+import junit.framework.Assert;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
+import org.apache.airavata.model.workspace.experiment.Experiment;
+import org.apache.airavata.model.workspace.experiment.ExperimentSummary;
+import org.apache.airavata.model.workspace.experiment.UserConfigurationData;
+import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
+import org.apache.airavata.registry.cpi.*;
+import org.apache.airavata.registry.cpi.utils.Constants;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * This class contains test cases for the RegistryImpl class which is the default registry
+ * implementation. These test cases are written from the perspective of the Airavata API
+ * such as creating/updating/deleting/searching projects and experiments etc.
+ */
+public class RegistryUseCaseTest {
+
+    private static Registry registry;
+
+    @BeforeClass
+    public static void setupBeforeClass() throws RegistryException, SQLException {
+        registry = RegistryFactory.getDefaultRegistry();
+    }
+
+    @Test
+    public void testProject(){
+        try {
+            String TAG = System.currentTimeMillis() + "";
+
+            String gatewayId = ServerSettings.getDefaultUserGateway();
+
+            //testing the creation of a project
+            Project project = new Project();
+            project.setOwner("TestUser"+TAG);
+            project.setName("TestProject"+TAG);
+            project.setDescription("This is a test project"+TAG);
+            String projectId1 = (String)registry.add(ParentDataType.PROJECT, project, gatewayId);
+            Assert.assertNotNull(projectId1);
+
+            //testing the updateExperiment of a project
+            Project updatedProject = new Project();
+            updatedProject.setProjectId(projectId1);
+            updatedProject.setOwner("TestUser"+TAG);
+            updatedProject.setName("UpdatedTestProject"+TAG);
+            updatedProject.setDescription("This is an updated test project"+TAG);
+            registry.update(RegistryModelType.PROJECT, updatedProject, projectId1);
+
+            //testing project retrieval
+            Project retrievedProject = (Project)registry.get(RegistryModelType.PROJECT, projectId1);
+            Assert.assertEquals(updatedProject.getProjectId(), retrievedProject.getProjectId());
+            Assert.assertEquals(updatedProject.getOwner(), retrievedProject.getOwner());
+            Assert.assertEquals(updatedProject.getName(), retrievedProject.getName());
+            Assert.assertEquals(updatedProject.getDescription(), retrievedProject.getDescription());
+            Assert.assertNotNull(retrievedProject.getCreationTime());
+            //created user should be in the shared users list
+            Assert.assertTrue(retrievedProject.getSharedUsers().size()==1);
+
+            //creating more projects for the same user
+            project = new Project();
+            project.setOwner("TestUser"+TAG);
+            project.setName("Project Terrible"+TAG);
+            project.setDescription("This is a test project_2"+TAG);
+            String projectId2 = (String)registry.add(ParentDataType.PROJECT, project, gatewayId);
+            Assert.assertNotNull(projectId2);
+
+            project = new Project();
+            project.setOwner("TestUser"+TAG);
+            project.setName("Project Funny"+TAG);
+            project.setDescription("This is a test project_3"+TAG);
+            String projectId3 = (String)registry.add(ParentDataType.PROJECT, project, gatewayId);
+            Assert.assertNotNull(projectId3);
+
+            project = new Project();
+            project.setOwner("TestUser"+TAG);
+            project.setName("Project Stupid"+TAG);
+            project.setDescription("This is a test project_4"+TAG);
+            String projectId4 = (String)registry.add(ParentDataType.PROJECT, project, gatewayId);
+            Assert.assertNotNull(projectId4);
+
+            project = new Project();
+            project.setOwner("TestUser"+TAG);
+            project.setName("Project Boring"+TAG);
+            project.setDescription("This is a test project_5"+TAG);
+            String projectId5 = (String)registry.add(ParentDataType.PROJECT, project, gatewayId);
+            Assert.assertNotNull(projectId5);
+
+            //test getExperiment all projects created by the user
+            List<Object> list = registry.get(RegistryModelType.PROJECT,
+                    Constants.FieldConstants.ProjectConstants.OWNER, "TestUser"+TAG);
+            Assert.assertTrue(list.size()==5);
+
+            //search project by project name
+            Map<String, String> filters = new HashMap<String, String>();
+            filters.put(Constants.FieldConstants.ProjectConstants.OWNER, "TestUser"+TAG);
+            filters.put(Constants.FieldConstants.ProjectConstants.PROJECT_NAME, "Terrible"+TAG);
+            list = registry.search(RegistryModelType.PROJECT, filters);
+            Assert.assertTrue(list.size()==1);
+
+            //search project by project description
+            filters = new HashMap<String, String>();
+            filters.put(Constants.FieldConstants.ProjectConstants.OWNER, "TestUser"+TAG);
+            filters.put(Constants.FieldConstants.ProjectConstants.DESCRIPTION, "test project_2"+TAG);
+            list = registry.search(RegistryModelType.PROJECT, filters);
+            Assert.assertTrue(list.size()==1);
+
+            //search project with only ownername
+            filters = new HashMap<String, String>();
+            filters.put(Constants.FieldConstants.ProjectConstants.OWNER, "TestUser"+TAG);
+            list = registry.search(RegistryModelType.PROJECT, filters);
+            Assert.assertTrue(list.size()==5);
+
+            //search projects with pagination
+            filters = new HashMap<String, String>();
+            filters.put(Constants.FieldConstants.ProjectConstants.OWNER, "TestUser"+TAG);
+            list = registry.search(RegistryModelType.PROJECT, filters, 2, 2,
+                    Constants.FieldConstants.ProjectConstants.CREATION_TIME, ResultOrderType.DESC);
+            Assert.assertTrue(list.size()==2);
+            Project project1 = (Project)list.get(0);
+            Project project2 = (Project)list.get(1);
+            Assert.assertTrue(project1.getCreationTime()-project2.getCreationTime() > 0);
+        } catch (RegistryException e) {
+            e.printStackTrace();
+            Assert.fail();
+        } catch (ApplicationSettingsException e) {
+            e.printStackTrace();
+        }
+    }
+
+    @Test
+    public void testExperiment(){
+        try {
+            String TAG = System.currentTimeMillis() + "";
+
+            String gatewayId = ServerSettings.getDefaultUserGateway();
+
+            //creating project
+            Project project = new Project();
+            project.setOwner("TestUser"+TAG);
+            project.setName("TestProject"+TAG);
+            project.setDescription("This is a test project"+TAG);
+            String projectId1 = (String)registry.add(ParentDataType.PROJECT, project, gatewayId);
+            Assert.assertNotNull(projectId1);
+
+            //creating sample echo experiment. assumes echo application is already defined
+            InputDataObjectType inputDataObjectType = new InputDataObjectType();
+            inputDataObjectType.setName("Input_to_Echo");
+            inputDataObjectType.setValue("Hello World");
+
+            ComputationalResourceScheduling scheduling = new ComputationalResourceScheduling();
+            scheduling.setResourceHostId(UUID.randomUUID().toString());
+            scheduling.setComputationalProjectAccount("TG-STA110014S");
+            scheduling.setTotalCpuCount(1);
+            scheduling.setNodeCount(1);
+            scheduling.setWallTimeLimit(15);
+            scheduling.setQueueName("normal");
+
+            UserConfigurationData userConfigurationData = new UserConfigurationData();
+            userConfigurationData.setAiravataAutoSchedule(false);
+            userConfigurationData.setOverrideManualScheduledParams(false);
+            userConfigurationData.setComputationalResourceScheduling(scheduling);
+
+            Experiment experiment = new Experiment();
+            experiment.setProjectId(projectId1);
+            experiment.setUserName("TestUser" + TAG);
+            experiment.setName("TestExperiment"+TAG);
+            experiment.setDescription("Test 1 experiment");
+            experiment.setApplicationId(UUID.randomUUID().toString());
+            experiment.setUserConfigurationData(userConfigurationData);
+            experiment.addToExperimentInputs(inputDataObjectType);
+
+            String experimentId1 = (String)registry.add(ParentDataType.EXPERIMENT, experiment, gatewayId);
+            Assert.assertNotNull(experimentId1);
+
+            //retrieving the stored experiment
+            Experiment retrievedExperiment = (Experiment)registry.get(RegistryModelType.EXPERIMENT,
+                    experimentId1);
+            Assert.assertNotNull(retrievedExperiment);
+            Assert.assertEquals(retrievedExperiment.getProjectId(), experiment.getProjectId());
+            Assert.assertEquals(retrievedExperiment.getDescription(), experiment.getDescription());
+            Assert.assertEquals(retrievedExperiment.getName(), experiment.getName());
+            Assert.assertEquals(retrievedExperiment.getApplicationId(), experiment.getApplicationId());
+            Assert.assertNotNull(retrievedExperiment.getUserConfigurationData());
+            Assert.assertNotNull(retrievedExperiment.getExperimentInputs());
+
+            //updating an existing experiment
+            experiment.setName("NewExperimentName"+TAG);
+            OutputDataObjectType outputDataObjectType = new OutputDataObjectType();
+            outputDataObjectType.setName("Output_to_Echo");
+            outputDataObjectType.setValue("Hello World");
+            experiment.addToExperimentOutputs(outputDataObjectType);
+            registry.update(RegistryModelType.EXPERIMENT, experiment, experimentId1);
+
+            //creating more experiments
+            experiment = new Experiment();
+            experiment.setProjectId(projectId1);
+            experiment.setUserName("TestUser" + TAG);
+            experiment.setName("TestExperiment2" + TAG);
+            experiment.setDescription("Test 2 experiment");
+            experiment.setApplicationId(UUID.randomUUID().toString());
+            experiment.setUserConfigurationData(userConfigurationData);
+            experiment.addToExperimentInputs(inputDataObjectType);
+
+            String experimentId2 = (String)registry.add(ParentDataType.EXPERIMENT, experiment, gatewayId);
+            Assert.assertNotNull(experimentId2);
+
+            experiment = new Experiment();
+            experiment.setProjectId(projectId1);
+            experiment.setUserName("TestUser" + TAG);
+            experiment.setName("TestExperiment3"+TAG);
+            experiment.setDescription("Test 3 experiment");
+            experiment.setApplicationId(UUID.randomUUID().toString());
+            experiment.setUserConfigurationData(userConfigurationData);
+            experiment.addToExperimentInputs(inputDataObjectType);
+
+            String experimentId3 = (String)registry.add(ParentDataType.EXPERIMENT, experiment, gatewayId);
+            Assert.assertNotNull(experimentId3);
+
+            //searching experiments by name
+            Map<String, String> filters = new HashMap<String, String>();
+            filters.put(Constants.FieldConstants.ExperimentConstants.USER_NAME, "TestUser" + TAG);
+            filters.put(Constants.FieldConstants.ExperimentConstants.GATEWAY, gatewayId);
+            filters.put(Constants.FieldConstants.ExperimentConstants.EXPERIMENT_NAME, "Experiment2");
+            List<Object> results = registry.search(RegistryModelType.EXPERIMENT, filters);
+            Assert.assertTrue(results.size()==1);
+
+            //retrieving all experiments in project
+            List<Object> list = registry.get(RegistryModelType.EXPERIMENT,
+                    Constants.FieldConstants.ExperimentConstants.PROJECT_ID, projectId1);
+            Assert.assertTrue(list.size()==3);
+
+            //searching all user experiments
+            filters = new HashMap<String, String>();
+            filters.put(Constants.FieldConstants.ExperimentConstants.USER_NAME, "TestUser" + TAG);
+            filters.put(Constants.FieldConstants.ExperimentConstants.GATEWAY, gatewayId);
+            list = registry.search(RegistryModelType.EXPERIMENT, filters);
+            Assert.assertTrue(list.size()==3);
+
+            //searching user experiemets with pagination
+            filters = new HashMap<String, String>();
+            filters.put(Constants.FieldConstants.ExperimentConstants.USER_NAME, "TestUser" + TAG);
+            filters.put(Constants.FieldConstants.ExperimentConstants.GATEWAY, gatewayId);
+            list = registry.search(RegistryModelType.EXPERIMENT, filters, 2, 1,
+                    Constants.FieldConstants.ExperimentConstants.CREATION_TIME, ResultOrderType.DESC);
+            Assert.assertTrue(list.size()==2);
+            ExperimentSummary exp1 = (ExperimentSummary)list.get(0);
+            ExperimentSummary exp2 = (ExperimentSummary)list.get(1);
+            Assert.assertTrue(exp1.getCreationTime()-exp2.getCreationTime() > 0);
+
+        } catch (RegistryException e) {
+            e.printStackTrace();
+            Assert.fail();
+        } catch (ApplicationSettingsException e) {
+            e.printStackTrace();
+        }
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/pom.xml
----------------------------------------------------------------------
diff --git a/modules/registry/pom.xml b/modules/registry/pom.xml
index 72020a2..a3879fc 100644
--- a/modules/registry/pom.xml
+++ b/modules/registry/pom.xml
@@ -32,6 +32,7 @@
             <modules>
                 <module>registry-cpi</module>
                 <module>airavata-jpa-registry</module>
+                <module>airavata-mongo-registry</module>
                 <!--<module>jpa-gen</module>-->
             </modules>
         </profile>


[34/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
deleted file mode 100644
index ab9d924..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
+++ /dev/null
@@ -1,777 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.*;
-import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.utils.StatusType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.List;
-
-public class ExperimentResource extends AbstractResource {
-    private static final Logger logger = LoggerFactory.getLogger(ExperimentResource.class);
-//    private WorkerResource worker;
-    private String executionUser;
-    private String expID;
-    private Timestamp creationTime;
-    private GatewayResource gateway;
-    private ProjectResource project;
-    private String expName;
-    private String description;
-    private String applicationId;
-    private String applicationVersion;
-    private String workflowTemplateId;
-    private String workflowTemplateVersion;
-    private String workflowExecutionId;
-    private boolean enableEmailNotifications;
-    private String gatewayExecutionId;
-
-    /**
-     *
-     * @return  experiment ID
-     */
-    public String getExpID() {
-        return expID;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public String getExpName() {
-        return expName;
-    }
-
-    public void setExpName(String expName) {
-        this.expName = expName;
-    }
-
-    public String getApplicationId() {
-        return applicationId;
-    }
-
-    public void setApplicationId(String applicationId) {
-        this.applicationId = applicationId;
-    }
-
-    public String getApplicationVersion() {
-        return applicationVersion;
-    }
-
-    public void setApplicationVersion(String applicationVersion) {
-        this.applicationVersion = applicationVersion;
-    }
-
-    public String getWorkflowTemplateId() {
-        return workflowTemplateId;
-    }
-
-    public void setWorkflowTemplateId(String workflowTemplateId) {
-        this.workflowTemplateId = workflowTemplateId;
-    }
-
-    public String getWorkflowTemplateVersion() {
-        return workflowTemplateVersion;
-    }
-
-    public void setWorkflowTemplateVersion(String workflowTemplateVersion) {
-        this.workflowTemplateVersion = workflowTemplateVersion;
-    }
-
-    public String getWorkflowExecutionId() {
-        return workflowExecutionId;
-    }
-
-    public void setWorkflowExecutionId(String workflowExecutionId) {
-        this.workflowExecutionId = workflowExecutionId;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public boolean isEnableEmailNotifications() {
-        return enableEmailNotifications;
-    }
-
-    public void setEnableEmailNotifications(boolean enableEmailNotifications) {
-        this.enableEmailNotifications = enableEmailNotifications;
-    }
-
-    public String getGatewayExecutionId() {
-        return gatewayExecutionId;
-    }
-
-    public void setGatewayExecutionId(String gatewayExecutionId) {
-        this.gatewayExecutionId = gatewayExecutionId;
-    }
-
-    /**
-     * Since experiments are at the leaf level, this method is not
-     * valid for an experiment
-     * @param type  child resource types
-     * @return UnsupportedOperationException
-     */
-    public Resource create(ResourceType type) throws RegistryException {
-    	switch (type){
-	        case EXPERIMENT_INPUT:
-	        	ExperimentInputResource inputResource = new ExperimentInputResource();
-	            inputResource.setExperimentResource(this);
-	            return inputResource;
-            case EXPERIMENT_OUTPUT:
-                ExperimentOutputResource experimentOutputResource = new ExperimentOutputResource();
-                experimentOutputResource.setExperimentResource(this);
-                return experimentOutputResource;
-            case NOTIFICATION_EMAIL:
-                NotificationEmailResource emailResource = new NotificationEmailResource();
-                emailResource.setExperimentResource(this);
-                return emailResource;
-            case WORKFLOW_NODE_DETAIL:
-                WorkflowNodeDetailResource nodeDetailResource = new WorkflowNodeDetailResource();
-                nodeDetailResource.setExperimentResource(this);
-                return nodeDetailResource;
-            case ERROR_DETAIL:
-                ErrorDetailResource errorDetailResource = new ErrorDetailResource();
-                errorDetailResource.setExperimentResource(this);
-                return errorDetailResource;
-            case STATUS:
-                StatusResource statusResource = new StatusResource();
-                statusResource.setExperimentResource(this);
-                return statusResource;
-            case CONFIG_DATA:
-                ConfigDataResource configDataResource = new ConfigDataResource();
-                configDataResource.setExperimentResource(this);
-                return configDataResource;
-            case COMPUTATIONAL_RESOURCE_SCHEDULING:
-                ComputationSchedulingResource schedulingResource = new ComputationSchedulingResource();
-                schedulingResource.setExperimentResource(this);
-                return schedulingResource;
-            case ADVANCE_INPUT_DATA_HANDLING:
-                AdvanceInputDataHandlingResource dataHandlingResource = new AdvanceInputDataHandlingResource();
-                dataHandlingResource.setExperimentResource(this);
-                return dataHandlingResource;
-            case ADVANCE_OUTPUT_DATA_HANDLING:
-                AdvancedOutputDataHandlingResource outputDataHandlingResource = new AdvancedOutputDataHandlingResource();
-                outputDataHandlingResource.setExperimentResource(this);
-                return outputDataHandlingResource;
-            case QOS_PARAM:
-                QosParamResource qosParamResource = new QosParamResource();
-                qosParamResource.setExperimentResource(this);
-                return qosParamResource;
-	        default:
-                logger.error("Unsupported resource type for experiment resource.", new IllegalArgumentException());
-	            throw new IllegalArgumentException("Unsupported resource type for experiment resource.");
-	    }
-    }
-
-    /**
-     *
-     * @param type  child resource types
-     * @param name name of the child resource
-     * @return UnsupportedOperationException
-     */
-    public void remove(ResourceType type, Object name) throws RegistryException {
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-            QueryGenerator generator;
-            switch (type) {
-                case EXPERIMENT_INPUT:
-                    generator = new QueryGenerator(EXPERIMENT_INPUT);
-                    generator.setParameter(ExperimentInputConstants.EXPERIMENT_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case EXPERIMENT_OUTPUT:
-                    generator = new QueryGenerator(EXPERIMENT_OUTPUT);
-                    generator.setParameter(ExperimentOutputConstants.EXPERIMENT_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case NOTIFICATION_EMAIL:
-                    generator = new QueryGenerator(NOTIFICATION_EMAIL);
-                    generator.setParameter(NotificationEmailConstants.EXPERIMENT_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case WORKFLOW_NODE_DETAIL:
-                    generator = new QueryGenerator(WORKFLOW_NODE_DETAIL);
-                    generator.setParameter(WorkflowNodeDetailsConstants.NODE_INSTANCE_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case ERROR_DETAIL:
-                    generator = new QueryGenerator(ERROR_DETAIL);
-                    generator.setParameter(ErrorDetailConstants.EXPERIMENT_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.EXPERIMENT_ID, name);
-                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.EXPERIMENT.toString());
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case CONFIG_DATA:
-                    generator = new QueryGenerator(CONFIG_DATA);
-                    generator.setParameter(ExperimentConfigurationDataConstants.EXPERIMENT_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case COMPUTATIONAL_RESOURCE_SCHEDULING:
-                    generator = new QueryGenerator(COMPUTATIONAL_RESOURCE_SCHEDULING);
-                    generator.setParameter(ComputationalResourceSchedulingConstants.EXPERIMENT_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case ADVANCE_INPUT_DATA_HANDLING:
-                    generator = new QueryGenerator(ADVANCE_INPUT_DATA_HANDLING);
-                    generator.setParameter(AdvancedInputDataHandlingConstants.EXPERIMENT_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case ADVANCE_OUTPUT_DATA_HANDLING:
-                    generator = new QueryGenerator(ADVANCE_OUTPUT_DATA_HANDLING);
-                    generator.setParameter(AdvancedOutputDataHandlingConstants.EXPERIMENT_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case QOS_PARAM:
-                    generator = new QueryGenerator(QOS_PARAMS);
-                    generator.setParameter(QosParamsConstants.EXPERIMENT_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                default:
-                    logger.error("Unsupported resource type for experiment resource.", new IllegalArgumentException());
-                    break;
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     *
-     * @param type  child resource types
-     * @param name name of the child resource
-     * @return UnsupportedOperationException
-     */
-    public Resource get(ResourceType type, Object name) throws RegistryException {
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            QueryGenerator generator;
-            Query q;
-            switch (type) {
-                case EXPERIMENT_INPUT:
-                    generator = new QueryGenerator(EXPERIMENT_INPUT);
-                    generator.setParameter(ExperimentInputConstants.EXPERIMENT_ID, name);
-                    q = generator.selectQuery(em);
-                    Experiment_Input experimentInput = (Experiment_Input) q.getSingleResult();
-                    ExperimentInputResource inputResource = (ExperimentInputResource) Utils.getResource(ResourceType.EXPERIMENT_INPUT, experimentInput);
-                    em.getTransaction().commit();
-                    em.close();
-                    return inputResource;
-                case EXPERIMENT_OUTPUT:
-                    generator = new QueryGenerator(EXPERIMENT_OUTPUT);
-                    generator.setParameter(ExperimentOutputConstants.EXPERIMENT_ID, name);
-                    q = generator.selectQuery(em);
-                    Experiment_Output experimentOutput = (Experiment_Output) q.getSingleResult();
-                    ExperimentOutputResource outputResource = (ExperimentOutputResource) Utils.getResource(ResourceType.EXPERIMENT_OUTPUT, experimentOutput);
-                    em.getTransaction().commit();
-                    em.close();
-                    return outputResource;
-                case NOTIFICATION_EMAIL:
-                    generator = new QueryGenerator(NOTIFICATION_EMAIL);
-                    generator.setParameter(NotificationEmailConstants.EXPERIMENT_ID, name);
-                    q = generator.selectQuery(em);
-                    Notification_Email notificationEmail = (Notification_Email) q.getSingleResult();
-                    NotificationEmailResource notificationEmailResource = (NotificationEmailResource) Utils.getResource(ResourceType.NOTIFICATION_EMAIL, notificationEmail);
-                    em.getTransaction().commit();
-                    em.close();
-                    return notificationEmailResource;
-                case WORKFLOW_NODE_DETAIL:
-                    generator = new QueryGenerator(WORKFLOW_NODE_DETAIL);
-                    generator.setParameter(WorkflowNodeDetailsConstants.NODE_INSTANCE_ID, name);
-                    q = generator.selectQuery(em);
-                    WorkflowNodeDetail workflowNodeDetail = (WorkflowNodeDetail) q.getSingleResult();
-                    WorkflowNodeDetailResource nodeDetailResource = (WorkflowNodeDetailResource) Utils.getResource(ResourceType.WORKFLOW_NODE_DETAIL, workflowNodeDetail);
-                    em.getTransaction().commit();
-                    em.close();
-                    return nodeDetailResource;
-                case ERROR_DETAIL:
-                    generator = new QueryGenerator(ERROR_DETAIL);
-                    generator.setParameter(ErrorDetailConstants.EXPERIMENT_ID, name);
-                    q = generator.selectQuery(em);
-                    ErrorDetail errorDetail = (ErrorDetail) q.getSingleResult();
-                    ErrorDetailResource errorDetailResource = (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
-                    em.getTransaction().commit();
-                    em.close();
-                    return errorDetailResource;
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.EXPERIMENT_ID, name);
-                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.EXPERIMENT.toString());
-                    q = generator.selectQuery(em);
-                    Status status = (Status) q.getSingleResult();
-                    StatusResource statusResource = (StatusResource) Utils.getResource(ResourceType.STATUS, status);
-                    em.getTransaction().commit();
-                    em.close();
-                    return statusResource;
-                case CONFIG_DATA:
-                    generator = new QueryGenerator(CONFIG_DATA);
-                    generator.setParameter(ExperimentConfigurationDataConstants.EXPERIMENT_ID, name);
-                    q = generator.selectQuery(em);
-                    ExperimentConfigData configData = (ExperimentConfigData) q.getSingleResult();
-                    ConfigDataResource configDataResource = (ConfigDataResource) Utils.getResource(ResourceType.CONFIG_DATA, configData);
-                    em.getTransaction().commit();
-                    em.close();
-                    return configDataResource;
-                case COMPUTATIONAL_RESOURCE_SCHEDULING:
-                    generator = new QueryGenerator(COMPUTATIONAL_RESOURCE_SCHEDULING);
-                    generator.setParameter(ComputationalResourceSchedulingConstants.EXPERIMENT_ID, name);
-                    generator.setParameter(ComputationalResourceSchedulingConstants.TASK_ID, null);
-                    q = generator.selectQuery(em);
-                    Computational_Resource_Scheduling scheduling = (Computational_Resource_Scheduling) q.getSingleResult();
-                    ComputationSchedulingResource schedulingResource = (ComputationSchedulingResource) Utils.getResource(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING, scheduling);
-                    em.getTransaction().commit();
-                    em.close();
-                    return schedulingResource;
-                case ADVANCE_INPUT_DATA_HANDLING:
-                    generator = new QueryGenerator(ADVANCE_INPUT_DATA_HANDLING);
-                    generator.setParameter(AdvancedInputDataHandlingConstants.EXPERIMENT_ID, name);
-                    generator.setParameter(AdvancedInputDataHandlingConstants.TASK_ID, null);
-                    q = generator.selectQuery(em);
-                    AdvancedInputDataHandling inputDataHandling = (AdvancedInputDataHandling) q.getSingleResult();
-                    AdvanceInputDataHandlingResource dataHandlingResource = (AdvanceInputDataHandlingResource) Utils.getResource(ResourceType.ADVANCE_INPUT_DATA_HANDLING, inputDataHandling);
-                    em.getTransaction().commit();
-                    em.close();
-                    return dataHandlingResource;
-                case ADVANCE_OUTPUT_DATA_HANDLING:
-                    generator = new QueryGenerator(ADVANCE_OUTPUT_DATA_HANDLING);
-                    generator.setParameter(AdvancedOutputDataHandlingConstants.EXPERIMENT_ID, name);
-                    generator.setParameter(AdvancedOutputDataHandlingConstants.TASK_ID, null);
-                    q = generator.selectQuery(em);
-                    AdvancedOutputDataHandling outputDataHandling = (AdvancedOutputDataHandling) q.getSingleResult();
-                    AdvancedOutputDataHandlingResource outputDataHandlingResource = (AdvancedOutputDataHandlingResource) Utils.getResource(ResourceType.ADVANCE_OUTPUT_DATA_HANDLING, outputDataHandling);
-                    em.getTransaction().commit();
-                    em.close();
-                    return outputDataHandlingResource;
-                case QOS_PARAM:
-                    generator = new QueryGenerator(QOS_PARAMS);
-                    generator.setParameter(QosParamsConstants.EXPERIMENT_ID, name);
-                    generator.setParameter(QosParamsConstants.TASK_ID, null);
-                    q = generator.selectQuery(em);
-                    QosParam qosParam = (QosParam) q.getSingleResult();
-                    QosParamResource qosParamResource = (QosParamResource) Utils.getResource(ResourceType.QOS_PARAM, qosParam);
-                    em.getTransaction().commit();
-                    em.close();
-                    return qosParamResource;
-                default:
-                    em.getTransaction().commit();
-                    em.close();
-                    logger.error("Unsupported resource type for experiment resource.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Unsupported resource type for experiment data resource.");
-            }
-        } catch (Exception e) {
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-
-    }
-
-    /**
-     *
-     * @param type  child resource types
-     * @return UnsupportedOperationException
-     */
-    public List<Resource> get(ResourceType type)  throws RegistryException{
-        List<Resource> resourceList = new ArrayList<Resource>();
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-            QueryGenerator generator;
-            List results;
-            switch (type) {
-                case EXPERIMENT_INPUT:
-                    generator = new QueryGenerator(EXPERIMENT_INPUT);
-                    generator.setParameter(ExperimentInputConstants.EXPERIMENT_ID, expID);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Experiment_Input exInput = (Experiment_Input) result;
-                            ExperimentInputResource inputResource =
-                                    (ExperimentInputResource) Utils.getResource(ResourceType.EXPERIMENT_INPUT, exInput);
-                            resourceList.add(inputResource);
-                        }
-                    }
-                    break;
-                case EXPERIMENT_OUTPUT:
-                    generator = new QueryGenerator(EXPERIMENT_OUTPUT);
-                    generator.setParameter(ExperimentOutputConstants.EXPERIMENT_ID, expID);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Experiment_Output output = (Experiment_Output) result;
-                            ExperimentOutputResource outputResource =
-                                    (ExperimentOutputResource) Utils.getResource(ResourceType.EXPERIMENT_OUTPUT, output);
-                            resourceList.add(outputResource);
-                        }
-                    }
-                    break;
-                case NOTIFICATION_EMAIL:
-                    generator = new QueryGenerator(NOTIFICATION_EMAIL);
-                    generator.setParameter(NotificationEmailConstants.EXPERIMENT_ID, expID);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Notification_Email notificationEmail = (Notification_Email) result;
-                            NotificationEmailResource emailResource =
-                                    (NotificationEmailResource) Utils.getResource(ResourceType.NOTIFICATION_EMAIL, notificationEmail);
-                            resourceList.add(emailResource);
-                        }
-                    }
-                    break;
-                case WORKFLOW_NODE_DETAIL:
-                    generator = new QueryGenerator(WORKFLOW_NODE_DETAIL);
-                    generator.setParameter(WorkflowNodeDetailsConstants.EXPERIMENT_ID, expID);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            WorkflowNodeDetail nodeDetail = (WorkflowNodeDetail) result;
-                            WorkflowNodeDetailResource nodeDetailResource =
-                                    (WorkflowNodeDetailResource) Utils.getResource(ResourceType.WORKFLOW_NODE_DETAIL, nodeDetail);
-                            resourceList.add(nodeDetailResource);
-                        }
-                    }
-                    break;
-                case ERROR_DETAIL:
-                    generator = new QueryGenerator(ERROR_DETAIL);
-                    generator.setParameter(ErrorDetailConstants.EXPERIMENT_ID, expID);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            ErrorDetail errorDetail = (ErrorDetail) result;
-                            ErrorDetailResource errorDetailResource =
-                                    (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
-                            resourceList.add(errorDetailResource);
-                        }
-                    }
-                    break;
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.EXPERIMENT_ID, expID);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Status status = (Status) result;
-                            StatusResource statusResource =
-                                    (StatusResource) Utils.getResource(ResourceType.STATUS, status);
-                            resourceList.add(statusResource);
-                        }
-                    }
-                    break;
-                default:
-                    em.getTransaction().commit();
-                    em.close();
-                    logger.error("Unsupported resource type for experiment resource.", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return resourceList;
-    }
-
-    /**
-     * saveExperiment experiment
-     */
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            Experiment existingExp = em.find(Experiment.class, expID);
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Experiment experiment = new Experiment();
-            Project projectmodel = em.find(Project.class, project.getId());
-            experiment.setProject(projectmodel);
-            experiment.setProjectId(projectmodel.getProject_id());
-            Gateway gateway = em.find(Gateway.class, getGateway().getGatewayId());
-            experiment.setExpId(expID);
-            experiment.setExecutionUser(executionUser);
-            Users userModel = em.find(Users.class, executionUser);
-            experiment.setUser(userModel);
-            experiment.setExecutionUser(userModel.getUser_name());
-            experiment.setGateway(gateway);
-            experiment.setGatewayId(gateway.getGateway_id());
-            experiment.setCreationTime(creationTime);
-            experiment.setExpName(expName);
-            experiment.setExpDesc(description);
-            experiment.setApplicationId(applicationId);
-            experiment.setAppVersion(applicationVersion);
-            experiment.setWorkflowExecutionId(workflowExecutionId);
-            experiment.setWorkflowTemplateVersion(workflowTemplateVersion);
-            experiment.setWorkflowExecutionId(workflowExecutionId);
-            experiment.setAllowNotification(enableEmailNotifications);
-            experiment.setGatewayExecutionId(gatewayExecutionId);
-            if (existingExp != null) {
-                existingExp.setGateway(gateway);
-                existingExp.setGatewayId(gateway.getGateway_id());
-                existingExp.setProject(projectmodel);
-                existingExp.setExecutionUser(executionUser);
-                existingExp.setUser(userModel);
-                existingExp.setProjectId(projectmodel.getProject_id());
-                existingExp.setCreationTime(creationTime);
-                existingExp.setExpName(expName);
-                existingExp.setExpDesc(description);
-                existingExp.setApplicationId(applicationId);
-                existingExp.setAppVersion(applicationVersion);
-                existingExp.setWorkflowExecutionId(workflowExecutionId);
-                existingExp.setWorkflowTemplateVersion(workflowTemplateVersion);
-                existingExp.setWorkflowExecutionId(workflowExecutionId);
-                existingExp.setAllowNotification(enableEmailNotifications);
-                existingExp.setGatewayExecutionId(gatewayExecutionId);
-                experiment = em.merge(existingExp);
-            } else {
-                em.persist(experiment);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     *
-     * @param expID experiment ID
-     */
-    public void setExpID(String expID) {
-		this.expID = expID;
-	}
-
-    /**
-     *
-     * @return gatewayResource
-     */
-    public GatewayResource getGateway() {
-		return gateway;
-	}
-
-    /**
-     *
-     * @param gateway gateway
-     */
-    public void setGateway(GatewayResource gateway) {
-		this.gateway = gateway;
-	}
-
-    public String getExecutionUser() {
-        return executionUser;
-    }
-
-    public void setExecutionUser(String executionUser) {
-        this.executionUser = executionUser;
-    }
-
-    /**
-     *
-     * @return project
-     */
-    public ProjectResource getProject() {
-		return project;
-	}
-
-    /**
-     *
-     * @param project  project
-     */
-    public void setProject(ProjectResource project) {
-		this.project = project;
-	}
-
-    public List<NotificationEmailResource> getNotificationEmails () throws RegistryException{
-        List<NotificationEmailResource> emailResources = new ArrayList<NotificationEmailResource>();
-        List<Resource> resources = get(ResourceType.NOTIFICATION_EMAIL);
-        for (Resource resource : resources) {
-            emailResources.add((NotificationEmailResource) resource);
-        }
-        return emailResources;
-    }
-
-    public List<ExperimentInputResource> getExperimentInputs () throws RegistryException{
-        List<ExperimentInputResource> expInputs = new ArrayList<ExperimentInputResource>();
-        List<Resource> resources = get(ResourceType.EXPERIMENT_INPUT);
-        for (Resource resource : resources) {
-            expInputs.add((ExperimentInputResource) resource);
-        }
-        return expInputs;
-    }
-
-    public List<ExperimentOutputResource> getExperimentOutputs () throws RegistryException{
-        List<ExperimentOutputResource> expOutputs = new ArrayList<ExperimentOutputResource>();
-        List<Resource> resources = get(ResourceType.EXPERIMENT_OUTPUT);
-        for (Resource resource : resources) {
-            expOutputs.add((ExperimentOutputResource) resource);
-        }
-        return expOutputs;
-    }
-
-    public StatusResource getExperimentStatus() throws RegistryException{
-        List<Resource> resources = get(ResourceType.STATUS);
-        for (Resource resource : resources) {
-            StatusResource expStatus = (StatusResource) resource;
-            if(expStatus.getStatusType().equals(StatusType.EXPERIMENT.toString())){
-                if (expStatus.getState() == null || expStatus.getState().equals("") ){
-                    expStatus.setState("UNKNOWN");
-                }
-                return expStatus;
-            }
-        }
-        return null;
-    }
-
-    public List<StatusResource> getWorkflowNodeStatuses() throws RegistryException{
-        List<StatusResource> statuses = new ArrayList<StatusResource>();
-        List<Resource> resources = get(ResourceType.STATUS);
-        for (Resource resource : resources) {
-            StatusResource workflowNodeStatus = (StatusResource) resource;
-            if(workflowNodeStatus.getStatusType().equals(StatusType.WORKFLOW_NODE.toString())){
-                if (workflowNodeStatus.getState() == null || workflowNodeStatus.getState().equals("")){
-                    workflowNodeStatus.setState("UNKNOWN");
-                }
-                statuses.add(workflowNodeStatus);
-            }
-        }
-        return statuses;
-    }
-
-    public List<WorkflowNodeDetailResource> getWorkflowNodeDetails () throws RegistryException{
-        List<WorkflowNodeDetailResource> workflowNodeDetailResourceList = new ArrayList<WorkflowNodeDetailResource>();
-        List<Resource> resources = get(ResourceType.WORKFLOW_NODE_DETAIL);
-        for (Resource resource : resources) {
-            WorkflowNodeDetailResource nodeDetailResource = (WorkflowNodeDetailResource) resource;
-            workflowNodeDetailResourceList.add(nodeDetailResource);
-        }
-        return workflowNodeDetailResourceList;
-    }
-
-    public List<ErrorDetailResource> getErrorDetails () throws RegistryException{
-        List<ErrorDetailResource> errorDetailResources = new ArrayList<ErrorDetailResource>();
-        List<Resource> resources = get(ResourceType.ERROR_DETAIL);
-        for (Resource resource : resources) {
-            ErrorDetailResource errorDetailResource = (ErrorDetailResource) resource;
-            errorDetailResources.add(errorDetailResource);
-        }
-        return errorDetailResources;
-    }
-
-    public ComputationSchedulingResource getComputationScheduling (String expId) throws RegistryException{
-        return  (ComputationSchedulingResource)get(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING, expId);
-    }
-
-    public AdvanceInputDataHandlingResource getInputDataHandling (String expId) throws RegistryException{
-        return  (AdvanceInputDataHandlingResource)get(ResourceType.ADVANCE_INPUT_DATA_HANDLING, expId);
-    }
-
-    public AdvancedOutputDataHandlingResource getOutputDataHandling (String expId) throws RegistryException{
-        return  (AdvancedOutputDataHandlingResource)get(ResourceType.ADVANCE_OUTPUT_DATA_HANDLING, expId);
-    }
-
-    public QosParamResource getQOSparams (String expId) throws RegistryException{
-        return  (QosParamResource)get(ResourceType.QOS_PARAM, expId);
-    }
-
-    public ConfigDataResource getUserConfigData(String expID) throws RegistryException{
-        return (ConfigDataResource)get(ResourceType.CONFIG_DATA, expID);
-    }
-    public WorkflowNodeDetailResource getWorkflowNode (String nodeId) throws RegistryException{
-        return (WorkflowNodeDetailResource)get(ResourceType.WORKFLOW_NODE_DETAIL, nodeId);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
deleted file mode 100644
index d33fb05..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/GatewayResource.java
+++ /dev/null
@@ -1,436 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.*;
-import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-import java.util.ArrayList;
-import java.util.List;
-
-public class GatewayResource extends AbstractResource {
-    private final static Logger logger = LoggerFactory.getLogger(GatewayResource.class);
-
-    private String gatewayId;
-    private String gatewayName;
-    private String domain;
-    private String emailAddress;
-
-    public String getGatewayId() {
-        return gatewayId;
-    }
-
-    public void setGatewayId(String gatewayId) {
-        this.gatewayId = gatewayId;
-    }
-
-    public String getEmailAddress() {
-        return emailAddress;
-    }
-
-    public void setEmailAddress(String emailAddress) {
-        this.emailAddress = emailAddress;
-    }
-
-    /**
-     *
-     * @param gatewayId gateway name
-     */
-    public GatewayResource(String gatewayId) {
-    	setGatewayId(gatewayId);
-	}
-
-    /**
-     *
-     */
-    public GatewayResource() {
-	}
-
-    /**
-     *
-     * @return gateway name
-     */
-    public String getGatewayName() {
-        return gatewayName;
-    }
-
-    /**
-     *
-     * @param gatewayName
-     */
-    public void setGatewayName(String gatewayName) {
-        this.gatewayName = gatewayName;
-    }
-
-    /**
-     *
-     * @return domain of the gateway
-     */
-    public String getDomain() {
-        return domain;
-    }
-
-    /**
-     *
-     * @param domain domain of the gateway
-     */
-    public void setDomain(String domain) {
-        this.domain = domain;
-    }
-
-
-    /**
-     * Gateway is at the root level.  So it can populate his child resources.
-     * Project, User, Published Workflows, User workflows, Host descriptors,
-     * Service Descriptors, Application descriptors and Experiments are all
-     * its children
-     * @param type resource type of the children
-     * @return specific child resource type
-     */
-    public Resource create(ResourceType type) throws RegistryException {
-        switch (type) {
-            case PROJECT:
-                ProjectResource projectResource = new ProjectResource();
-                projectResource.setGateway(this);
-                return projectResource;
-            case EXPERIMENT:
-                ExperimentResource experimentResource =new ExperimentResource();
-                experimentResource.setGateway(this);
-                return experimentResource;
-            case GATEWAY_WORKER:
-                WorkerResource workerResource = new WorkerResource();
-                workerResource.setGateway(this);
-                return workerResource;
-            default:
-                logger.error("Unsupported resource type for gateway resource.", new IllegalArgumentException());
-                throw new IllegalArgumentException("Unsupported resource type for gateway resource.");
-        }
-    }
-
-    /**
-     * Child resources can be removed from a gateway
-     * @param type child resource type
-     * @param name child resource name
-     */
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-            QueryGenerator generator;
-            switch (type) {
-                case USER:
-                    generator = new QueryGenerator(USERS);
-                    generator.setParameter(UserConstants.USERNAME, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case EXPERIMENT:
-                    generator = new QueryGenerator(EXPERIMENT);
-                    generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                default:
-                    logger.error("Unsupported resource type for gateway resource.", new IllegalArgumentException());
-                    break;
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     * Gateway can getExperiment information of his children
-     * @param type child resource type
-     * @param name child resource name
-     * @return specific child resource type
-     */
-    public Resource get(ResourceType type, Object name) throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            QueryGenerator generator;
-            Query q;
-            switch (type) {
-                case GATEWAY_WORKER:
-                    generator = new QueryGenerator(GATEWAY_WORKER);
-                    generator.setParameter(GatewayWorkerConstants.USERNAME, name);
-                    generator.setParameter(GatewayWorkerConstants.GATEWAY_ID, gatewayId);
-                    q = generator.selectQuery(em);
-                    Gateway_Worker worker = (Gateway_Worker) q.getSingleResult();
-                    WorkerResource workerResource =
-                            (WorkerResource) Utils.getResource(ResourceType.GATEWAY_WORKER, worker);
-                    em.getTransaction().commit();
-                    em.close();
-                    return workerResource;
-                case USER:
-                    generator = new QueryGenerator(USERS);
-                    generator.setParameter(UserConstants.USERNAME, name);
-                    q = generator.selectQuery(em);
-                    Users user = (Users) q.getSingleResult();
-                    UserResource userResource =
-                            (UserResource) Utils.getResource(ResourceType.USER, user);
-                    em.getTransaction().commit();
-                    em.close();
-                    return userResource;
-                case EXPERIMENT:
-                    generator = new QueryGenerator(EXPERIMENT);
-                    generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
-                    q = generator.selectQuery(em);
-                    Experiment experiment = (Experiment) q.getSingleResult();
-                    ExperimentResource experimentResource =
-                            (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
-                    em.getTransaction().commit();
-                    em.close();
-                    return experimentResource;
-                default:
-                    em.getTransaction().commit();
-                    em.close();
-                    logger.error("Unsupported resource type for gateway resource.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Unsupported resource type for gateway resource.");
-            }
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     *
-     * @param type child resource type
-     * @return list of child resources
-     */
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        List<Resource> resourceList = new ArrayList<Resource>();
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-            QueryGenerator generator;
-            List results;
-            switch (type) {
-                case PROJECT:
-                    generator = new QueryGenerator(PROJECT);
-                    Gateway gatewayModel = em.find(Gateway.class, gatewayId);
-                    generator.setParameter("gateway", gatewayModel);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Project project = (Project) result;
-                            ProjectResource projectResource =
-                                    (ProjectResource) Utils.getResource(ResourceType.PROJECT, project);
-                            resourceList.add(projectResource);
-                        }
-                    }
-                    break;
-                case GATEWAY_WORKER:
-                    generator = new QueryGenerator(GATEWAY_WORKER);
-                    generator.setParameter(GatewayWorkerConstants.GATEWAY_ID, gatewayId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Gateway_Worker gatewayWorker = (Gateway_Worker) result;
-                            WorkerResource workerResource =
-                                    (WorkerResource) Utils.getResource(ResourceType.GATEWAY_WORKER, gatewayWorker);
-                            resourceList.add(workerResource);
-                        }
-                    }
-                    break;
-                case EXPERIMENT:
-                    generator = new QueryGenerator(EXPERIMENT);
-                    generator.setParameter(ExperimentConstants.GATEWAY_ID, gatewayId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Experiment experiment = (Experiment) result;
-                            ExperimentResource experimentResource =
-                                    (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
-                            resourceList.add(experimentResource);
-                        }
-                    }
-                    break;
-                case USER:
-                    generator = new QueryGenerator(USERS);
-                    q = generator.selectQuery(em);
-                    for (Object o : q.getResultList()) {
-                        Users user = (Users) o;
-                        UserResource userResource =
-                                (UserResource) Utils.getResource(ResourceType.USER, user);
-                        resourceList.add(userResource);
-                    }
-                    break;
-                default:
-                    em.getTransaction().commit();
-                    em.close();
-                    logger.error("Unsupported resource type for gateway resource.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Unsupported resource type for gateway resource.");
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return resourceList;
-    }
-
-    /**
-     * saveExperiment the gateway to the database
-     */
-    public void save() throws RegistryException {
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            Gateway existingGateway = em.find(Gateway.class, gatewayId);
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Gateway gateway = new Gateway();
-            gateway.setGateway_name(gatewayName);
-            gateway.setGateway_id(gatewayId);
-            gateway.setDomain(domain);
-            gateway.setEmailAddress(emailAddress);
-            if (existingGateway != null) {
-                existingGateway.setDomain(domain);
-                existingGateway.setGateway_name(gatewayName);
-                existingGateway.setEmailAddress(emailAddress);
-                gateway = em.merge(existingGateway);
-            } else {
-                em.persist(gateway);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-
-    }
-
-    /**
-     * check whether child resource already exist in the database
-     * @param type child resource type
-     * @param name name of the child resource
-     * @return true or false
-     */
-    public boolean isExists(ResourceType type, Object name) throws RegistryException{
-        EntityManager em = null;
-        try {
-            switch (type) {
-                case GATEWAY_WORKER:
-                    em = ResourceUtils.getEntityManager();
-                    Gateway_Worker existingWorker = em.find(Gateway_Worker.class, new Gateway_Worker_PK(gatewayId, name.toString()));
-                    em.close();
-                    return existingWorker != null;
-                case USER:
-                    em = ResourceUtils.getEntityManager();
-                    Users existingUser = em.find(Users.class, name);
-                    em.close();
-                    return existingUser != null;
-                case EXPERIMENT:
-                    em = ResourceUtils.getEntityManager();
-                    Experiment existingExp = em.find(Experiment.class, name.toString());
-                    em.close();
-                    return existingExp != null;
-                default:
-                    logger.error("Unsupported resource type for gateway resource.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Unsupported resource type for gateway resource.");
-            }
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    public ExperimentResource createExperiment (String experimentID) throws RegistryException{
-        ExperimentResource metadataResource = (ExperimentResource)create(ResourceType.EXPERIMENT);
-        metadataResource.setExpID(experimentID);
-        return metadataResource;
-    }
-
-    public ExperimentResource getExperiment (String expId) throws RegistryException{
-        return (ExperimentResource)get(ResourceType.EXPERIMENT, expId);
-    }
-
-    public List<ExperimentResource> getExperiments () throws RegistryException{
-        List<ExperimentResource> experiments = new ArrayList<ExperimentResource>();
-        List<Resource> resources = get(ResourceType.EXPERIMENT);
-        for (Resource resource : resources){
-            experiments.add((ExperimentResource)resource);
-        }
-        return experiments;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
deleted file mode 100644
index 6e6d2ee..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
+++ /dev/null
@@ -1,361 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.*;
-import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.utils.StatusType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.List;
-
-public class JobDetailResource extends AbstractResource {
-    private static final Logger logger = LoggerFactory.getLogger(JobDetailResource.class);
-    private String jobId;
-    private TaskDetailResource taskDetailResource;
-    private String jobDescription;
-    private Timestamp creationTime;
-    private String computeResourceConsumed;
-    private String jobName;
-    private String workingDir;
-
-    public String getJobName() {
-        return jobName;
-    }
-
-    public void setJobName(String jobName) {
-        this.jobName = jobName;
-    }
-
-    public String getWorkingDir() {
-        return workingDir;
-    }
-
-    public void setWorkingDir(String workingDir) {
-        this.workingDir = workingDir;
-    }
-
-    public String getJobId() {
-        return jobId;
-    }
-
-    public void setJobId(String jobId) {
-        this.jobId = jobId;
-    }
-
-    public TaskDetailResource getTaskDetailResource() {
-        return taskDetailResource;
-    }
-
-    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
-        this.taskDetailResource = taskDetailResource;
-    }
-
-    public String getJobDescription() {
-        return jobDescription;
-    }
-
-    public void setJobDescription(String jobDescription) {
-        this.jobDescription = jobDescription;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public String getComputeResourceConsumed() {
-        return computeResourceConsumed;
-    }
-
-    public void setComputeResourceConsumed(String computeResourceConsumed) {
-        this.computeResourceConsumed = computeResourceConsumed;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException {
-        switch (type){
-            case STATUS:
-                StatusResource statusResource = new StatusResource();
-                statusResource.setJobId(jobId);
-                return statusResource;
-            case ERROR_DETAIL:
-                ErrorDetailResource errorDetailResource = new ErrorDetailResource();
-                errorDetailResource.setJobId(jobId);
-                return errorDetailResource;
-            default:
-                logger.error("Unsupported resource type for job details data resource.", new UnsupportedOperationException());
-                throw new UnsupportedOperationException();
-        }
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-            QueryGenerator generator;
-            switch (type) {
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.JOB_ID, name);
-                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.JOB.toString());
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case ERROR_DETAIL:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(ErrorDetailConstants.JOB_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                default:
-                    logger.error("Unsupported resource type for job details resource.", new IllegalArgumentException());
-                    break;
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws RegistryException {
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            QueryGenerator generator;
-            Query q;
-            switch (type) {
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.JOB_ID, name);
-                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.JOB.toString());
-                    q = generator.selectQuery(em);
-                    Status status = (Status) q.getSingleResult();
-                    StatusResource statusResource = (StatusResource) Utils.getResource(ResourceType.STATUS, status);
-                    em.getTransaction().commit();
-                    em.close();
-                    return statusResource;
-                case ERROR_DETAIL:
-                    generator = new QueryGenerator(ERROR_DETAIL);
-                    generator.setParameter(ErrorDetailConstants.JOB_ID, name);
-                    q = generator.selectQuery(em);
-                    ErrorDetail errorDetail = (ErrorDetail) q.getSingleResult();
-                    ErrorDetailResource errorDetailResource = (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
-                    em.getTransaction().commit();
-                    em.close();
-                    return errorDetailResource;
-                default:
-                    em.getTransaction().commit();
-                    em.close();
-                    logger.error("Unsupported resource type for job details resource.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Unsupported resource type for job details resource.");
-            }
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        List<Resource> resourceList = new ArrayList<Resource>();
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-            QueryGenerator generator;
-            List results;
-            switch (type) {
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.JOB_ID, jobId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Status status = (Status) result;
-                            StatusResource statusResource =
-                                    (StatusResource) Utils.getResource(ResourceType.STATUS, status);
-                            resourceList.add(statusResource);
-                        }
-                    }
-                    break;
-                case ERROR_DETAIL:
-                    generator = new QueryGenerator(ERROR_DETAIL);
-                    generator.setParameter(ErrorDetailConstants.JOB_ID, jobId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            ErrorDetail errorDetail = (ErrorDetail) result;
-                            ErrorDetailResource errorDetailResource =
-                                    (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
-                            resourceList.add(errorDetailResource);
-                        }
-                    }
-                    break;
-                default:
-                    em.getTransaction().commit();
-                    em.close();
-                    logger.error("Unsupported resource type for workflow node details resource.", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return resourceList;
-    }
-
-    
-    public void save()  throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            JobDetail existingJobDetail = em.find(JobDetail.class, new JobDetails_PK(jobId, taskDetailResource.getTaskId()));
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            JobDetail jobDetail = new JobDetail();
-            TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
-            jobDetail.setJobId(jobId);
-            jobDetail.setTask(taskDetail);
-            jobDetail.setTaskId(taskDetailResource.getTaskId());
-            jobDetail.setCreationTime(creationTime);
-            jobDetail.setJobName(jobName);
-            jobDetail.setWorkingDir(workingDir);
-            if (jobDescription != null) {
-                jobDetail.setJobDescription(jobDescription.toCharArray());
-            }
-            jobDetail.setComputeResourceConsumed(computeResourceConsumed);
-            if (existingJobDetail != null) {
-                existingJobDetail.setJobId(jobId);
-                existingJobDetail.setTask(taskDetail);
-                existingJobDetail.setTaskId(taskDetailResource.getTaskId());
-                existingJobDetail.setCreationTime(creationTime);
-                if (jobDescription != null) {
-                    existingJobDetail.setJobDescription(jobDescription.toCharArray());
-                }
-                existingJobDetail.setComputeResourceConsumed(computeResourceConsumed);
-                existingJobDetail.setJobName(jobName);
-                existingJobDetail.setWorkingDir(workingDir);
-                jobDetail = em.merge(existingJobDetail);
-            } else {
-                em.persist(jobDetail);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    public StatusResource getJobStatus() throws RegistryException{
-        List<Resource> resources = get(ResourceType.STATUS);
-        for (Resource resource : resources) {
-            StatusResource jobStatus = (StatusResource) resource;
-            if(jobStatus.getStatusType().equals(StatusType.JOB.toString())){
-                if (jobStatus.getState() == null || jobStatus.getState().equals("") ){
-                    jobStatus.setState("UNKNOWN");
-                }
-                return jobStatus;
-            }
-        }
-        return null;
-    }
-
-    public StatusResource getApplicationStatus() throws RegistryException{
-        List<Resource> resources = get(ResourceType.STATUS);
-        for (Resource resource : resources) {
-            StatusResource appStatus = (StatusResource) resource;
-            if(appStatus.getStatusType().equals(StatusType.APPLICATION.toString())){
-                if (appStatus.getState() == null || appStatus.getState().equals("") ){
-                    appStatus.setState("UNKNOWN");
-                }
-                return appStatus;
-            }
-        }
-        return null;
-    }
-
-    public List<ErrorDetailResource> getErrorDetails () throws RegistryException{
-        List<ErrorDetailResource> errorDetailResources = new ArrayList<ErrorDetailResource>();
-        List<Resource> resources = get(ResourceType.ERROR_DETAIL);
-        for(Resource resource : resources){
-            errorDetailResources.add((ErrorDetailResource)resource);
-        }
-        return errorDetailResources;
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeInputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeInputResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeInputResource.java
deleted file mode 100644
index 4efb8a4..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeInputResource.java
+++ /dev/null
@@ -1,231 +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.persistance.registry.jpa.resources;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.NodeInput;
-import org.apache.airavata.persistance.registry.jpa.model.NodeInput_PK;
-import org.apache.airavata.persistance.registry.jpa.model.WorkflowNodeDetail;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class NodeInputResource extends AbstractResource {
-	private static final Logger logger = LoggerFactory.getLogger(NodeInputResource.class);
-
-    private WorkflowNodeDetailResource nodeDetailResource;
-    private String inputKey;
-    private String dataType;
-    private String metadata;
-    private String value;
-    private String appArgument;
-    private boolean standardInput;
-    private String userFriendlyDesc;
-    private int inputOrder;
-    private boolean isRequired;
-    private boolean requiredToCMD;
-    private boolean dataStaged;
-
-    public boolean getRequired() {
-        return isRequired;
-    }
-
-    public void setRequired(boolean required) {
-        this.isRequired = required;
-    }
-
-    public boolean getRequiredToCMD() {
-        return requiredToCMD;
-    }
-
-    public void setRequiredToCMD(boolean requiredToCMD) {
-        this.requiredToCMD = requiredToCMD;
-    }
-
-    public boolean isDataStaged() {
-        return dataStaged;
-    }
-
-    public void setDataStaged(boolean dataStaged) {
-        this.dataStaged = dataStaged;
-    }
-
-    public String getAppArgument() {
-        return appArgument;
-    }
-
-    public void setAppArgument(String appArgument) {
-        this.appArgument = appArgument;
-    }
-
-    public boolean isStandardInput() {
-        return standardInput;
-    }
-
-    public void setStandardInput(boolean standardInput) {
-        this.standardInput = standardInput;
-    }
-
-    public String getUserFriendlyDesc() {
-        return userFriendlyDesc;
-    }
-
-    public void setUserFriendlyDesc(String userFriendlyDesc) {
-        this.userFriendlyDesc = userFriendlyDesc;
-    }
-
-    public WorkflowNodeDetailResource getNodeDetailResource() {
-        return nodeDetailResource;
-    }
-
-    public void setNodeDetailResource(WorkflowNodeDetailResource nodeDetailResource) {
-        this.nodeDetailResource = nodeDetailResource;
-    }
-
-    public String getInputKey() {
-        return inputKey;
-    }
-
-    public void setInputKey(String inputKey) {
-        this.inputKey = inputKey;
-    }
-
-    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 getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public int getInputOrder() {
-        return inputOrder;
-    }
-
-    public void setInputOrder(int inputOrder) {
-        this.inputOrder = inputOrder;
-    }
-
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for node input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for node input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws RegistryException {
-        logger.error("Unsupported resource type for node input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for node input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            NodeInput existingInput = em.find(NodeInput.class, new NodeInput_PK(inputKey, nodeDetailResource.getNodeInstanceId()));
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            NodeInput nodeInput = new NodeInput();
-            WorkflowNodeDetail nodeDetail = em.find(WorkflowNodeDetail.class, nodeDetailResource.getNodeInstanceId());
-            nodeInput.setNodeDetails(nodeDetail);
-            nodeInput.setNodeId(nodeDetail.getNodeId());
-            nodeInput.setInputKey(inputKey);
-            nodeInput.setDataType(dataType);
-            nodeInput.setValue(value);
-            nodeInput.setMetadata(metadata);
-            nodeInput.setAppArgument(appArgument);
-            nodeInput.setStandardInput(standardInput);
-            nodeInput.setUserFriendlyDesc(userFriendlyDesc);
-            nodeInput.setInputOrder(inputOrder);
-            nodeInput.setRequiredToCMD(requiredToCMD);
-            nodeInput.setIsRequired(isRequired);
-            nodeInput.setDataStaged(dataStaged);
-
-            if (existingInput != null){
-                existingInput.setNodeDetails(nodeDetail);
-                existingInput.setNodeId(nodeDetail.getNodeId());
-                existingInput.setInputKey(inputKey);
-                existingInput.setDataType(dataType);
-                existingInput.setValue(value);
-                existingInput.setMetadata(metadata);
-                existingInput.setAppArgument(appArgument);
-                existingInput.setStandardInput(standardInput);
-                existingInput.setUserFriendlyDesc(userFriendlyDesc);
-                existingInput.setInputOrder(inputOrder);
-                existingInput.setRequiredToCMD(requiredToCMD);
-                existingInput.setIsRequired(isRequired);
-                existingInput.setDataStaged(dataStaged);
-                nodeInput = em.merge(existingInput);
-            }else {
-                em.persist(nodeInput);
-            }
-            em.getTransaction().commit();
-            em.close();
-        }catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        }finally {
-            if (em != null && em.isOpen()){
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java
deleted file mode 100644
index ceb323b..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NodeOutputResource.java
+++ /dev/null
@@ -1,211 +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.persistance.registry.jpa.resources;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.NodeOutput;
-import org.apache.airavata.persistance.registry.jpa.model.NodeOutput_PK;
-import org.apache.airavata.persistance.registry.jpa.model.WorkflowNodeDetail;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class NodeOutputResource extends AbstractResource {
-	private static final Logger logger = LoggerFactory.getLogger(NodeOutputResource.class);
-	
-    private WorkflowNodeDetailResource nodeDetailResource;
-    private String outputKey;
-    private String dataType;
-    private String value;
-    private boolean isRequired;
-    private boolean dataMovement;
-    private String dataNameLocation;
-    private boolean requiredToCMD;
-    private String searchQuery;
-    private String appArgument;
-
-    public String getSearchQuery() {
-        return searchQuery;
-    }
-
-    public void setSearchQuery(String searchQuery) {
-        this.searchQuery = searchQuery;
-    }
-
-    public String getAppArgument() {
-        return appArgument;
-    }
-
-    public void setAppArgument(String appArgument) {
-        this.appArgument = appArgument;
-    }
-
-
-    public boolean getRequiredToCMD() {
-        return requiredToCMD;
-    }
-
-    public void setRequiredToCMD(boolean requiredToCMD) {
-        this.requiredToCMD = requiredToCMD;
-    }
-
-    public boolean getRequired() {
-        return isRequired;
-    }
-
-    public void setRequired(boolean required) {
-        this.isRequired = required;
-    }
-
-    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 WorkflowNodeDetailResource getNodeDetailResource() {
-        return nodeDetailResource;
-    }
-
-    public void setNodeDetailResource(WorkflowNodeDetailResource nodeDetailResource) {
-        this.nodeDetailResource = nodeDetailResource;
-    }
-
-    public String getOutputKey() {
-        return outputKey;
-    }
-
-    public void setOutputKey(String outputKey) {
-        this.outputKey = outputKey;
-    }
-
-    public String getDataType() {
-        return dataType;
-    }
-
-    public void setDataType(String dataType) {
-        this.dataType = dataType;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for node output data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for node output data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for node output data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for node output data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            NodeOutput existingOutput = em.find(NodeOutput.class, new NodeOutput_PK(outputKey, nodeDetailResource.getNodeInstanceId()));
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            NodeOutput nodeOutput = new NodeOutput();
-            WorkflowNodeDetail nodeDetail = em.find(WorkflowNodeDetail.class, nodeDetailResource.getNodeInstanceId());
-            nodeOutput.setNode(nodeDetail);
-            nodeOutput.setNodeId(nodeDetail.getNodeId());
-            nodeOutput.setOutputKey(outputKey);
-            nodeOutput.setDataType(dataType);
-            nodeOutput.setValue(value);
-            nodeOutput.setRequired(isRequired);
-            nodeOutput.setRequiredToCMD(requiredToCMD);
-            nodeOutput.setDataMovement(dataMovement);
-            nodeOutput.setDataNameLocation(dataNameLocation);
-            nodeOutput.setApplicationArgument(appArgument);
-            nodeOutput.setSearchQuery(searchQuery);
-
-            if (existingOutput != null) {
-                existingOutput.setNode(nodeDetail);
-                existingOutput.setNodeId(nodeDetail.getNodeId());
-                existingOutput.setOutputKey(outputKey);
-                existingOutput.setDataType(dataType);
-                existingOutput.setValue(value);
-                existingOutput.setRequired(isRequired);
-                existingOutput.setRequiredToCMD(requiredToCMD);
-                existingOutput.setDataMovement(dataMovement);
-                existingOutput.setDataNameLocation(dataNameLocation);
-                existingOutput.setApplicationArgument(appArgument);
-                existingOutput.setSearchQuery(searchQuery);
-                nodeOutput = em.merge(existingOutput);
-            } else {
-                em.persist(nodeOutput);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}


[40/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java
deleted file mode 100644
index 0274518..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.impl;
-
-import org.apache.airavata.registry.cpi.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-import java.util.Map;
-
-public class LoggingRegistryImpl implements Registry {
-    private final static Logger logger = LoggerFactory.getLogger(LoggingRegistryImpl.class);
-
-    @Override
-    public Object add(ParentDataType dataType, Object newObjectToAdd, String gatewayId) throws RegistryException {
-        return null;
-    }
-
-    @Override
-    public Object add(ChildDataType dataType, Object newObjectToAdd, Object dependentIdentifiers) throws RegistryException {
-        return null;
-    }
-
-    @Override
-    public void update(RegistryModelType dataType, Object newObjectToUpdate, Object identifier) throws RegistryException {
-
-    }
-
-    @Override
-    public void update(RegistryModelType dataType, Object identifier, String fieldName, Object value) throws RegistryException {
-
-    }
-
-    @Override
-    public Object get(RegistryModelType dataType, Object identifier) throws RegistryException {
-        return null;
-    }
-
-    @Override
-    public List<Object> get(RegistryModelType dataType, String fieldName, Object value) throws RegistryException {
-        return null;
-    }
-
-    @Override
-    public List<Object> get(RegistryModelType dataType, String fieldName, Object value, int limit, int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
-        return null;
-    }
-
-    @Override
-    public List<Object> search(RegistryModelType dataType, Map<String, String> filters) throws RegistryException {
-        return null;
-    }
-
-    @Override
-    public List<Object> search(RegistryModelType dataType, Map<String, String> filters, int limit, int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
-        return null;
-    }
-
-    @Override
-    public Object getValue(RegistryModelType dataType, Object identifier, String field) throws RegistryException {
-        return null;
-    }
-
-    @Override
-    public List<String> getIds(RegistryModelType dataType, String fieldName, Object value) throws RegistryException {
-        return null;
-    }
-
-    @Override
-    public void remove(RegistryModelType dataType, Object identifier) throws RegistryException {
-
-    }
-
-    @Override
-    public boolean isExist(RegistryModelType dataType, Object identifier) throws RegistryException {
-        return false;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
deleted file mode 100644
index 620c535..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ProjectRegistry.java
+++ /dev/null
@@ -1,211 +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.persistance.registry.jpa.impl;
-
-import org.apache.airavata.model.workspace.Project;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.mongo.dao.ProjectDao;
-import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
-import org.apache.airavata.persistance.registry.jpa.resources.UserResource;
-import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.ResultOrderType;
-import org.apache.airavata.registry.cpi.utils.Constants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-
-public class ProjectRegistry {
-    private GatewayResource gatewayResource;
-    private WorkerResource workerResource;
-    private final static Logger logger = LoggerFactory.getLogger(ProjectRegistry.class);
-
-    private ProjectDao projectDao;
-
-    public ProjectRegistry(GatewayResource gatewayResource, UserResource user) throws RegistryException {
-        this.projectDao = new ProjectDao();
-
-        if (!ResourceUtils.isGatewayExist(gatewayResource.getGatewayId())){
-            this.gatewayResource = gatewayResource;
-        }else {
-            this.gatewayResource = (GatewayResource)ResourceUtils.getGateway(gatewayResource.getGatewayId());
-        }
-        if (!gatewayResource.isExists(ResourceType.GATEWAY_WORKER, user.getUserName())){
-            workerResource = ResourceUtils.addGatewayWorker(gatewayResource, user);
-        }else {
-            workerResource = (WorkerResource)ResourceUtils.getWorker(gatewayResource.getGatewayId(),
-                    user.getUserName());
-        }
-    }
-
-    public String addProject (Project project, String gatewayId) throws RegistryException{
-        try {
-            if (!ResourceUtils.isUserExist(project.getOwner())){
-                ResourceUtils.addUser(project.getOwner(), null);
-            }
-            project.setProjectId(getProjectId(project.getName()));
-            projectDao.createProject(project);
-            return project.getProjectId();
-        }catch (Exception e){
-            logger.error("Error while saving project to registry", e);
-           throw new RegistryException(e);
-        }
-    }
-
-    private String getProjectId (String projectName){
-        String pro = projectName.replaceAll("\\s", "");
-        return pro + "_" + UUID.randomUUID();
-    }
-
-    public void updateProject (Project project, String projectId) throws RegistryException{
-        try {
-            UserResource user = (UserResource)ResourceUtils.getUser(project.getOwner());
-            if (!gatewayResource.isExists(ResourceType.GATEWAY_WORKER, user.getUserName())){
-                workerResource = ResourceUtils.addGatewayWorker(gatewayResource, user);
-            }else {
-                workerResource = (WorkerResource)ResourceUtils.getWorker(
-                        gatewayResource.getGatewayName(), user.getUserName());
-            }
-            projectDao.updateProject(project);
-        }catch (Exception e){
-            logger.error("Error while saving project to registry", e);
-           throw new RegistryException(e);
-        }
-    }
-
-    public Project getProject (String projectId) throws RegistryException{
-        try {
-            return projectDao.getProject(projectId);
-        }catch (Exception e){
-            logger.error("Error while retrieving project from registry", e);
-           throw new RegistryException(e);
-        }
-    }
-
-    /**
-     * Get list of projects of the user
-     * @param fieldName
-     * @param value
-     * @return
-     * @throws RegistryException
-     */
-    public List<Project> getProjectList (String fieldName, Object value) throws RegistryException{
-        return getProjectList(fieldName, value, -1, -1, null, null);
-    }
-
-    /**
-     * Get projects list with pagination and result ordering
-     * @param fieldName
-     * @param value
-     * @param limit
-     * @param offset
-     * @param orderByIdentifier
-     * @param resultOrderType
-     * @return
-     * @throws RegistryException
-     */
-    public List<Project> getProjectList (String fieldName, Object value, int limit, int offset,
-                                         Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException{
-        try {
-                Map<String, String> filters = new HashMap();
-                filters.put(fieldName, (String)value);
-                return  projectDao.searchProjects(filters, limit, offset, orderByIdentifier, resultOrderType);
-        }catch (Exception e){
-            logger.error("Error while retrieving project from registry", e);
-            throw new RegistryException(e);
-        }
-    }
-
-    /**
-     * To search projects of user with the given filter criteria. All the matching results will be sent.
-     * Results are not ordered in any order
-     * @param filters
-     * @return
-     * @throws RegistryException
-     */
-    public List<Project> searchProjects (Map<String, String> filters) throws RegistryException{
-        return searchProjects(filters, -1, -1, null, null);
-    }
-
-    /**
-     * To search the projects of user with the given filter criteria and retrieve the results with
-     * pagination support. Results can be ordered based on an identifier (i.e column) either ASC or
-     * DESC.
-     *
-     * @param filters
-     * @param limit
-     * @param offset
-     * @param orderByIdentifier
-     * @param resultOrderType
-     * @return
-     * @throws RegistryException
-     */
-    public List<Project> searchProjects(Map<String, String> filters, int limit,
-            int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
-          try {
-                return  projectDao.searchProjects(filters, limit, offset, orderByIdentifier, resultOrderType);
-            }catch (Exception e){
-                logger.error("Error while retrieving project from registry", e);
-                throw new RegistryException(e);
-            }
-
-    }
-
-    public List<String> getProjectIds (String fieldName, Object value) throws RegistryException{
-        List<String> projectIds = new ArrayList<String>();
-        try {
-            if (fieldName.equals(Constants.FieldConstants.ProjectConstants.OWNER)){
-                Map<String, String> filters = new HashMap();
-                filters.put(fieldName, (String)value);
-                projectDao.searchProjects(filters, -1, -1, null, null).stream()
-                .forEach(pr->projectIds.add(pr.getProjectId()));
-                return projectIds;
-            }
-        }catch (Exception e){
-            logger.error("Error while retrieving projects from registry", e);
-           throw new RegistryException(e);
-        }
-        return projectIds;
-    }
-
-    public void removeProject (String projectId) throws RegistryException {
-        try {
-            Project project = new Project();
-            project.setProjectId(projectId);
-            projectDao.deleteProject(project);
-        } catch (Exception e) {
-            logger.error("Error while removing the project..", e);
-           throw new RegistryException(e);
-        }
-    }
-
-    public boolean isProjectExist(String projectId) throws RegistryException {
-        try {
-            return projectDao.getProject(projectId) != null;
-        } catch (Exception e) {
-            logger.error("Error while retrieving project...", e);
-           throw new RegistryException(e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java
deleted file mode 100644
index 8af4f19..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java
+++ /dev/null
@@ -1,80 +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.persistance.registry.jpa.impl;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.registry.cpi.Registry;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class RegistryFactory {
-    private static Registry registry;
-    private static Logger logger = LoggerFactory.getLogger(RegistryFactory.class);
-
-    public static Registry getRegistry(String gateway, String username, String password) throws RegistryException {
-        try {
-            if (registry == null) {
-                registry = new RegistryImpl(gateway, username, password);
-            }
-        } catch (RegistryException e) {
-            logger.error("Unable to create registry instance", e);
-            throw new RegistryException(e);
-        }
-        return registry;
-    }
-
-    public static Registry getRegistry(String gateway) throws RegistryException {
-        try {
-            if (registry == null) {
-                registry = new RegistryImpl(gateway, ServerSettings.getDefaultUser(), ServerSettings.getDefaultUserPassword());
-            }
-        } catch (RegistryException e) {
-            logger.error("Unable to create registry instance", e);
-            throw new RegistryException(e);
-        } catch (ApplicationSettingsException e) {
-            logger.error("Unable to create registry instance", e);
-            throw new RegistryException(e);
-        }
-        return registry;
-    }
-
-    public static Registry getDefaultRegistry () throws RegistryException {
-        try {
-            if (registry == null) {
-                registry = new RegistryImpl();
-            }
-        } catch (RegistryException e) {
-            logger.error("Unable to create registry instance", e);
-            throw new RegistryException(e);
-        }
-        return registry;
-    }
-
-    public static Registry getLoggingRegistry() {
-        if(registry == null) {
-            registry = new LoggingRegistryImpl();
-        }
-        return registry;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
deleted file mode 100644
index b8d7132..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
+++ /dev/null
@@ -1,735 +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.persistance.registry.jpa.impl;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.workspace.Gateway;
-import org.apache.airavata.model.workspace.Project;
-import org.apache.airavata.model.workspace.experiment.*;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
-import org.apache.airavata.persistance.registry.jpa.resources.UserResource;
-import org.apache.airavata.registry.cpi.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-public class RegistryImpl implements Registry {
-    private GatewayResource gatewayResource;
-    private UserResource user;
-    private final static Logger logger = LoggerFactory.getLogger(RegistryImpl.class);
-    private ExperimentRegistry experimentRegistry = null;
-    private ProjectRegistry projectRegistry = null;
-    private GatewayRegistry gatewayRegistry = null;
-
-    public RegistryImpl() throws RegistryException{
-        try {
-            if (!ResourceUtils.isGatewayExist(ServerSettings.getDefaultUserGateway())){
-                gatewayResource = (GatewayResource) ResourceUtils.createGateway(ServerSettings.getDefaultUserGateway());
-                gatewayResource.setGatewayName(ServerSettings.getDefaultUserGateway());
-                gatewayResource.save();
-            }else {
-                gatewayResource = (GatewayResource)ResourceUtils.getGateway(ServerSettings.getDefaultUserGateway());
-            }
-
-            if (!ResourceUtils.isUserExist(ServerSettings.getDefaultUser())){
-                user = ResourceUtils.createUser(ServerSettings.getDefaultUser(), ServerSettings.getDefaultUserPassword());
-                user.save();
-            }else {
-                user = (UserResource)ResourceUtils.getUser(ServerSettings.getDefaultUser());
-            }
-            experimentRegistry = new ExperimentRegistry(gatewayResource, user);
-            projectRegistry = new ProjectRegistry(gatewayResource, user);
-            gatewayRegistry = new GatewayRegistry();
-        } catch (ApplicationSettingsException e) {
-            logger.error("Unable to read airavata server properties..", e);
-            throw new RegistryException("Unable to read airavata server properties..", e);
-        }
-    }
-
-    public RegistryImpl(String gateway, String username, String password) throws RegistryException{
-        if (!ResourceUtils.isGatewayExist(gateway)){
-            gatewayResource = (GatewayResource) ResourceUtils.createGateway(gateway);
-            gatewayResource.save();
-        }else {
-            gatewayResource = (GatewayResource)ResourceUtils.getGateway(gateway);
-        }
-
-        if (!ResourceUtils.isUserExist(username)){
-            user = ResourceUtils.createUser(username, password);
-            user.save();
-        }else {
-            user = (UserResource)ResourceUtils.getUser(username);
-        }
-        experimentRegistry = new ExperimentRegistry(gatewayResource, user);
-        projectRegistry = new ProjectRegistry(gatewayResource, user);
-    }
-
-    /**
-     * This method is to add an object in to the registry
-     *
-     * @param dataType       Data type is a predefined type which the programmer should choose according to the object he
-     *                       is going to save in to registry
-     * @param newObjectToAdd Object which contains the fields that need to be saved in to registry. This object is a
-     *                       thrift model object. In experiment case this object can be BasicMetadata, ConfigurationData
-     *                       etc
-     * @return return the identifier to identify the object
-     */
-    @Override
-    public Object add(ParentDataType dataType, Object newObjectToAdd, String gatewayId) throws RegistryException {
-        try {
-            switch (dataType) {
-                case PROJECT:
-                    return projectRegistry.addProject((Project)newObjectToAdd, gatewayId);
-                case EXPERIMENT:
-                    return experimentRegistry.addExperiment((Experiment) newObjectToAdd, gatewayId);
-                case GATEWAY:
-                    return gatewayRegistry.addGateway((Gateway)newObjectToAdd);
-                default:
-                    logger.error("Unsupported top level type..", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-        } catch (Exception e) {
-            logger.error("Error while adding the resource " + dataType.toString(), new RegistryException(e));
-            throw new RegistryException("Error while adding the resource " + dataType.toString(), e);
-        }
-    }
-
-    /**
-     * This method is to add an object in to the registry
-     *
-     * @param dataType            Data type is a predefined type which the programmer should choose according to the object he
-     *                            is going to save in to registry
-     * @param newObjectToAdd      Object which contains the fields that need to be saved in to registry. This object is a
-     *                            thrift model object. In experiment case this object can be BasicMetadata, ConfigurationData
-     *                            etc
-     * @param dependentIdentifier Object which contains the identifier if the object that is going to add is not a top
-     *                            level object in the data model. If it is a top level object, programmer can pass it as
-     *                            null
-     */
-    @Override
-    public Object add(ChildDataType dataType, Object newObjectToAdd, Object dependentIdentifier) throws RegistryException {
-        try {
-            switch (dataType) {
-                case EXPERIMENT_CONFIGURATION_DATA:
-                    return experimentRegistry.addUserConfigData((UserConfigurationData) newObjectToAdd, (String) dependentIdentifier);
-                case EXPERIMENT_OUTPUT:
-                    return experimentRegistry.addExpOutputs((List<OutputDataObjectType>) newObjectToAdd, (String) dependentIdentifier);
-                case EXPERIMENT_STATUS:
-                    return experimentRegistry.updateExperimentStatus((ExperimentStatus) newObjectToAdd, (String) dependentIdentifier);
-                case WORKFLOW_NODE_DETAIL:
-                    return experimentRegistry.addWorkflowNodeDetails((WorkflowNodeDetails) newObjectToAdd, (String) dependentIdentifier);
-                case WORKFLOW_NODE_STATUS:
-                    return experimentRegistry.addWorkflowNodeStatus((WorkflowNodeStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
-                case NODE_OUTPUT:
-                    return experimentRegistry.addNodeOutputs((List<OutputDataObjectType>) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
-                case TASK_DETAIL:
-                    return experimentRegistry.addTaskDetails((TaskDetails) newObjectToAdd, (String) dependentIdentifier);
-                case APPLICATION_OUTPUT:
-                    return experimentRegistry.addApplicationOutputs((List<OutputDataObjectType>) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
-                case TASK_STATUS:
-                    return experimentRegistry.addTaskStatus((TaskStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
-                case JOB_DETAIL:
-                    return experimentRegistry.addJobDetails((JobDetails) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
-                case JOB_STATUS:
-                    return experimentRegistry.addJobStatus((JobStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
-                case APPLICATION_STATUS:
-                    return experimentRegistry.addApplicationStatus((ApplicationStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
-                case DATA_TRANSFER_DETAIL:
-                    return experimentRegistry.addDataTransferDetails((DataTransferDetails) newObjectToAdd, (String) dependentIdentifier);
-                case TRANSFER_STATUS:
-                    return experimentRegistry.addTransferStatus((TransferStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
-                case COMPUTATIONAL_RESOURCE_SCHEDULING:
-                    return experimentRegistry.addComputationalResourceScheduling((ComputationalResourceScheduling) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
-                case ADVANCE_OUTPUT_DATA_HANDLING:
-                    return experimentRegistry.addOutputDataHandling((AdvancedOutputDataHandling) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
-                case ADVANCE_INPUT_DATA_HANDLING:
-                    return experimentRegistry.addInputDataHandling((AdvancedInputDataHandling) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
-                case QOS_PARAM:
-                    return experimentRegistry.addQosParams((QualityOfServiceParams) newObjectToAdd, (String) dependentIdentifier);
-                case ERROR_DETAIL:
-                    return experimentRegistry.addErrorDetails((ErrorDetails) newObjectToAdd, dependentIdentifier);
-                default:
-                    logger.error("Unsupported dependent data type...", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-        } catch (Exception e) {
-            logger.error("Error while adding " + dataType.toString() , new RegistryException(e));
-            throw new RegistryException("Error while adding " + dataType.toString(), e);
-        }
-
-    }
-
-    /**
-     * This method is to update the whole object in registry
-     *
-     * @param dataType          Data type is a predefined type which the programmer should choose according to the object he
-     *                          is going to save in to registry
-     * @param newObjectToUpdate Object which contains the fields that need to be updated in to registry. This object is a
-     *                          thrift model object. In experiment case this object can be BasicMetadata, ConfigurationData
-     *                          etc. CPI programmer can only fill necessary fields that need to be updated. He does not
-     *                          have to fill the whole object. He needs to only fill the mandatory fields and whatever the
-     *                          other fields that need to be updated.
-     */
-    @Override
-    public void update(RegistryModelType dataType, Object newObjectToUpdate, Object identifier) throws RegistryException {
-        try {
-            switch (dataType) {
-                case PROJECT:
-                    projectRegistry.updateProject((Project)newObjectToUpdate, (String)identifier);
-                    break;
-                case GATEWAY:
-                    gatewayRegistry.updateGateway((String)identifier, (Gateway)newObjectToUpdate);
-                    break;
-                case EXPERIMENT:
-                    experimentRegistry.updateExperiment((Experiment) newObjectToUpdate, (String) identifier);
-                    break;
-                case EXPERIMENT_CONFIGURATION_DATA:
-                    experimentRegistry.updateUserConfigData((UserConfigurationData) newObjectToUpdate, (String) identifier);
-                    break;
-                case EXPERIMENT_OUTPUT:
-                    experimentRegistry.updateExpOutputs((List<OutputDataObjectType>) newObjectToUpdate, (String) identifier);
-                    break;
-                case EXPERIMENT_STATUS:
-                    experimentRegistry.updateExperimentStatus((ExperimentStatus) newObjectToUpdate, (String) identifier);
-                    break;
-                case WORKFLOW_NODE_DETAIL:
-                    experimentRegistry.updateWorkflowNodeDetails((WorkflowNodeDetails) newObjectToUpdate, (String) identifier);
-                    break;
-                case WORKFLOW_NODE_STATUS:
-                    experimentRegistry.updateWorkflowNodeStatus((WorkflowNodeStatus) newObjectToUpdate, (String) identifier);
-                    break;
-                case NODE_OUTPUT:
-                    experimentRegistry.updateNodeOutputs((List<OutputDataObjectType>) newObjectToUpdate, (String) identifier);
-                    break;
-                case TASK_DETAIL:
-                    experimentRegistry.updateTaskDetails((TaskDetails) newObjectToUpdate, (String) identifier);
-                    break;
-                case APPLICATION_OUTPUT:
-                    experimentRegistry.updateAppOutputs((List<OutputDataObjectType>) newObjectToUpdate, (String) identifier);
-                    break;
-                case TASK_STATUS:
-                    experimentRegistry.updateTaskStatus((TaskStatus) newObjectToUpdate, (String) identifier);
-                    break;
-                case JOB_DETAIL:
-                    experimentRegistry.updateJobDetails((JobDetails) newObjectToUpdate, (CompositeIdentifier) identifier);
-                    break;
-                case JOB_STATUS:
-                    experimentRegistry.updateJobStatus((JobStatus) newObjectToUpdate, (CompositeIdentifier) identifier);
-                    break;
-                case APPLICATION_STATUS:
-                    experimentRegistry.updateApplicationStatus((ApplicationStatus) newObjectToUpdate, (CompositeIdentifier) identifier);
-                    break;
-                case DATA_TRANSFER_DETAIL:
-                    experimentRegistry.updateDataTransferDetails((DataTransferDetails) newObjectToUpdate, (CompositeIdentifier) identifier);
-                    break;
-                case TRANSFER_STATUS:
-                    experimentRegistry.updateTransferStatus((TransferStatus) newObjectToUpdate, (CompositeIdentifier) identifier);
-                    break;
-                case COMPUTATIONAL_RESOURCE_SCHEDULING:
-                    experimentRegistry.updateScheduling((ComputationalResourceScheduling) newObjectToUpdate, (String) identifier, dataType.toString());
-                    break;
-                case ADVANCE_INPUT_DATA_HANDLING:
-                    experimentRegistry.updateInputDataHandling((AdvancedInputDataHandling) newObjectToUpdate, (String) identifier, dataType.toString());
-                    break;
-                case ADVANCE_OUTPUT_DATA_HANDLING:
-                    experimentRegistry.updateOutputDataHandling((AdvancedOutputDataHandling) newObjectToUpdate, (String) identifier, dataType.toString());
-                    break;
-                case QOS_PARAM:
-                    experimentRegistry.updateQOSParams((QualityOfServiceParams) newObjectToUpdate, (String) identifier, dataType.toString());
-                    break;
-                default:
-                    logger.error("Unsupported data type...", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-        } catch (Exception e) {
-            logger.error("Error while updating the resource " + dataType.toString(), new RegistryException(e));
-            throw new RegistryException("Error while updating the resource.." + dataType.toString(), e);
-        }
-
-    }
-
-    /**
-     * This method is to update a specific field of the data model
-     *
-     * @param dataType   Data type is a predefined type which the programmer should choose according to the object he
-     *                   is going to save in to registry
-     * @param identifier Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
-     *                   identifier will be generated experimentID
-     * @param fieldName  Field which need to be updated in the registry. In Experiment_Basic_Type, if you want to update the
-     *                   description, field will be "description". Field names are defined in
-     *                   org.apache.airavata.registry.cpi.utils.Constants
-     * @param value      Value by which the given field need to be updated. If the field is "description", that field will be
-     *                   updated by given value
-     */
-    @Override
-    public void update(RegistryModelType dataType, Object identifier, String fieldName, Object value) throws RegistryException {
-        try {
-            switch (dataType) {
-                case EXPERIMENT:
-                    experimentRegistry.updateExperimentField((String) identifier, fieldName, value);
-                    break;
-                case EXPERIMENT_CONFIGURATION_DATA:
-                    experimentRegistry.updateExpConfigDataField((String) identifier, fieldName, value);
-                    break;
-                default:
-                    logger.error("Unsupported data type...", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-        } catch (Exception e) {
-            logger.error("Error while updating the resource " + dataType.toString(), new RegistryException(e));
-            throw new RegistryException("Error while updating the resource " + dataType.toString(), e);
-        }
-
-    }
-
-    /**
-     * This method is to retrieve object according to the identifier. In the experiment basic data type, if you give the
-     * experiment id, this method will return the BasicMetadata object
-     *
-     * @param dataType   Data type is a predefined type which the programmer should choose according to the object he
-     *                   is going to save in to registry
-     * @param identifier Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
-     *                   identifier will be generated experimentID
-     * @return object according to the given identifier.
-     */
-    @Override
-    public Object get(RegistryModelType dataType, Object identifier) throws RegistryException {
-        try {
-            switch (dataType) {
-                case PROJECT:
-                    return projectRegistry.getProject((String)identifier);
-                case GATEWAY:
-                    return gatewayRegistry.getGateway((String)identifier);
-                case EXPERIMENT:
-                    return experimentRegistry.getExperiment((String) identifier, null);
-                case EXPERIMENT_CONFIGURATION_DATA:
-                    return experimentRegistry.getConfigData((String) identifier, null);
-                case EXPERIMENT_OUTPUT:
-                    return experimentRegistry.getExperimentOutputs((String) identifier);
-                case EXPERIMENT_STATUS:
-                    return experimentRegistry.getExperimentStatus((String) identifier);
-                case WORKFLOW_NODE_DETAIL:
-                    return experimentRegistry.getWorkflowNodeDetails((String) identifier);
-                case WORKFLOW_NODE_STATUS:
-                    return experimentRegistry.getWorkflowNodeStatus((String) identifier);
-                case NODE_OUTPUT:
-                    return experimentRegistry.getNodeOutputs((String) identifier);
-                case TASK_DETAIL:
-                    return experimentRegistry.getTaskDetails((String) identifier);
-                case APPLICATION_OUTPUT:
-                    return experimentRegistry.getApplicationOutputs((String) identifier);
-                case TASK_STATUS:
-                    return experimentRegistry.getTaskStatus((String) identifier);
-                case JOB_DETAIL:
-                    return experimentRegistry.getJobDetails((CompositeIdentifier) identifier);
-                case JOB_STATUS:
-                    return experimentRegistry.getJobStatus((CompositeIdentifier) identifier);
-                case APPLICATION_STATUS:
-                    return experimentRegistry.getApplicationStatus((CompositeIdentifier) identifier);
-                case DATA_TRANSFER_DETAIL:
-                    return experimentRegistry.getDataTransferDetails((CompositeIdentifier) identifier);
-                case TRANSFER_STATUS:
-                    return experimentRegistry.getDataTransferStatus((CompositeIdentifier) identifier);
-                case COMPUTATIONAL_RESOURCE_SCHEDULING:
-                    return experimentRegistry.getComputationalScheduling(dataType, (String) identifier);
-                case ADVANCE_INPUT_DATA_HANDLING:
-                    return experimentRegistry.getInputDataHandling(dataType, (String) identifier);
-                case ADVANCE_OUTPUT_DATA_HANDLING:
-                    return experimentRegistry.getOutputDataHandling(dataType, (String) identifier);
-                case QOS_PARAM:
-                    return experimentRegistry.getQosParams(dataType, (String) identifier);
-                default:
-                    logger.error("Unsupported data type...", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-        } catch (Exception e) {
-            logger.error("Error while retrieving the resource " + dataType.toString(), new RegistryException(e));
-            throw new RegistryException("Error while retrieving the resource " + dataType.toString() , e);
-        }
-    }
-
-    /**
-     * This method is to retrieve list of objects according to a given criteria
-     *
-     * @param dataType  Data type is a predefined type which the programmer should choose according to the object he
-     *                  is going to save in to registry
-     * @param fieldName FieldName is the field that filtering should be done. For example, if we want to retrieve all
-     *                  the experiments for a given user, filterBy will be "userName"
-     * @param value     value for the filtering field. In the experiment case, value for "userName" can be "admin"
-     * @return List of objects according to the given criteria
-     */
-    @Override
-    public List<Object> get(RegistryModelType dataType, String fieldName, Object value) throws RegistryException {
-        try {
-            List<Object> result = new ArrayList<Object>();
-            switch (dataType) {
-                case PROJECT:
-                    List<Project> projectList = projectRegistry.getProjectList(fieldName, value);
-                    for (Project project : projectList ){
-                        result.add(project);
-                    }
-                    return result;
-                case GATEWAY:
-                    List<Gateway> allGateways = gatewayRegistry.getAllGateways();
-                    for (Gateway gateway : allGateways){
-                        result.add(gateway);
-                    }
-                    return result;
-                case EXPERIMENT:
-                    List<Experiment> experimentList = experimentRegistry.getExperimentList(fieldName, value);
-                    for (Experiment experiment : experimentList) {
-                        result.add(experiment);
-                    }
-                    return result;
-                case WORKFLOW_NODE_DETAIL:
-                    List<WorkflowNodeDetails> wfNodeDetails = experimentRegistry.getWFNodeDetails(fieldName, value);
-                    for (WorkflowNodeDetails wf : wfNodeDetails) {
-                        result.add(wf);
-                    }
-                    return result;
-                case WORKFLOW_NODE_STATUS:
-                    List<WorkflowNodeStatus> wfNodeStatusList = experimentRegistry.getWFNodeStatusList(fieldName, value);
-                    for (WorkflowNodeStatus wfs : wfNodeStatusList) {
-                        result.add(wfs);
-                    }
-                    return result;
-                case TASK_DETAIL:
-                    List<TaskDetails> taskDetails = experimentRegistry.getTaskDetails(fieldName, value);
-                    for (TaskDetails task : taskDetails) {
-                        result.add(task);
-                    }
-                    return result;
-                case JOB_DETAIL:
-                    List<JobDetails> jobDetails = experimentRegistry.getJobDetails(fieldName, value);
-                    for (JobDetails job : jobDetails) {
-                        result.add(job);
-                    }
-                    return result;
-                case DATA_TRANSFER_DETAIL:
-                    List<DataTransferDetails> dataTransferDetails = experimentRegistry.getDataTransferDetails(fieldName, value);
-                    for (DataTransferDetails transferDetails : dataTransferDetails) {
-                        result.add(transferDetails);
-                    }
-                    return result;
-                case ERROR_DETAIL:
-                    List<ErrorDetails> errorDetails = experimentRegistry.getErrorDetails(fieldName, value);
-                    for (ErrorDetails error : errorDetails) {
-                        result.add(error);
-                    }
-                    return result;
-                default:
-                    logger.error("Unsupported data type...", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-        } catch (Exception e) {
-            logger.error("Error while retrieving the resource " + dataType.toString(), new RegistryException(e));
-            throw new RegistryException("Error while retrieving the resource " + dataType.toString(), e);
-        }
-
-    }
-
-    /**
-     * This method is to retrieve list of objects according to a given criteria with pagination and ordering
-     *
-     * @param dataType  Data type is a predefined type which the programmer should choose according to the object he
-     *                  is going to save in to registry
-     * @param fieldName FieldName is the field that filtering should be done. For example, if we want to retrieve all
-     *                  the experiments for a given user, filterBy will be "userName"
-     * @param value     value for the filtering field. In the experiment case, value for "userName" can be "admin"
-     * @param limit     Size of the results to be returned
-     * @param offset    Start position of the results to be retrieved
-     * @param orderByIdentifier     Named of the column in which the ordering is based
-     * @param resultOrderType       Type of ordering i.e ASC or DESC
-     * @return
-     * @throws RegistryException
-     */
-    @Override
-    public List<Object> get(RegistryModelType dataType, String fieldName, Object value, int limit,
-                            int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
-        try {
-            List<Object> result = new ArrayList<Object>();
-            switch (dataType) {
-                case PROJECT:
-                    List<Project> projectList = projectRegistry
-                            .getProjectList(fieldName, value, limit, offset, orderByIdentifier, resultOrderType);
-                    for (Project project : projectList ){
-                        result.add(project);
-                    }
-                    return result;
-                case EXPERIMENT:
-                    List<Experiment> experimentList = experimentRegistry.getExperimentList(fieldName, value,
-                            limit, offset, orderByIdentifier, resultOrderType);
-                    for (Experiment experiment : experimentList) {
-                        result.add(experiment);
-                    }
-                    return result;
-                default:
-                    logger.error("Unsupported data type...", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-        } catch (Exception e) {
-            logger.error("Error while retrieving the resource " + dataType.toString(), new RegistryException(e));
-            throw new RegistryException("Error while retrieving the resource " + dataType.toString(), e);
-        }
-    }
-
-    /**
-     * This method is to retrieve list of objects according to a given criteria
-     * @param dataType Data type is a predefined type which the programmer should choose according to the object he
-     *                 is going to save in to registry
-     * @param filters filters is a map of field name and value that you need to use for search filtration
-     * @return List of objects according to the given criteria
-     */
-    @Override
-    public List<Object> search(RegistryModelType dataType, Map<String, String> filters) throws RegistryException {
-        return search(dataType, filters, -1, -1, null, null);
-    }
-
-    /**
-     * This method is to retrieve list of objects with pagination according to a given criteria sorted
-     * according by the specified  identified and specified ordering (i.e either ASC or DESC)
-     * @param dataType Data type is a predefined type which the programmer should choose according to the object he
-     *                 is going to save in to registry
-     * @param filters            filters is a map of field name and value that you need to use for search filtration
-     * @param limit              amount of the results to be returned
-     * @param offset             offset of the results from the sorted list to be fetched from
-     * @param orderByIdentifier  identifier (i.e the column) which will be used as the basis to sort the results
-     * @param resultOrderType    The type of ordering (i.e ASC or DESC) that has to be used when retrieving the results
-     * @return List of objects according to the given criteria
-     */
-    @Override
-    public List<Object> search(RegistryModelType dataType, Map<String, String> filters, int limit,
-                               int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
-        try {
-            List<Object> result = new ArrayList<Object>();
-            switch (dataType) {
-                case PROJECT:
-                    List<Project> projectList
-                            = projectRegistry.searchProjects(filters, limit, offset,
-                            orderByIdentifier, resultOrderType);
-                    for (Project project : projectList ){
-                        result.add(project);
-                    }
-                    return result;
-                case EXPERIMENT:
-                    List<ExperimentSummary> experimentSummaries = experimentRegistry
-                            .searchExperiments(filters, limit, offset, orderByIdentifier,
-                                    resultOrderType);
-                    for (ExperimentSummary ex : experimentSummaries){
-                        result.add(ex);
-                    }
-                    return result;
-                default:
-                    logger.error("Unsupported data type...", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-        } catch (Exception e) {
-            logger.error("Error while retrieving the resource " + dataType.toString(), new RegistryException(e));
-            throw new RegistryException("Error while retrieving the resource " + dataType.toString(), e);
-        }
-    }
-
-    /**
-     * This method is to retrieve a specific value for a given field.
-     *
-     * @param dataType   Data type is a predefined type which the programmer should choose according to the object he
-     *                   is going to save in to registry
-     * @param identifier Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
-     *                   identifier will be generated experimentID
-     * @param field      field that filtering should be done. For example, if we want to execution user for a given
-     *                   experiment, field will be "userName"
-     * @return return the value for the specific field where data model is identified by the unique identifier that has
-     * given
-     */
-    @Override
-    public Object getValue(RegistryModelType dataType, Object identifier, String field) throws RegistryException {
-        try {
-            switch (dataType) {
-                case EXPERIMENT:
-                    return experimentRegistry.getExperiment((String) identifier, field);
-                case EXPERIMENT_CONFIGURATION_DATA:
-                    return experimentRegistry.getConfigData((String) identifier, field);
-                default:
-                    logger.error("Unsupported data type...", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-        } catch (Exception e) {
-            logger.error("Error while retrieving the resource " + dataType.toString(), new RegistryException(e));
-            throw new RegistryException("Error while retrieving the resource " + dataType.toString(), e);
-        }
-
-    }
-
-    /**
-     * This method is to retrieve all the identifiers according to given filtering criteria. For an example, if you want
-     * to get all the experiment ids for a given gateway, your field name will be "gateway" and the value will be the
-     * name of the gateway ("default"). Similar manner you can retrieve all the experiment ids for a given user.
-     *
-     * @param dataType  Data type is a predefined type which the programmer should choose according to the object he
-     *                  is going to save in to registry
-     * @param fieldName FieldName is the field that filtering should be done. For example, if we want to retrieve all
-     *                  the experiments for a given user, filterBy will be "userName"
-     * @param value     value for the filtering field. In the experiment case, value for "userName" can be "admin"
-     * @return id list according to the filtering criteria
-     */
-    @Override
-    public List<String> getIds(RegistryModelType dataType, String fieldName, Object value) throws RegistryException {
-        try {
-            switch (dataType) {
-                case PROJECT:
-                    return projectRegistry.getProjectIds(fieldName, value);
-                case EXPERIMENT:
-                    return experimentRegistry.getExperimentIds(fieldName, value);
-                case EXPERIMENT_CONFIGURATION_DATA:
-                    return experimentRegistry.getExperimentIds(fieldName, value);
-                case WORKFLOW_NODE_DETAIL:
-                    return experimentRegistry.getWorkflowNodeIds(fieldName, value);
-                case TASK_DETAIL:
-                    return experimentRegistry.getTaskDetailIds(fieldName, value);
-                case JOB_DETAIL:
-                    return experimentRegistry.getJobDetailIds(fieldName, value);
-                case DATA_TRANSFER_DETAIL:
-                    return experimentRegistry.getTransferDetailIds(fieldName, value);
-                default:
-                    logger.error("Unsupported data type...", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-        } catch (Exception e) {
-            logger.error("Error while retrieving the ids for" + dataType.toString(), new RegistryException(e));
-            throw new RegistryException("Error while retrieving the ids for " + dataType.toString(), e);
-        }
-
-    }
-
-    /**
-     * This method is to remove a item from the registry
-     *
-     * @param dataType   Data type is a predefined type which the programmer should choose according to the object he
-     *                   is going to save in to registry
-     * @param identifier Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
-     *                   identifier will be generated experimentID
-     */
-    @Override
-    public void remove(RegistryModelType dataType, Object identifier) throws RegistryException {
-        try {
-            switch (dataType) {
-                case PROJECT:
-                    projectRegistry.removeProject((String)identifier);
-                    break;
-                case GATEWAY:
-                    gatewayRegistry.removeGateway((String)identifier);
-                    break;
-                case EXPERIMENT:
-                    experimentRegistry.removeExperiment((String) identifier);
-                    break;
-                case EXPERIMENT_CONFIGURATION_DATA:
-                    experimentRegistry.removeExperimentConfigData((String) identifier);
-                    break;
-                case WORKFLOW_NODE_DETAIL:
-                    experimentRegistry.removeWorkflowNode((String) identifier);
-                    break;
-                case TASK_DETAIL:
-                    experimentRegistry.removeTaskDetails((String) identifier);
-                    break;
-                case JOB_DETAIL:
-                    experimentRegistry.removeJobDetails((CompositeIdentifier) identifier);
-                    break;
-                case DATA_TRANSFER_DETAIL:
-                    experimentRegistry.removeDataTransferDetails((CompositeIdentifier) identifier);
-                    break;
-                case COMPUTATIONAL_RESOURCE_SCHEDULING:
-                    experimentRegistry.removeComputationalScheduling(dataType, (String) identifier);
-                    break;
-                case ADVANCE_OUTPUT_DATA_HANDLING:
-                    experimentRegistry.removeOutputDataHandling(dataType, (String) identifier);
-                    break;
-                case ADVANCE_INPUT_DATA_HANDLING:
-                    experimentRegistry.removeInputDataHandling(dataType, (String) identifier);
-                    break;
-                case QOS_PARAM:
-                    experimentRegistry.removeQOSParams(dataType, (String) identifier);
-                    break;
-                default:
-                    logger.error("Unsupported data type...", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-        } catch (Exception e) {
-            logger.error("Error while removing the resource " + dataType.toString(), new RegistryException(e));
-            throw new RegistryException("Error while removing the resource " + dataType.toString(), e);
-        }
-
-    }
-
-    /**
-     * This method will check whether a given data type which can be identified with the identifier exists or not
-     *
-     * @param dataType   Data type is a predefined type which the programmer should choose according to the object he
-     *                   is going to save in to registry
-     * @param identifier Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
-     *                   identifier will be generated experimentID
-     * @return whether the given data type exists or not
-     */
-    @Override
-    public boolean isExist(RegistryModelType dataType, Object identifier) throws RegistryException {
-        try {
-            switch (dataType) {
-                case PROJECT:
-                    return projectRegistry.isProjectExist((String)identifier);
-                case GATEWAY:
-                    return gatewayRegistry.isGatewayExist((String)identifier);
-                case EXPERIMENT:
-                    return experimentRegistry.isExperimentExist((String) identifier);
-                case EXPERIMENT_CONFIGURATION_DATA:
-                    return experimentRegistry.isExperimentConfigDataExist((String) identifier);
-                case WORKFLOW_NODE_DETAIL:
-                    return experimentRegistry.isWFNodeExist((String) identifier);
-                case TASK_DETAIL:
-                    return experimentRegistry.isTaskDetailExist((String) identifier);
-                case JOB_DETAIL:
-                    return experimentRegistry.isJobDetailExist((CompositeIdentifier) identifier);
-                case DATA_TRANSFER_DETAIL:
-                    return experimentRegistry.isTransferDetailExist((CompositeIdentifier) identifier);
-                case COMPUTATIONAL_RESOURCE_SCHEDULING:
-                    return experimentRegistry.isComputationalSchedulingExist(dataType, (String) identifier);
-                case ADVANCE_INPUT_DATA_HANDLING:
-                    return experimentRegistry.isInputDataHandlingExist(dataType, (String) identifier);
-                case ADVANCE_OUTPUT_DATA_HANDLING:
-                    return experimentRegistry.isOutputDataHandlingExist(dataType, (String) identifier);
-                case QOS_PARAM:
-                    return experimentRegistry.isQOSParamsExist(dataType, (String) identifier);
-                default:
-                    logger.error("Unsupported data type...", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-        } catch (Exception e) {
-            logger.error("Error while checking existence of the resource " + dataType.toString(), new RegistryException(e));
-            throw new RegistryException("Error while checking existence of the resource " + dataType.toString(), e);
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java
deleted file mode 100644
index 7920200..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/UserReg.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.impl;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
-import org.apache.airavata.registry.cpi.RegistryException;
-
-public class UserReg {
-    public WorkerResource getSystemUser() throws ApplicationSettingsException, RegistryException {
-        return (WorkerResource)ResourceUtils.getWorker(ServerSettings.getDefaultUserGateway(), ServerSettings.getDefaultUser());
-    }
-
-    public WorkerResource getExistingUser (String gatewayName, String userName) throws RegistryException {
-        return (WorkerResource)ResourceUtils.getWorker(gatewayName, userName);
-    }
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java
deleted file mode 100644
index 8f40f2d..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedInputDataHandling.java
+++ /dev/null
@@ -1,129 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@DataCache
-@Entity
-@Table(name = "ADVANCE_INPUT_DATA_HANDLING")
-public class AdvancedInputDataHandling implements Serializable {
-    @Id
-    @GeneratedValue
-    @Column(name = "INPUT_DATA_HANDLING_ID")
-    private int dataHandlingId;
-    @Column(name = "EXPERIMENT_ID")
-    private String expId;
-    @Column(name = "TASK_ID")
-    private String taskId;
-    @Column(name = "WORKING_DIR_PARENT")
-    private String parentWorkingDir;
-    @Column(name = "UNIQUE_WORKING_DIR")
-    private String workingDir;
-    @Column(name = "STAGE_INPUT_FILES_TO_WORKING_DIR")
-    private boolean stageInputsToWorkingDir;
-    @Column(name = "CLEAN_AFTER_JOB")
-    private boolean cleanAfterJob;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "EXPERIMENT_ID")
-    private Experiment experiment;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "TASK_ID")
-    private TaskDetail task;
-
-    public int getDataHandlingId() {
-        return dataHandlingId;
-    }
-
-    public void setDataHandlingId(int dataHandlingId) {
-        this.dataHandlingId = dataHandlingId;
-    }
-
-    public String getExpId() {
-        return expId;
-    }
-
-    public void setExpId(String expId) {
-        this.expId = expId;
-    }
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-
-    public String getParentWorkingDir() {
-        return parentWorkingDir;
-    }
-
-    public void setParentWorkingDir(String parentWorkingDir) {
-        this.parentWorkingDir = parentWorkingDir;
-    }
-
-    public String getWorkingDir() {
-        return workingDir;
-    }
-
-    public void setWorkingDir(String workingDir) {
-        this.workingDir = workingDir;
-    }
-
-    public boolean isStageInputsToWorkingDir() {
-        return stageInputsToWorkingDir;
-    }
-
-    public void setStageInputsToWorkingDir(boolean stageInputsToWorkingDir) {
-        this.stageInputsToWorkingDir = stageInputsToWorkingDir;
-    }
-
-    public boolean isCleanAfterJob() {
-        return cleanAfterJob;
-    }
-
-    public void setCleanAfterJob(boolean cleanAfterJob) {
-        this.cleanAfterJob = cleanAfterJob;
-    }
-
-    public Experiment getExperiment() {
-        return experiment;
-    }
-
-    public void setExperiment(Experiment experiment) {
-        this.experiment = experiment;
-    }
-
-    public TaskDetail getTask() {
-        return task;
-    }
-
-    public void setTask(TaskDetail task) {
-        this.task = task;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java
deleted file mode 100644
index d305f22..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/AdvancedOutputDataHandling.java
+++ /dev/null
@@ -1,119 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@DataCache
-@Entity
-@Table(name = "ADVANCE_OUTPUT_DATA_HANDLING")
-public class AdvancedOutputDataHandling implements Serializable {
-    @Id
-    @GeneratedValue
-    @Column(name = "OUTPUT_DATA_HANDLING_ID")
-    private int outputDataHandlingId;
-    @Column(name = "EXPERIMENT_ID")
-    private String expId;
-    @Column(name = "TASK_ID")
-    private String taskId;
-    @Column(name = "OUTPUT_DATA_DIR")
-    private String outputDataDir;
-    @Column(name = "DATA_REG_URL")
-    private String dataRegUrl;
-    @Column(name = "PERSIST_OUTPUT_DATA")
-    private boolean persistOutputData;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "EXPERIMENT_ID")
-    private Experiment experiment;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "TASK_ID")
-    private TaskDetail task;
-
-    public int getOutputDataHandlingId() {
-        return outputDataHandlingId;
-    }
-
-    public void setOutputDataHandlingId(int outputDataHandlingId) {
-        this.outputDataHandlingId = outputDataHandlingId;
-    }
-
-    public String getExpId() {
-        return expId;
-    }
-
-    public void setExpId(String expId) {
-        this.expId = expId;
-    }
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-
-    public String getOutputDataDir() {
-        return outputDataDir;
-    }
-
-    public void setOutputDataDir(String outputDataDir) {
-        this.outputDataDir = outputDataDir;
-    }
-
-    public String getDataRegUrl() {
-        return dataRegUrl;
-    }
-
-    public void setDataRegUrl(String dataRegUrl) {
-        this.dataRegUrl = dataRegUrl;
-    }
-
-    public boolean isPersistOutputData() {
-        return persistOutputData;
-    }
-
-    public void setPersistOutputData(boolean persistOutputData) {
-        this.persistOutputData = persistOutputData;
-    }
-
-    public Experiment getExperiment() {
-        return experiment;
-    }
-
-    public void setExperiment(Experiment experiment) {
-        this.experiment = experiment;
-    }
-
-    public TaskDetail getTask() {
-        return task;
-    }
-
-    public void setTask(TaskDetail task) {
-        this.task = task;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java
deleted file mode 100644
index 66a9796..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput.java
+++ /dev/null
@@ -1,173 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@DataCache
-@Entity
-@Table(name = "APPLICATION_INPUT")
-@IdClass(ApplicationInput_PK.class)
-public class ApplicationInput implements Serializable {
-    @Id
-    @Column(name = "TASK_ID")
-    private String taskId;
-    @Id
-    @Column(name = "INPUT_KEY")
-    private String inputKey;
-    @Column(name = "DATA_TYPE")
-    private String dataType;
-    @Column(name = "METADATA")
-    private String metadata;
-    @Lob
-    @Column(name = "VALUE")
-    private char[] value;
-    @Column(name = "APP_ARGUMENT")
-    private String appArgument;
-
-    @Column(name = "INPUT_ORDER")
-    private int inputOrder;
-
-    @Column(name = "STANDARD_INPUT")
-    private boolean standardInput;
-
-    @Column(name = "USER_FRIENDLY_DESC")
-    private String userFriendlyDesc;
-
-    @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 = "TASK_ID")
-    private TaskDetail task;
-
-    public int getInputOrder() {
-        return inputOrder;
-    }
-
-    public void setInputOrder(int inputOrder) {
-        this.inputOrder = inputOrder;
-    }
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-
-    public String getInputKey() {
-        return inputKey;
-    }
-
-    public void setInputKey(String inputKey) {
-        this.inputKey = inputKey;
-    }
-
-    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 char[] getValue() {
-        return value;
-    }
-
-    public void setValue(char[] value) {
-        this.value = value;
-    }
-
-    public TaskDetail getTask() {
-        return task;
-    }
-
-    public void setTask(TaskDetail task) {
-        this.task = task;
-    }
-
-    public String getAppArgument() {
-        return appArgument;
-    }
-
-    public void setAppArgument(String appArgument) {
-        this.appArgument = appArgument;
-    }
-
-    public boolean isStandardInput() {
-        return standardInput;
-    }
-
-    public void setStandardInput(boolean standardInput) {
-        this.standardInput = standardInput;
-    }
-
-    public String getUserFriendlyDesc() {
-        return userFriendlyDesc;
-    }
-
-    public void setUserFriendlyDesc(String userFriendlyDesc) {
-        this.userFriendlyDesc = userFriendlyDesc;
-    }
-
-    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/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java
deleted file mode 100644
index e99cbd2..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationInput_PK.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.persistance.registry.jpa.model;
-
-import java.io.Serializable;
-
-public class ApplicationInput_PK implements Serializable {
-    private String taskId;
-    private String inputKey;
-
-    public ApplicationInput_PK(String inputKey, String taskId) {
-        this.inputKey = inputKey;
-        this.taskId = taskId;
-    }
-
-    public ApplicationInput_PK() {
-        ;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-
-    public String getInputKey() {
-        return inputKey;
-    }
-
-    public void setInputKey(String inputKey) {
-        this.inputKey = inputKey;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java
deleted file mode 100644
index c95f934..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput.java
+++ /dev/null
@@ -1,150 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@DataCache
-@Entity
-@Table(name = "APPLICATION_OUTPUT")
-@IdClass(ApplicationOutput_PK.class)
-public class ApplicationOutput implements Serializable {
-    @Id
-    @Column(name = "TASK_ID")
-    private String taskId;
-    @Id
-    @Column(name = "OUTPUT_KEY")
-    private String outputKey;
-    @Column(name = "DATA_TYPE")
-    private String dataType;
-    @Lob
-    @Column(name = "VALUE")
-    private char[] value;
-
-    @Column(name = "IS_REQUIRED")
-    private boolean isRequired;
-    @Column(name="REQUIRED_TO_COMMANDLINE")
-    private boolean addedToCmd;
-    @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 = "TASK_ID")
-    private TaskDetail task;
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-
-    public char[] getValue() {
-        return value;
-    }
-
-    public void setValue(char[] value) {
-        this.value = value;
-    }
-
-    public TaskDetail getTask() {
-        return task;
-    }
-
-    public void setTask(TaskDetail task) {
-        this.task = task;
-    }
-
-    public String getOutputKey() {
-        return outputKey;
-    }
-
-    public void setOutputKey(String outputKey) {
-        this.outputKey = outputKey;
-    }
-
-    public String getDataType() {
-        return dataType;
-    }
-
-    public void setDataType(String dataType) {
-        this.dataType = dataType;
-    }
-
-    public boolean isRequired() {
-        return isRequired;
-    }
-
-    public void setRequired(boolean isRequired) {
-        this.isRequired = isRequired;
-    }
-
-    public boolean isAddedToCmd() {
-        return addedToCmd;
-    }
-
-    public void setAddedToCmd(boolean addedToCmd) {
-        this.addedToCmd = addedToCmd;
-    }
-
-    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/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java
deleted file mode 100644
index 17a5021..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/ApplicationOutput_PK.java
+++ /dev/null
@@ -1,64 +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.persistance.registry.jpa.model;
-
-import java.io.Serializable;
-
-public class ApplicationOutput_PK implements Serializable {
-    private String taskId;
-    private String outputKey;
-
-    public ApplicationOutput_PK(String outputKey, String taskId) {
-        this.outputKey = outputKey;
-        this.taskId = taskId;
-    }
-
-    public ApplicationOutput_PK() {
-        ;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return 1;
-    }
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-
-    public String getOutputKey() {
-        return outputKey;
-    }
-
-    public void setOutputKey(String outputKey) {
-        this.outputKey = outputKey;
-    }
-}


[33/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NotificationEmailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NotificationEmailResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NotificationEmailResource.java
deleted file mode 100644
index 5ac864f..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/NotificationEmailResource.java
+++ /dev/null
@@ -1,125 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.*;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.util.List;
-
-public class NotificationEmailResource extends AbstractResource {
-    private static final Logger logger = LoggerFactory.getLogger(NotificationEmailResource.class);
-
-    private int emailId = 0;
-    private ExperimentResource experimentResource;
-    private TaskDetailResource taskDetailResource;
-    private String emailAddress;
-
-
-    public String getEmailAddress() {
-        return emailAddress;
-    }
-
-    public void setEmailAddress(String emailAddress) {
-        this.emailAddress = emailAddress;
-    }
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    public TaskDetailResource getTaskDetailResource() {
-        return taskDetailResource;
-    }
-
-    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
-        this.taskDetailResource = taskDetailResource;
-    }
-
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public Resource get(ResourceType type, Object name) throws RegistryException {
-        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public List<Resource> get(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for experiment input data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Notification_Email notification_email;
-            if (emailId != 0 ){
-                notification_email  = em.find(Notification_Email.class, emailId);
-                notification_email.setEmailId(emailId);
-            }else {
-                notification_email = new Notification_Email();
-            }
-            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
-            notification_email.setExperiment(experiment);
-            notification_email.setExperiment_id(experiment.getExpId());
-            if (taskDetailResource != null){
-                TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
-                notification_email.setTaskDetail(taskDetail);
-                notification_email.setTaskId(taskDetail.getTaskId());
-            }
-            notification_email.setEmailAddress(emailAddress);
-            em.persist(notification_email);
-            emailId = notification_email.getEmailId();
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java
deleted file mode 100644
index 9432067..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectResource.java
+++ /dev/null
@@ -1,531 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.*;
-import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.ResultOrderType;
-import org.apache.airavata.registry.cpi.utils.Constants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.List;
-
-public class ProjectResource extends AbstractResource {
-    private final static Logger logger = LoggerFactory.getLogger(ProjectResource.class);
-    private String name;
-    private String id;
-    private GatewayResource gateway;
-    private WorkerResource worker;
-    private String description;
-    private Timestamp creationTime;
-
-    /**
-     *
-     */
-    public ProjectResource() {
-    }
-
-    /**
-     *
-     * @param worker gateway worker
-     * @param gateway gateway
-     * @param projectId project name
-     */
-    public ProjectResource(WorkerResource worker, GatewayResource gateway, String projectId) {
-        this.setWorker(worker);
-        this.setGateway(gateway);
-        this.id = projectId;
-    }
-
-    /**
-     *
-     * @param type child resource type
-     * @return child resource
-     */
-    public Resource create(ResourceType type) throws RegistryException {
-        if (type == ResourceType.EXPERIMENT) {
-            ExperimentResource experimentResource = new ExperimentResource();
-            experimentResource.setGateway(getGateway());
-            experimentResource.setExecutionUser(worker.getUser());
-            experimentResource.setProject(this);
-            return experimentResource;
-        } else if (type == ResourceType.PROJECT_USER){
-            ProjectUserResource pr = new ProjectUserResource();
-            pr.setProjectId(id);
-            pr.setUserName(worker.getUser());
-            return pr;
-        }
-        else {
-            logger.error("Unsupported resource type for project resource.", new IllegalArgumentException());
-            throw new IllegalArgumentException("Unsupported resource type for project resource.");
-        }
-    }
-
-    /**
-     *
-     * @param type child resource type
-     * @param name child resource name
-     */
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            if (type == ResourceType.EXPERIMENT) {
-                QueryGenerator generator = new QueryGenerator(EXPERIMENT);
-                generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
-                Query q = generator.deleteQuery(em);
-                q.executeUpdate();
-            } else if (type == ResourceType.PROJECT_USER) {
-                QueryGenerator generator = new QueryGenerator(PROJECT_USER);
-                generator.setParameter(ProjectUserConstants.USERNAME, name);
-                generator.setParameter(ProjectUserConstants.PROJECT_ID, this.id);
-                Query q = generator.deleteQuery(em);
-                q.executeUpdate();
-            } else {
-                logger.error("Unsupported resource type for project resource.", new IllegalArgumentException());
-                throw new IllegalArgumentException("Unsupported resource type for project resource.");
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     *
-     * @param type child resource type
-     * @param name child resource name
-     * @return child resource
-     */
-    public Resource get(ResourceType type, Object name) throws RegistryException {
-        EntityManager em = null;
-        try {
-            if (type == ResourceType.EXPERIMENT) {
-                em = ResourceUtils.getEntityManager();
-                em.getTransaction().begin();
-                QueryGenerator generator = new QueryGenerator(EXPERIMENT);
-                generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
-                Query q = generator.selectQuery(em);
-                Experiment experiment = (Experiment) q.getSingleResult();
-                ExperimentResource experimentResource = (ExperimentResource)
-                        Utils.getResource(ResourceType.EXPERIMENT, experiment);
-                em.getTransaction().commit();
-                em.close();
-                return experimentResource;
-            } else if (type == ResourceType.PROJECT_USER) {
-                em = ResourceUtils.getEntityManager();
-                em.getTransaction().begin();
-                QueryGenerator generator = new QueryGenerator(PROJECT_USER);
-                generator.setParameter(ProjectUserConstants.USERNAME, name);
-                generator.setParameter(ProjectUserConstants.PROJECT_ID, this.id);
-                Query q = generator.selectQuery(em);
-                ProjectUser prUser = (ProjectUser) q.getSingleResult();
-                ExperimentResource experimentResource = (ExperimentResource)
-                        Utils.getResource(ResourceType.PROJECT_USER, prUser);
-                em.getTransaction().commit();
-                em.close();
-                return experimentResource;
-            } else {
-                logger.error("Unsupported resource type for project resource.", new IllegalArgumentException());
-                throw new IllegalArgumentException("Unsupported resource type for project resource.");
-            }
-        } catch (Exception e) {
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     *
-     * @param type child resource type
-     * @return list of child resources
-     */
-    @Override
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        List<Resource> resourceList = new ArrayList<Resource>();
-        EntityManager em = null;
-        try {
-            if (type == ResourceType.EXPERIMENT) {
-                em = ResourceUtils.getEntityManager();
-                em.getTransaction().begin();
-                QueryGenerator generator = new QueryGenerator(EXPERIMENT);
-                generator.setParameter(ExperimentConstants.PROJECT_ID, id);
-                Query q = generator.selectQuery(em);
-                List<?> results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        Experiment experiment = (Experiment) result;
-                        ExperimentResource experimentResource = (ExperimentResource)
-                                Utils.getResource(ResourceType.EXPERIMENT, experiment);
-                        resourceList.add(experimentResource);
-                    }
-                }
-                em.getTransaction().commit();
-                em.close();
-            } else if (type == ResourceType.PROJECT_USER) {
-                em = ResourceUtils.getEntityManager();
-                em.getTransaction().begin();
-                QueryGenerator generator = new QueryGenerator(PROJECT_USER);
-                generator.setParameter(ProjectUserConstants.PROJECT_ID, id);
-                Query q = generator.selectQuery(em);
-                List<?> results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        ProjectUser projectUser = (ProjectUser) result;
-                        ProjectUserResource pr = (ProjectUserResource)
-                                Utils.getResource(ResourceType.PROJECT_USER, projectUser);
-                        resourceList.add(pr);
-                    }
-                }
-                em.getTransaction().commit();
-                em.close();
-            } else {
-                logger.error("Unsupported resource type for project resource.", new IllegalArgumentException());
-                throw new IllegalArgumentException("Unsupported resource type for project resource.");
-            }
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return resourceList;
-    }
-
-    /**
-     * Get results with pagination and ordering
-     *
-     * @param type
-     * @param limit
-     * @param offset
-     * @param orderByIdentifier
-     * @return
-     * @throws RegistryException
-     */
-    public List<Resource> get(ResourceType type, int limit, int offset, Object orderByIdentifier,
-                              ResultOrderType resultOrderType) throws RegistryException{
-        List<Resource> resourceList = new ArrayList<Resource>();
-        EntityManager em = null;
-        try {
-            if (type == ResourceType.EXPERIMENT) {
-                em = ResourceUtils.getEntityManager();
-                em.getTransaction().begin();
-                QueryGenerator generator = new QueryGenerator(EXPERIMENT);
-                generator.setParameter(ExperimentConstants.PROJECT_ID, id);
-                Query q;
-                //ordering - supported only by CREATION_TIME
-                if(orderByIdentifier != null && resultOrderType != null
-                        && orderByIdentifier.equals(Constants.FieldConstants.ExperimentConstants.CREATION_TIME)) {
-                    q = generator.selectQuery(em, ExperimentConstants.CREATION_TIME, resultOrderType);
-                }else{
-                    q = generator.selectQuery(em);
-                }
-
-                //pagination
-                if(limit>0 && offset>=0){
-                    q.setFirstResult(offset);
-                    q.setMaxResults(limit);
-                }
-                List<?> results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        Experiment experiment = (Experiment) result;
-                        ExperimentResource experimentResource = (ExperimentResource)
-                                Utils.getResource(ResourceType.EXPERIMENT, experiment);
-                        resourceList.add(experimentResource);
-                    }
-                }
-                em.getTransaction().commit();
-                em.close();
-            } else if (type == ResourceType.PROJECT_USER) {
-                em = ResourceUtils.getEntityManager();
-                em.getTransaction().begin();
-                QueryGenerator generator = new QueryGenerator(PROJECT_USER);
-                generator.setParameter(ProjectUserConstants.PROJECT_ID, id);
-                Query q;
-                //ordering - only supported only by CREATION_TIME
-                if(orderByIdentifier != null && resultOrderType != null
-                        && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {
-                    q = generator.selectQuery(em, ProjectConstants.CREATION_TIME, resultOrderType);
-                }else{
-                    q = generator.selectQuery(em);
-                }
-
-                //pagination
-                if(limit>0 && offset>=0){
-                    q.setFirstResult(offset);
-                    q.setMaxResults(limit);
-                }
-                List<?> results = q.getResultList();
-                if (results.size() != 0) {
-                    for (Object result : results) {
-                        ProjectUser projectUser = (ProjectUser) result;
-                        ProjectUserResource pr = (ProjectUserResource)
-                                Utils.getResource(ResourceType.PROJECT_USER, projectUser);
-                        resourceList.add(pr);
-                    }
-                }
-                em.getTransaction().commit();
-                em.close();
-            } else {
-                logger.error("Unsupported resource type for project resource.", new IllegalArgumentException());
-                throw new IllegalArgumentException("Unsupported resource type for project resource.");
-            }
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return resourceList;
-    }
-
-    /**
-     * saveExperiment project to the database
-     */
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            Project existingProject = em.find(Project.class, id);
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Project project = new Project();
-            project.setProject_id(id);
-            project.setProject_name(name);
-            Gateway modelGateway = em.find(Gateway.class, gateway.getGatewayId());
-            project.setGateway(modelGateway);
-            project.setGateway_id(modelGateway.getGateway_id());
-            Users user = em.find(Users.class, worker.getUser());
-            project.setUsers(user);
-            project.setUser_name(user.getUser_name());
-            project.setDescription(description);
-            project.setCreationTime(creationTime);
-
-            if (existingProject != null) {
-                existingProject.setProject_name(name);
-                existingProject.setGateway(modelGateway);
-                existingProject.setGateway_id(modelGateway.getGateway_id());
-                existingProject.setUsers(user);
-                existingProject.setUser_name(user.getUser_name());
-                existingProject.setDescription(description);
-                existingProject.setCreationTime(creationTime);
-                project = em.merge(existingProject);
-            } else {
-                em.persist(project);
-            }
-
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    /**
-     *
-     * @return project name
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     *
-     * @param name  project name
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    /**
-     *
-     * @return gateway worker
-     */
-    public WorkerResource getWorker() {
-		return worker;
-	}
-
-    /**
-     *
-     * @param worker gateway worker
-     */
-    public void setWorker(WorkerResource worker) {
-		this.worker = worker;
-	}
-
-    /**
-     *
-     * @return gateway resource
-     */
-    public GatewayResource getGateway() {
-		return gateway;
-	}
-
-    /**
-     *
-     * @param gateway gateway resource
-     */
-    public void setGateway(GatewayResource gateway) {
-		this.gateway = gateway;
-	}
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    /**
-     *
-     * @param experimentId experiment ID
-     * @return whether the experiment exist
-     */
-    public boolean isExperimentExists(String experimentId) throws RegistryException{
-		return isExists(ResourceType.EXPERIMENT, experimentId);
-	}
-
-    /**
-     *
-     * @param experimentId experiment ID
-     * @return  experiment resource
-     */
-    public ExperimentResource createExperiment(String experimentId) throws RegistryException{
-		ExperimentResource experimentResource = (ExperimentResource)create(ResourceType.EXPERIMENT);
-		experimentResource.setExpID(experimentId);
-		return experimentResource;
-	}
-
-    /**
-     *
-     * @param experimentId experiment ID
-     * @return experiment resource
-     */
-	public ExperimentResource getExperiment(String experimentId) throws RegistryException{
-		return (ExperimentResource)get(ResourceType.EXPERIMENT,experimentId);
-	}
-
-    /**
-     *
-     * @return  list of experiments
-     */
-    public List<ExperimentResource> getExperiments() throws RegistryException{
-		List<Resource> list = get(ResourceType.EXPERIMENT);
-		List<ExperimentResource> result=new ArrayList<ExperimentResource>();
-		for (Resource resource : list) {
-			result.add((ExperimentResource) resource);
-		}
-		return result;
-	}
-
-    public List<ExperimentResource> getExperiments(int limit, int offset, Object orderByIdentifier,
-                                                   ResultOrderType resultOrderType) throws RegistryException{
-        List<Resource> list = get(ResourceType.EXPERIMENT, limit, offset, orderByIdentifier, resultOrderType);
-        List<ExperimentResource> result=new ArrayList<ExperimentResource>();
-        for (Resource resource : list) {
-            result.add((ExperimentResource) resource);
-        }
-        return result;
-    }
-
-    /**
-     *
-     * @param experimentId experiment ID
-     */
-    public void removeExperiment(String experimentId) throws RegistryException{
-		remove(ResourceType.EXPERIMENT, experimentId);
-	}
-
-    public List<ProjectUserResource> getProjectUserList () throws RegistryException{
-        List<Resource> resources = get(ResourceType.PROJECT_USER);
-        List<ProjectUserResource> projectUserResources = new ArrayList<ProjectUserResource>();
-        if (resources != null && !resources.isEmpty()){
-            for (Resource r : resources){
-                projectUserResources.add((ProjectUserResource)r);
-            }
-        }
-        return projectUserResources;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java
deleted file mode 100644
index 336a9ee..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ProjectUserResource.java
+++ /dev/null
@@ -1,123 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.*;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.util.List;
-
-public class ProjectUserResource extends AbstractResource {
-    private String projectId;
-    private String userName;
-
-    private static final Logger logger = LoggerFactory.getLogger(ProjectUserResource.class);
-
-    public String getProjectId() {
-        return projectId;
-    }
-
-    public void setProjectId(String projectId) {
-        this.projectId = projectId;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for project resource data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for project resource data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for project resource data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for project resource data resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            ProjectUser existingPrUser = em.find(ProjectUser.class, new ProjectUser_PK(projectId, userName));
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            ProjectUser prUser = new ProjectUser();
-            prUser.setProjectId(projectId);
-            prUser.setUserName(userName);
-            Users user = em.find(Users.class, userName);
-            prUser.setUser(user);
-            Project project = em.find(Project.class, projectId);
-            prUser.setProject(project);
-
-            if (existingPrUser != null) {
-                existingPrUser.setProjectId(projectId);
-                existingPrUser.setUserName(userName);
-                existingPrUser.setUser(user);
-                existingPrUser.setProject(project);
-                prUser = em.merge(existingPrUser);
-            } else {
-                em.persist(prUser);
-            }
-
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/QosParamResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/QosParamResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/QosParamResource.java
deleted file mode 100644
index 6f906cd..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/QosParamResource.java
+++ /dev/null
@@ -1,152 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment;
-import org.apache.airavata.persistance.registry.jpa.model.QosParam;
-import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.airavata.registry.cpi.RegistryException;
-
-import javax.persistence.EntityManager;
-import java.util.List;
-
-public class QosParamResource extends AbstractResource {
-    private static final Logger logger = LoggerFactory.getLogger(QosParamResource.class);
-    private int  qosId;
-    private ExperimentResource experimentResource;
-    private TaskDetailResource taskDetailResource;
-    private String startExecutionAt;
-    private String executeBefore;
-    private int noOfRetries;
-
-    public int getQosId() {
-        return qosId;
-    }
-
-    public void setQosId(int qosId) {
-        this.qosId = qosId;
-    }
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    public TaskDetailResource getTaskDetailResource() {
-        return taskDetailResource;
-    }
-
-    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
-        this.taskDetailResource = taskDetailResource;
-    }
-
-    public String getStartExecutionAt() {
-        return startExecutionAt;
-    }
-
-    public void setStartExecutionAt(String startExecutionAt) {
-        this.startExecutionAt = startExecutionAt;
-    }
-
-    public String getExecuteBefore() {
-        return executeBefore;
-    }
-
-    public void setExecuteBefore(String executeBefore) {
-        this.executeBefore = executeBefore;
-    }
-
-    public int getNoOfRetries() {
-        return noOfRetries;
-    }
-
-    public void setNoOfRetries(int noOfRetries) {
-        this.noOfRetries = noOfRetries;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for qos params resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for qos params resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for qos params resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for qos params resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            QosParam qosParam = new QosParam();
-            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
-            if (taskDetailResource != null) {
-                TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
-                qosParam.setTaskId(taskDetailResource.getTaskId());
-                qosParam.setTask(taskDetail);
-            }
-            qosParam.setExpId(experimentResource.getExpID());
-            qosParam.setExperiment(experiment);
-            qosParam.setStartExecutionAt(startExecutionAt);
-            qosParam.setExecuteBefore(executeBefore);
-            qosParam.setNoOfRetries(noOfRetries);
-            em.persist(qosParam);
-            qosId = qosParam.getQosId();
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/StatusResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/StatusResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/StatusResource.java
deleted file mode 100644
index 169e1c7..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/StatusResource.java
+++ /dev/null
@@ -1,195 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.airavata.registry.cpi.RegistryException;
-
-import javax.persistence.EntityManager;
-import java.sql.Timestamp;
-import java.util.List;
-
-public class StatusResource extends AbstractResource {
-    private static final Logger logger = LoggerFactory.getLogger(StatusResource.class);
-    private int statusId = 0;
-    private ExperimentResource experimentResource;
-    private WorkflowNodeDetailResource workflowNodeDetail;
-    private DataTransferDetailResource dataTransferDetail;
-    private TaskDetailResource taskDetailResource;
-    private String jobId;
-    private String state;
-    private Timestamp statusUpdateTime;
-    private String statusType;
-
-    public int getStatusId() {
-        return statusId;
-    }
-
-    public void setStatusId(int statusId) {
-        this.statusId = statusId;
-    }
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    public WorkflowNodeDetailResource getWorkflowNodeDetail() {
-        return workflowNodeDetail;
-    }
-
-    public void setWorkflowNodeDetail(WorkflowNodeDetailResource workflowNodeDetail) {
-        this.workflowNodeDetail = workflowNodeDetail;
-    }
-
-    public DataTransferDetailResource getDataTransferDetail() {
-        return dataTransferDetail;
-    }
-
-    public void setDataTransferDetail(DataTransferDetailResource dataTransferDetail) {
-        this.dataTransferDetail = dataTransferDetail;
-    }
-
-    public TaskDetailResource getTaskDetailResource() {
-        return taskDetailResource;
-    }
-
-    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
-        this.taskDetailResource = taskDetailResource;
-    }
-
-    public String getJobId() {
-        return jobId;
-    }
-
-    public void setJobId(String jobId) {
-        this.jobId = jobId;
-    }
-
-    public String getState() {
-        return state;
-    }
-
-    public void setState(String state) {
-        this.state = state;
-    }
-
-    public Timestamp getStatusUpdateTime() {
-        return statusUpdateTime;
-    }
-
-    public void setStatusUpdateTime(Timestamp statusUpdateTime) {
-        this.statusUpdateTime = statusUpdateTime;
-    }
-
-    public String getStatusType() {
-        return statusType;
-    }
-
-    public void setStatusType(String statusType) {
-        this.statusType = statusType;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for status resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for status resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for status resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for status resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Status status;
-            if (statusId != 0) {
-                status = em.find(Status.class, statusId);
-                status.setStatusId(statusId);
-            } else {
-                status = new Status();
-            }
-            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
-            if (taskDetailResource != null) {
-                TaskDetail taskDetail = em.find(TaskDetail.class, taskDetailResource.getTaskId());
-                status.setTask(taskDetail);
-                status.setTaskId(taskDetailResource.getTaskId());
-            }
-            if (workflowNodeDetail != null) {
-                WorkflowNodeDetail nodeDetail = em.find(WorkflowNodeDetail.class, workflowNodeDetail.getNodeInstanceId());
-                status.setNode(nodeDetail);
-                status.setNodeId(workflowNodeDetail.getNodeInstanceId());
-            }
-            if (dataTransferDetail != null) {
-                DataTransferDetail transferDetail = em.find(DataTransferDetail.class, dataTransferDetail.getTransferId());
-                status.setTransferDetail(transferDetail);
-                status.setTransferId(dataTransferDetail.getTransferId());
-            }
-            status.setExperiment(experiment);
-            status.setJobId(jobId);
-            status.setExpId(experimentResource.getExpID());
-            status.setState(state);
-            status.setStatusUpdateTime(statusUpdateTime);
-            status.setStatusType(statusType);
-            em.persist(status);
-            statusId = status.getStatusId();
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java
deleted file mode 100644
index 791c9f9..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java
+++ /dev/null
@@ -1,661 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.*;
-import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.utils.StatusType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.List;
-
-public class TaskDetailResource extends AbstractResource {
-    private static final Logger logger = LoggerFactory.getLogger(TaskDetailResource.class);
-    private String taskId;
-    private WorkflowNodeDetailResource workflowNodeDetailResource;
-    private Timestamp creationTime;
-    private String applicationId;
-    private String applicationVersion;
-    private String applicationDeploymentId;
-    private boolean enableEmailNotifications;
-
-    public boolean isEnableEmailNotifications() {
-        return enableEmailNotifications;
-    }
-
-    public void setEnableEmailNotifications(boolean enableEmailNotifications) {
-        this.enableEmailNotifications = enableEmailNotifications;
-    }
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-
-    public WorkflowNodeDetailResource getWorkflowNodeDetailResource() {
-        return workflowNodeDetailResource;
-    }
-
-    public void setWorkflowNodeDetailResource(WorkflowNodeDetailResource workflowNodeDetailResource) {
-        this.workflowNodeDetailResource = workflowNodeDetailResource;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public String getApplicationId() {
-        return applicationId;
-    }
-
-    public void setApplicationId(String applicationId) {
-        this.applicationId = applicationId;
-    }
-
-    public String getApplicationVersion() {
-        return applicationVersion;
-    }
-
-    public void setApplicationVersion(String applicationVersion) {
-        this.applicationVersion = applicationVersion;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException{
-       switch (type){
-           case ERROR_DETAIL:
-               ErrorDetailResource errorDetailResource = new ErrorDetailResource();
-               errorDetailResource.setTaskDetailResource(this);
-               return errorDetailResource;
-           case NOTIFICATION_EMAIL:
-               NotificationEmailResource emailResource = new NotificationEmailResource();
-               emailResource.setTaskDetailResource(this);
-               return emailResource;
-           case APPLICATION_INPUT:
-               ApplicationInputResource applicationInputResource = new ApplicationInputResource();
-               applicationInputResource.setTaskDetailResource(this);
-               return applicationInputResource;
-           case APPLICATION_OUTPUT:
-               ApplicationOutputResource applicationOutputResource = new ApplicationOutputResource();
-               applicationOutputResource.setTaskDetailResource(this);
-               return applicationOutputResource;
-           case JOB_DETAIL:
-               JobDetailResource jobDetailResource = new JobDetailResource();
-               jobDetailResource.setTaskDetailResource(this);
-               return jobDetailResource;
-           case DATA_TRANSFER_DETAIL:
-               DataTransferDetailResource dataTransferDetailResource = new DataTransferDetailResource();
-               dataTransferDetailResource.setTaskDetailResource(this);
-               return dataTransferDetailResource;
-           case STATUS:
-               StatusResource statusResource = new StatusResource();
-               statusResource.setTaskDetailResource(this);
-               return statusResource;
-           case COMPUTATIONAL_RESOURCE_SCHEDULING:
-               ComputationSchedulingResource schedulingResource = new ComputationSchedulingResource();
-               schedulingResource.setTaskDetailResource(this);
-               return schedulingResource;
-           case ADVANCE_INPUT_DATA_HANDLING:
-               AdvanceInputDataHandlingResource inputDataHandlingResource = new AdvanceInputDataHandlingResource();
-               inputDataHandlingResource.setTaskDetailResource(this);
-               return inputDataHandlingResource;
-           case ADVANCE_OUTPUT_DATA_HANDLING:
-               AdvancedOutputDataHandlingResource outputDataHandlingResource = new AdvancedOutputDataHandlingResource();
-               outputDataHandlingResource.setTaskDetailResource(this);
-               return outputDataHandlingResource;
-           case QOS_PARAM:
-               QosParamResource qosParamResource = new QosParamResource();
-               qosParamResource.setTaskDetailResource(this);
-               return qosParamResource;
-           default:
-               logger.error("Unsupported resource type for task detail resource.", new IllegalArgumentException());
-               throw new IllegalArgumentException("Unsupported resource type for task detail resource.");
-       }
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-            QueryGenerator generator;
-            switch (type) {
-                case ERROR_DETAIL:
-                    generator = new QueryGenerator(ERROR_DETAIL);
-                    generator.setParameter(ErrorDetailConstants.TASK_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case NOTIFICATION_EMAIL:
-                    generator = new QueryGenerator(NOTIFICATION_EMAIL);
-                    generator.setParameter(NotificationEmailConstants.TASK_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case APPLICATION_INPUT:
-                    generator = new QueryGenerator(APPLICATION_INPUT);
-                    generator.setParameter(ApplicationInputConstants.TASK_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case APPLICATION_OUTPUT:
-                    generator = new QueryGenerator(APPLICATION_OUTPUT);
-                    generator.setParameter(ApplicationOutputConstants.TASK_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case JOB_DETAIL:
-                    generator = new QueryGenerator(JOB_DETAIL);
-                    generator.setParameter(JobDetailConstants.TASK_ID, taskId);
-                    generator.setParameter(JobDetailConstants.JOB_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case DATA_TRANSFER_DETAIL:
-                    generator = new QueryGenerator(DATA_TRANSFER_DETAIL);
-                    generator.setParameter(DataTransferDetailConstants.TRANSFER_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.TASK_ID, name);
-                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.TASK.toString());
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case COMPUTATIONAL_RESOURCE_SCHEDULING:
-                    generator = new QueryGenerator(COMPUTATIONAL_RESOURCE_SCHEDULING);
-                    generator.setParameter(ComputationalResourceSchedulingConstants.TASK_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case ADVANCE_INPUT_DATA_HANDLING:
-                    generator = new QueryGenerator(ADVANCE_INPUT_DATA_HANDLING);
-                    generator.setParameter(AdvancedInputDataHandlingConstants.TASK_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case ADVANCE_OUTPUT_DATA_HANDLING:
-                    generator = new QueryGenerator(ADVANCE_OUTPUT_DATA_HANDLING);
-                    generator.setParameter(AdvancedOutputDataHandlingConstants.TASK_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                case QOS_PARAM:
-                    generator = new QueryGenerator(QOS_PARAMS);
-                    generator.setParameter(QosParamsConstants.TASK_ID, name);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                default:
-                    logger.error("Unsupported resource type for task detail resource.", new IllegalArgumentException());
-                    break;
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            QueryGenerator generator;
-            Query q;
-            switch (type) {
-                case ERROR_DETAIL:
-                    generator = new QueryGenerator(ERROR_DETAIL);
-                    generator.setParameter(ErrorDetailConstants.TASK_ID, name);
-                    q = generator.selectQuery(em);
-                    ErrorDetail errorDetail = (ErrorDetail) q.getSingleResult();
-                    ErrorDetailResource errorDetailResource = (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
-                    em.getTransaction().commit();
-                    em.close();
-                    return errorDetailResource;
-                case NOTIFICATION_EMAIL:
-                    generator = new QueryGenerator(NOTIFICATION_EMAIL);
-                    generator.setParameter(NotificationEmailConstants.TASK_ID, name);
-                    q = generator.selectQuery(em);
-                    Notification_Email notificationEmail = (Notification_Email) q.getSingleResult();
-                    NotificationEmailResource emailResource = (NotificationEmailResource) Utils.getResource(ResourceType.NOTIFICATION_EMAIL, notificationEmail);
-                    em.getTransaction().commit();
-                    em.close();
-                    return emailResource;
-                case APPLICATION_INPUT:
-                    generator = new QueryGenerator(APPLICATION_INPUT);
-                    generator.setParameter(ApplicationInputConstants.TASK_ID, name);
-                    q = generator.selectQuery(em);
-                    ApplicationInput applicationInput = (ApplicationInput) q.getSingleResult();
-                    ApplicationInputResource inputResource = (ApplicationInputResource) Utils.getResource(ResourceType.APPLICATION_INPUT, applicationInput);
-                    em.getTransaction().commit();
-                    em.close();
-                    return inputResource;
-                case APPLICATION_OUTPUT:
-                    generator = new QueryGenerator(APPLICATION_OUTPUT);
-                    generator.setParameter(ApplicationOutputConstants.TASK_ID, name);
-                    q = generator.selectQuery(em);
-                    ApplicationOutput applicationOutput = (ApplicationOutput) q.getSingleResult();
-                    ApplicationOutputResource outputResource = (ApplicationOutputResource) Utils.getResource(ResourceType.APPLICATION_OUTPUT, applicationOutput);
-                    em.getTransaction().commit();
-                    em.close();
-                    return outputResource;
-                case JOB_DETAIL:
-                    generator = new QueryGenerator(JOB_DETAIL);
-                    generator.setParameter(JobDetailConstants.JOB_ID, name);
-                    generator.setParameter(JobDetailConstants.TASK_ID, taskId);
-                    q = generator.selectQuery(em);
-                    JobDetail jobDetail = (JobDetail) q.getSingleResult();
-                    JobDetailResource jobDetailResource = (JobDetailResource) Utils.getResource(ResourceType.JOB_DETAIL, jobDetail);
-                    em.getTransaction().commit();
-                    em.close();
-                    return jobDetailResource;
-                case DATA_TRANSFER_DETAIL:
-                    generator = new QueryGenerator(DATA_TRANSFER_DETAIL);
-                    generator.setParameter(DataTransferDetailConstants.TRANSFER_ID, name);
-                    q = generator.selectQuery(em);
-                    DataTransferDetail transferDetail = (DataTransferDetail) q.getSingleResult();
-                    DataTransferDetailResource transferDetailResource = (DataTransferDetailResource) Utils.getResource(ResourceType.DATA_TRANSFER_DETAIL, transferDetail);
-                    em.getTransaction().commit();
-                    em.close();
-                    return transferDetailResource;
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.TASK_ID, name);
-                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.TASK.toString());
-                    q = generator.selectQuery(em);
-                    Status status = (Status) q.getSingleResult();
-                    StatusResource statusResource = (StatusResource) Utils.getResource(ResourceType.STATUS, status);
-                    em.getTransaction().commit();
-                    em.close();
-                    return statusResource;
-                case COMPUTATIONAL_RESOURCE_SCHEDULING:
-                    generator = new QueryGenerator(COMPUTATIONAL_RESOURCE_SCHEDULING);
-                    generator.setParameter(ComputationalResourceSchedulingConstants.TASK_ID, name);
-                    q = generator.selectQuery(em);
-                    Computational_Resource_Scheduling resourceScheduling = (Computational_Resource_Scheduling) q.getSingleResult();
-                    ComputationSchedulingResource schedulingResource = (ComputationSchedulingResource) Utils.getResource(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING, resourceScheduling);
-                    em.getTransaction().commit();
-                    em.close();
-                    return schedulingResource;
-                case ADVANCE_INPUT_DATA_HANDLING:
-                    generator = new QueryGenerator(ADVANCE_INPUT_DATA_HANDLING);
-                    generator.setParameter(AdvancedInputDataHandlingConstants.TASK_ID, name);
-                    q = generator.selectQuery(em);
-                    AdvancedInputDataHandling dataHandling = (AdvancedInputDataHandling) q.getSingleResult();
-                    AdvanceInputDataHandlingResource inputDataHandlingResource = (AdvanceInputDataHandlingResource) Utils.getResource(ResourceType.ADVANCE_INPUT_DATA_HANDLING, dataHandling);
-                    em.getTransaction().commit();
-                    em.close();
-                    return inputDataHandlingResource;
-                case ADVANCE_OUTPUT_DATA_HANDLING:
-                    generator = new QueryGenerator(ADVANCE_OUTPUT_DATA_HANDLING);
-                    generator.setParameter(AdvancedOutputDataHandlingConstants.TASK_ID, name);
-                    q = generator.selectQuery(em);
-                    AdvancedOutputDataHandling outputDataHandling = (AdvancedOutputDataHandling) q.getSingleResult();
-                    AdvancedOutputDataHandlingResource outputDataHandlingResource = (AdvancedOutputDataHandlingResource) Utils.getResource(ResourceType.ADVANCE_OUTPUT_DATA_HANDLING, outputDataHandling);
-                    em.getTransaction().commit();
-                    em.close();
-                    return outputDataHandlingResource;
-                case QOS_PARAM:
-                    generator = new QueryGenerator(QOS_PARAMS);
-                    generator.setParameter(QosParamsConstants.TASK_ID, name);
-                    q = generator.selectQuery(em);
-                    QosParam qosParam = (QosParam) q.getSingleResult();
-                    QosParamResource qosParamResource = (QosParamResource) Utils.getResource(ResourceType.QOS_PARAM, qosParam);
-                    em.getTransaction().commit();
-                    em.close();
-                    return qosParamResource;
-                default:
-                    em.getTransaction().commit();
-                    em.close();
-                    logger.error("Unsupported resource type for workflow node resource.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Unsupported resource type for workflow node resource.");
-            }
-        } catch (Exception e) {
-//            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        List<Resource> resourceList = new ArrayList<Resource>();
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-            QueryGenerator generator;
-            List results;
-            switch (type) {
-                case ERROR_DETAIL:
-                    generator = new QueryGenerator(ERROR_DETAIL);
-                    generator.setParameter(ErrorDetailConstants.TASK_ID, taskId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            ErrorDetail errorDetail = (ErrorDetail) result;
-                            ErrorDetailResource errorDetailResource =
-                                    (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
-                            resourceList.add(errorDetailResource);
-                        }
-                    }
-                    break;
-                case NOTIFICATION_EMAIL:
-                    generator = new QueryGenerator(NOTIFICATION_EMAIL);
-                    generator.setParameter(NotificationEmailConstants.TASK_ID, taskId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Notification_Email notificationEmail = (Notification_Email) result;
-                            NotificationEmailResource emailResource =
-                                    (NotificationEmailResource) Utils.getResource(ResourceType.NOTIFICATION_EMAIL, notificationEmail);
-                            resourceList.add(emailResource);
-                        }
-                    }
-                    break;
-                case APPLICATION_INPUT:
-                    generator = new QueryGenerator(APPLICATION_INPUT);
-                    generator.setParameter(ApplicationInputConstants.TASK_ID, taskId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            ApplicationInput applicationInput = (ApplicationInput) result;
-                            ApplicationInputResource inputResource =
-                                    (ApplicationInputResource) Utils.getResource(ResourceType.APPLICATION_INPUT, applicationInput);
-                            resourceList.add(inputResource);
-                        }
-                    }
-                    break;
-                case APPLICATION_OUTPUT:
-                    generator = new QueryGenerator(APPLICATION_OUTPUT);
-                    generator.setParameter(ApplicationOutputConstants.TASK_ID, taskId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            ApplicationOutput applicationOutput = (ApplicationOutput) result;
-                            ApplicationOutputResource outputResource =
-                                    (ApplicationOutputResource) Utils.getResource(ResourceType.APPLICATION_OUTPUT, applicationOutput);
-                            resourceList.add(outputResource);
-                        }
-                    }
-                    break;
-                case JOB_DETAIL:
-                    generator = new QueryGenerator(JOB_DETAIL);
-                    generator.setParameter(JobDetailConstants.TASK_ID, taskId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            JobDetail jobDetail = (JobDetail) result;
-                            JobDetailResource jobDetailResource =
-                                    (JobDetailResource) Utils.getResource(ResourceType.JOB_DETAIL, jobDetail);
-                            resourceList.add(jobDetailResource);
-                        }
-                    }
-                    break;
-                case DATA_TRANSFER_DETAIL:
-                    generator = new QueryGenerator(DATA_TRANSFER_DETAIL);
-                    generator.setParameter(DataTransferDetailConstants.TASK_ID, taskId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            DataTransferDetail transferDetail = (DataTransferDetail) result;
-                            DataTransferDetailResource transferDetailResource =
-                                    (DataTransferDetailResource) Utils.getResource(ResourceType.DATA_TRANSFER_DETAIL, transferDetail);
-                            resourceList.add(transferDetailResource);
-                        }
-                    }
-                    break;
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.TASK_ID, taskId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Status status = (Status) result;
-                            StatusResource statusResource =
-                                    (StatusResource) Utils.getResource(ResourceType.STATUS, status);
-                            resourceList.add(statusResource);
-                        }
-                    }
-                    break;
-                default:
-                    em.getTransaction().commit();
-                    em.close();
-                    logger.error("Unsupported resource type for workflow node details resource.", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return resourceList;
-    }
-
-    
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            TaskDetail taskDetail = em.find(TaskDetail.class, taskId);
-            em.close();
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            WorkflowNodeDetail workflowNodeDetail = em.find(WorkflowNodeDetail.class, workflowNodeDetailResource.getNodeInstanceId());
-            if (taskDetail != null) {
-            	updateTaskDetail(taskDetail, workflowNodeDetail);
-                em.merge(taskDetail);
-            } else {
-                taskDetail = new TaskDetail();
-                updateTaskDetail(taskDetail, workflowNodeDetail);                
-                em.persist(taskDetail);
-            }
-            em.getTransaction().commit();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-	private void updateTaskDetail(TaskDetail taskDetail,
-			WorkflowNodeDetail workflowNodeDetail) {
-		taskDetail.setTaskId(taskId);
-		taskDetail.setNodeDetail(workflowNodeDetail);
-		taskDetail.setNodeId(workflowNodeDetailResource.getNodeInstanceId());
-		taskDetail.setCreationTime(creationTime);
-		taskDetail.setAppId(applicationId);
-		taskDetail.setAppVersion(applicationVersion);
-        taskDetail.setAllowNotification(enableEmailNotifications);
-		taskDetail.setApplicationDeploymentId(getApplicationDeploymentId());
-	}
-
-    public List<ApplicationInputResource> getApplicationInputs() throws RegistryException{
-        List<ApplicationInputResource> applicationInputResources = new ArrayList<ApplicationInputResource>();
-        List<Resource> resources = get(ResourceType.APPLICATION_INPUT);
-        for (Resource resource : resources) {
-            ApplicationInputResource inputResource = (ApplicationInputResource) resource;
-            applicationInputResources.add(inputResource);
-        }
-        return applicationInputResources;
-    }
-
-    public List<ApplicationOutputResource> getApplicationOutputs() throws RegistryException{
-        List<ApplicationOutputResource> outputResources = new ArrayList<ApplicationOutputResource>();
-        List<Resource> resources = get(ResourceType.APPLICATION_OUTPUT);
-        for (Resource resource : resources) {
-            ApplicationOutputResource outputResource = (ApplicationOutputResource) resource;
-            outputResources.add(outputResource);
-        }
-        return outputResources;
-    }
-
-    public StatusResource getTaskStatus() throws RegistryException{
-        List<Resource> resources = get(ResourceType.STATUS);
-        for (Resource resource : resources) {
-            StatusResource taskStatus = (StatusResource) resource;
-            if(taskStatus.getStatusType().equals(StatusType.TASK.toString())){
-                if (taskStatus.getState() == null || taskStatus.getState().equals("") ){
-                    taskStatus.setState("UNKNOWN");
-                }
-                return taskStatus;
-            }
-        }
-        return null;
-    }
-
-    public List<JobDetailResource> getJobDetailList() throws RegistryException{
-        List<JobDetailResource> jobDetailResources = new ArrayList<JobDetailResource>();
-        List<Resource> resources = get(ResourceType.JOB_DETAIL);
-        for (Resource resource : resources) {
-            JobDetailResource jobDetailResource = (JobDetailResource) resource;
-            jobDetailResources.add(jobDetailResource);
-        }
-        return jobDetailResources;
-    }
-
-    public List<DataTransferDetailResource> getDataTransferDetailList() throws RegistryException{
-        List<DataTransferDetailResource> transferDetails = new ArrayList<DataTransferDetailResource>();
-        List<Resource> resources = get(ResourceType.DATA_TRANSFER_DETAIL);
-        for (Resource resource : resources) {
-            DataTransferDetailResource transferDetailResource = (DataTransferDetailResource) resource;
-            transferDetails.add(transferDetailResource);
-        }
-        return transferDetails;
-    }
-
-    public List<ErrorDetailResource> getErrorDetailList() throws RegistryException{
-        List<ErrorDetailResource> errorDetailResources = new ArrayList<ErrorDetailResource>();
-        List<Resource> resources = get(ResourceType.ERROR_DETAIL);
-        for (Resource resource : resources) {
-            ErrorDetailResource errorDetailResource = (ErrorDetailResource) resource;
-            errorDetailResources.add(errorDetailResource);
-        }
-        return errorDetailResources;
-    }
-
-    public ComputationSchedulingResource getComputationScheduling (String taskId) throws RegistryException{
-        return  (ComputationSchedulingResource)get(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING, taskId);
-    }
-
-    public AdvanceInputDataHandlingResource getInputDataHandling (String taskId) throws RegistryException{
-        return  (AdvanceInputDataHandlingResource)get(ResourceType.ADVANCE_INPUT_DATA_HANDLING, taskId);
-    }
-
-    public AdvancedOutputDataHandlingResource getOutputDataHandling (String taskId) throws RegistryException{
-        return  (AdvancedOutputDataHandlingResource)get(ResourceType.ADVANCE_OUTPUT_DATA_HANDLING, taskId);
-    }
-
-    public JobDetailResource createJobDetail (String jobId) throws RegistryException{
-        JobDetailResource resource = (JobDetailResource)create(ResourceType.JOB_DETAIL);
-        resource.setJobId(jobId);
-        return resource;
-    }
-
-    public JobDetailResource getJobDetail (String jobId) throws RegistryException{
-        return (JobDetailResource)get(ResourceType.JOB_DETAIL, jobId);
-    }
-
-    public DataTransferDetailResource getDataTransferDetail (String dataTransferId) throws RegistryException{
-        return (DataTransferDetailResource)get(ResourceType.DATA_TRANSFER_DETAIL, dataTransferId);
-    }
-
-    public  boolean isTaskStatusExist (String taskId) throws RegistryException{
-        return isExists(ResourceType.STATUS, taskId);
-    }
-
-	public String getApplicationDeploymentId() {
-		return applicationDeploymentId;
-	}
-
-	public void setApplicationDeploymentId(String applicationDeploymentId) {
-		this.applicationDeploymentId = applicationDeploymentId;
-	}
-
-    public List<NotificationEmailResource> getNotificationEmails () throws RegistryException{
-        List<NotificationEmailResource> emailResources = new ArrayList<NotificationEmailResource>();
-        List<Resource> resources = get(ResourceType.NOTIFICATION_EMAIL);
-        for (Resource resource : resources) {
-            emailResources.add((NotificationEmailResource) resource);
-        }
-        return emailResources;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserResource.java
deleted file mode 100644
index 11f2a4f..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/UserResource.java
+++ /dev/null
@@ -1,186 +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.persistance.registry.jpa.resources;
-
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.SecurityUtil;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.Users;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.security.NoSuchAlgorithmException;
-import java.util.List;
-
-public class UserResource extends AbstractResource {
-    private final static Logger logger = LoggerFactory.getLogger(UserResource.class);
-    private String userName;
-    private String password;
-    /**
-     *
-     */
-    public UserResource() {
-    }
-
-    /**
-     *
-     * @param userName user name
-     */
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    /**
-     *
-     * @return user name
-     */
-    public String getUserName() {
-        return userName;
-    }
-
-
-    /**
-     * User is a hypothical data structure.
-     * @param type child resource type
-     * @return child resource
-     */
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for user resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     *
-     * @param type child resource type
-     * @param name child resource name
-     */
-    public void remove(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for user resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     *
-     * @param type child resource type
-     * @param name child resource name
-     * @return UnsupportedOperationException
-     */
-    public Resource get(ResourceType type, Object name) throws RegistryException {
-        logger.error("Unsupported resource type for user resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     *
-     * @param type child resource type
-     * @return UnsupportedOperationException
-     */
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for user resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * saveExperiment user to the database
-     */
-    public void save() throws RegistryException {
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            Users existingUser = em.find(Users.class, userName);
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Users user = new Users();
-            user.setUser_name(userName);
-            if (password != null && !password.equals("")) {
-                try {
-                    user.setPassword(SecurityUtil.digestString(password,
-                            ServerSettings.getSetting("default.registry.password.hash.method")));
-                } catch (NoSuchAlgorithmException e) {
-                    throw new RuntimeException("Error hashing default admin password. Invalid hash algorithm.", e);
-                } catch (ApplicationSettingsException e) {
-                    throw new RuntimeException("Error reading hash algorithm from configurations", e);
-                }
-            }
-            if (existingUser != null) {
-                if (password != null && !password.equals("")) {
-                    try {
-                        existingUser.setPassword(SecurityUtil.digestString(password,
-                                ServerSettings.getSetting("default.registry.password.hash.method")));
-                    } catch (NoSuchAlgorithmException e) {
-                        throw new RuntimeException("Error hashing default admin password. Invalid hash algorithm.", e);
-                    } catch (ApplicationSettingsException e) {
-                        throw new RuntimeException("Error reading hash algorithm from configurations", e);
-                    }
-                }
-                user = em.merge(existingUser);
-            } else {
-                em.persist(user);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     *
-     * @param type child resource type
-     * @param name child resource name
-     * @return UnsupportedOperationException
-     */
-    public boolean isExists(ResourceType type, Object name) throws RegistryException{
-        logger.error("Unsupported resource type for user resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     *
-     * @return  password
-     */
-    public String getPassword() {
-        return password;
-    }
-
-    /**
-     *
-     * @param password  password
-     */
-    public void setPassword(String password) {
-        this.password = password;
-    }
-}


[38/44] airavata git commit: Mongo Registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/QosParam.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/QosParam.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/QosParam.java
deleted file mode 100644
index a0dbfa0..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/QosParam.java
+++ /dev/null
@@ -1,119 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@DataCache
-@Entity
-@Table(name = "QOS_PARAMS")
-public class QosParam implements Serializable {
-    @Id
-    @GeneratedValue
-    @Column(name = "QOS_ID")
-    private int qosId;
-    @Column(name = "EXPERIMENT_ID")
-    private String expId;
-    @Column(name = "TASK_ID")
-    private String taskId;
-    @Column(name = "START_EXECUTION_AT")
-    private String startExecutionAt;
-    @Column(name = "EXECUTE_BEFORE")
-    private String executeBefore;
-    @Column(name = "NO_OF_RETRIES")
-    private int noOfRetries;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "EXPERIMENT_ID")
-    private Experiment experiment;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "TASK_ID")
-    private TaskDetail task;
-
-    public int getQosId() {
-        return qosId;
-    }
-
-    public void setQosId(int qosId) {
-        this.qosId = qosId;
-    }
-
-    public String getExpId() {
-        return expId;
-    }
-
-    public void setExpId(String expId) {
-        this.expId = expId;
-    }
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-
-    public String getStartExecutionAt() {
-        return startExecutionAt;
-    }
-
-    public void setStartExecutionAt(String startExecutionAt) {
-        this.startExecutionAt = startExecutionAt;
-    }
-
-    public String getExecuteBefore() {
-        return executeBefore;
-    }
-
-    public void setExecuteBefore(String executeBefore) {
-        this.executeBefore = executeBefore;
-    }
-
-    public int getNoOfRetries() {
-        return noOfRetries;
-    }
-
-    public void setNoOfRetries(int noOfRetries) {
-        this.noOfRetries = noOfRetries;
-    }
-
-    public Experiment getExperiment() {
-        return experiment;
-    }
-
-    public void setExperiment(Experiment experiment) {
-        this.experiment = experiment;
-    }
-
-    public TaskDetail getTask() {
-        return task;
-    }
-
-    public void setTask(TaskDetail task) {
-        this.task = task;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Status.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Status.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Status.java
deleted file mode 100644
index 4783af5..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Status.java
+++ /dev/null
@@ -1,174 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.sql.Timestamp;
-
-@DataCache
-@Entity
-@Table(name = "STATUS")
-public class Status implements Serializable {
-    @Id
-    @GeneratedValue
-    @Column(name = "STATUS_ID")
-    private int statusId;
-    @Column(name = "EXPERIMENT_ID")
-    private String expId;
-    @Column(name = "NODE_INSTANCE_ID")
-    private String nodeId;
-    @Column(name = "TRANSFER_ID")
-    private String transferId;
-    @Column(name = "TASK_ID")
-    private String taskId;
-    @Column(name = "JOB_ID")
-    private String jobId;
-    @Column(name = "STATE")
-    private String state;
-    @Column(name = "STATUS_UPDATE_TIME")
-    private Timestamp statusUpdateTime;
-    @Column(name = "STATUS_TYPE")
-    private String statusType;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "EXPERIMENT_ID")
-    private Experiment experiment;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "TASK_ID")
-    private TaskDetail task;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "NODE_INSTANCE_ID")
-    private WorkflowNodeDetail node;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "TRANSFER_ID")
-    private DataTransferDetail transferDetail;
-
-    public int getStatusId() {
-        return statusId;
-    }
-
-    public void setStatusId(int statusId) {
-        this.statusId = statusId;
-    }
-
-    public String getExpId() {
-        return expId;
-    }
-
-    public void setExpId(String expId) {
-        this.expId = expId;
-    }
-
-    public String getNodeId() {
-        return nodeId;
-    }
-
-    public void setNodeId(String nodeId) {
-        this.nodeId = nodeId;
-    }
-
-    public String getTransferId() {
-        return transferId;
-    }
-
-    public void setTransferId(String transferId) {
-        this.transferId = transferId;
-    }
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-
-    public String getJobId() {
-        return jobId;
-    }
-
-    public void setJobId(String jobId) {
-        this.jobId = jobId;
-    }
-
-    public String getState() {
-        return state;
-    }
-
-    public void setState(String state) {
-        this.state = state;
-    }
-
-    public Timestamp getStatusUpdateTime() {
-        return statusUpdateTime;
-    }
-
-    public void setStatusUpdateTime(Timestamp statusUpdateTime) {
-        this.statusUpdateTime = statusUpdateTime;
-    }
-
-    public String getStatusType() {
-        return statusType;
-    }
-
-    public void setStatusType(String statusType) {
-        this.statusType = statusType;
-    }
-
-    public Experiment getExperiment() {
-        return experiment;
-    }
-
-    public void setExperiment(Experiment experiment) {
-        this.experiment = experiment;
-    }
-
-    public TaskDetail getTask() {
-        return task;
-    }
-
-    public void setTask(TaskDetail task) {
-        this.task = task;
-    }
-
-    public WorkflowNodeDetail getNode() {
-        return node;
-    }
-
-    public void setNode(WorkflowNodeDetail node) {
-        this.node = node;
-    }
-
-    public DataTransferDetail getTransferDetail() {
-        return transferDetail;
-    }
-
-    public void setTransferDetail(DataTransferDetail transferDetail) {
-        this.transferDetail = transferDetail;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java
deleted file mode 100644
index ebd7758..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java
+++ /dev/null
@@ -1,119 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-
-import java.io.Serializable;
-import java.sql.Timestamp;
-
-@DataCache
-@Entity
-@Table(name = "TASK_DETAIL")
-public class TaskDetail implements Serializable {
-    @Id
-    @Column(name = "TASK_ID")
-    private String taskId;
-    @Column(name = "NODE_INSTANCE_ID")
-    private String nodeId;
-    @Column(name = "CREATION_TIME")
-    private Timestamp creationTime;
-    @Column(name = "APPLICATION_ID")
-    private String appId;
-    @Column(name = "APPLICATION_VERSION")
-    private String appVersion;
-    @Column(name = "ALLOW_NOTIFICATION")
-    private boolean allowNotification;
-
-    @Column(name = "APPLICATION_DEPLOYMENT_ID")
-    private String applicationDeploymentId;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "NODE_INSTANCE_ID")
-    private WorkflowNodeDetail nodeDetail;
-
-    public String getTaskId() {
-        return taskId;
-    }
-
-    public void setTaskId(String taskId) {
-        this.taskId = taskId;
-    }
-
-    public String getNodeId() {
-        return nodeId;
-    }
-
-    public void setNodeId(String nodeId) {
-        this.nodeId = nodeId;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-
-    public void setAppId(String appId) {
-        this.appId = appId;
-    }
-
-    public String getAppVersion() {
-        return appVersion;
-    }
-
-    public void setAppVersion(String appVersion) {
-        this.appVersion = appVersion;
-    }
-
-    public WorkflowNodeDetail getNodeDetail() {
-        return nodeDetail;
-    }
-
-    public void setNodeDetail(WorkflowNodeDetail nodeDetail) {
-        this.nodeDetail = nodeDetail;
-    }
-
-	public String getApplicationDeploymentId() {
-		return applicationDeploymentId;
-	}
-
-	public void setApplicationDeploymentId(String applicationDeploymentId) {
-		this.applicationDeploymentId = applicationDeploymentId;
-	}
-
-    public boolean isAllowNotification() {
-        return allowNotification;
-    }
-
-    public void setAllowNotification(boolean allowNotification) {
-        this.allowNotification = allowNotification;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Users.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Users.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Users.java
deleted file mode 100644
index 9005985..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Users.java
+++ /dev/null
@@ -1,55 +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.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-
-@DataCache
-@Entity
-@Table(name ="USERS")
-public class Users implements Serializable {
-
-    @Id
-    @Column(name = "USER_NAME")
-    private String user_name;
-    @Column(name = "PASSWORD")
-    private String password;
-
-
-    public String getUser_name() {
-        return user_name;
-    }
-
-    public void setUser_name(String user_name) {
-        this.user_name = user_name;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/WorkflowNodeDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/WorkflowNodeDetail.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/WorkflowNodeDetail.java
deleted file mode 100644
index b4ae29e..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/WorkflowNodeDetail.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.persistance.registry.jpa.model;
-
-import org.apache.openjpa.persistence.DataCache;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.sql.Timestamp;
-
-@DataCache
-@Entity
-@Table(name = "WORKFLOW_NODE_DETAIL")
-public class WorkflowNodeDetail implements Serializable {
-    @Column(name = "EXPERIMENT_ID")
-    private String expId;
-    @Id
-    @Column(name = "NODE_INSTANCE_ID")
-    private String nodeId;
-    @Column(name = "EXECUTION_UNIT")
-    private String executionUnit;
-    @Column(name = "EXECUTION_UNIT_DATA")
-    private String executionUnitData;
-    @Column(name = "CREATION_TIME")
-    private Timestamp creationTime;
-    @Column(name = "NODE_NAME")
-    private String nodeName;
-
-    @ManyToOne(cascade= CascadeType.MERGE)
-    @JoinColumn(name = "EXPERIMENT_ID")
-    private Experiment experiment;
-
-    public String getExpId() {
-        return expId;
-    }
-
-    public void setExpId(String expId) {
-        this.expId = expId;
-    }
-
-    public String getNodeId() {
-        return nodeId;
-    }
-
-    public void setNodeId(String nodeId) {
-        this.nodeId = nodeId;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public String getNodeName() {
-        return nodeName;
-    }
-
-    public void setNodeName(String nodeName) {
-        this.nodeName = nodeName;
-    }
-
-    public Experiment getExperiment() {
-        return experiment;
-    }
-
-    public void setExperiment(Experiment experiment) {
-        this.experiment = experiment;
-    }
-
-	public String getExecutionUnitData() {
-		return executionUnitData;
-	}
-
-	public void setExecutionUnitData(String executionUnitData) {
-		this.executionUnitData = executionUnitData;
-	}
-
-	public String getExecutionUnit() {
-		return executionUnit;
-	}
-
-	public void setExecutionUnit(String executionUnit) {
-		this.executionUnit = executionUnit;
-	}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/ExperimentRegistry.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/ExperimentRegistry.java
deleted file mode 100644
index 515218d..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/ExperimentRegistry.java
+++ /dev/null
@@ -1,28 +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.persistance.registry.jpa.mongo;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ExperimentRegistry {
-    private final static Logger logger = LoggerFactory.getLogger(ExperimentRegistry.class);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/Test.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/Test.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/Test.java
deleted file mode 100644
index 4e04940..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/Test.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo;
-
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
-import org.apache.airavata.persistance.registry.jpa.mongo.dao.ExperimentDao;
-import org.apache.airavata.persistance.registry.jpa.mongo.utils.MongoUtil;
-import org.apache.airavata.registry.cpi.Registry;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.RegistryModelType;
-import org.junit.Assert;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
-
-public class Test {
-    private final static Logger logger = LoggerFactory.getLogger(Test.class);
-
-    public static void main(String[] args) throws RegistryException, IOException {
-        Registry registry = RegistryFactory.getDefaultRegistry();
-//        String experiemtnId = "SLM-Espresso-Stampede_45667ea8-aae3-4a8e-807d-a16312035c35";
-//        long time1 = System.currentTimeMillis();
-//        Experiment experiement = (Experiment) registry.getExperiment(RegistryModelType.EXPERIMENT, experiemtnId);
-//        long time2 = System.currentTimeMillis();
-//        System.out.println(time2-time1);
-//
-//        ExperimentDao experimentDao = new ExperimentDao();
-//        experimentDao.createExperiment(experiement);
-//        time1 = System.currentTimeMillis();
-//        Experiment persistedExperiment = experimentDao.getExperiment(experiement.getExperimentId());
-//        time2 = System.currentTimeMillis();
-//        System.out.println(time2-time1);
-//
-//        Assert.assertEquals(experiement, persistedExperiment);
-
-        MongoUtil.dropAiravataRegistry();
-
-        ExperimentDao experimentDao = new ExperimentDao();
-        BufferedReader reader = new BufferedReader(new FileReader("/home/supun/Downloads/EXPERIMENT.csv"));
-        String temp = reader.readLine();
-        int i = 1;
-        while(temp != null && !temp.isEmpty()){
-            try{
-                Experiment experiement = (Experiment) registry.get(RegistryModelType.EXPERIMENT, temp.trim());
-                experimentDao.createExperiment(experiement);
-                Experiment persistedExperiment = experimentDao.getExperiment(experiement.getExperimentId());
-                Assert.assertEquals(experiement, persistedExperiment);
-                System.out.println(i+" :"+experiement.getExperimentId());
-                i++;
-            }catch (Exception e){
-                System.out.println(temp);
-                e.printStackTrace();
-            }
-            temp = reader.readLine();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftDeserializer.java
deleted file mode 100644
index ba597ee..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftDeserializer.java
+++ /dev/null
@@ -1,152 +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.persistance.registry.jpa.mongo.conversion;
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.*;
-import com.fasterxml.jackson.databind.node.JsonNodeType;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.fasterxml.jackson.databind.type.TypeFactory;
-import com.google.common.base.CaseFormat;
-import org.apache.thrift.TBase;
-import org.apache.thrift.TException;
-import org.apache.thrift.TFieldIdEnum;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.lang.reflect.ParameterizedType;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * This abstract class represents a generic de-serializer for converting JSON to Thrift-based entities.
- *
- * @param <E> An implementation of the {@link org.apache.thrift.TFieldIdEnum} interface.
- * @param <T> An implementation of the {@link org.apache.thrift.TBase} interface.
- */
-public abstract class AbstractThriftDeserializer<E extends TFieldIdEnum, T extends TBase<T, E>> extends JsonDeserializer<T> {
-
-    private static Logger log = LoggerFactory.getLogger(AbstractThriftDeserializer.class);
-
-    @Override
-    public T deserialize(final JsonParser jp, final DeserializationContext ctxt) throws IOException, JsonProcessingException {
-        final T instance = newInstance();
-        final ObjectMapper mapper = (ObjectMapper)jp.getCodec();
-        final ObjectNode rootNode = (ObjectNode)mapper.readTree(jp);
-        final Iterator<Map.Entry<String, JsonNode>> iterator = rootNode.fields();
-
-        while(iterator.hasNext()) {
-            final Map.Entry<String, JsonNode> currentField = iterator.next();
-            try {
-                /*
-                 * If the current node is not a null value, process it.  Otherwise,
-                 * skip it.  Jackson will treat the null as a 0 for primitive
-                 * number types, which in turn will make Thrift think the field
-                 * has been set. Also we ignore the MongoDB specific _id field
-                 */
-                if(!currentField.getKey().equalsIgnoreCase("_id")
-                        && currentField.getValue().getNodeType() != JsonNodeType.NULL) {
-                    final E field = getField(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_UNDERSCORE, currentField.getKey()));
-                    final JsonParser parser = currentField.getValue().traverse();
-                    parser.setCodec(mapper);
-                    final Object value = mapper.readValue(parser, generateValueType(instance, field));
-                    if(value != null) {
-                        log.debug(String.format("Field %s produced value %s of type %s.",
-                                currentField.getKey(), value, value.getClass().getName()));
-                        instance.setFieldValue(field, value);
-                    } else {
-                        log.debug("Field {} contains a null value.  Skipping...", currentField.getKey());
-                    }
-                } else {
-                    log.debug("Field {} contains a null value.  Skipping...", currentField.getKey());
-                }
-            } catch (final NoSuchFieldException | IllegalArgumentException e) {
-                log.error("Unable to de-serialize field '{}'.", currentField.getKey(), e);
-                ctxt.mappingException(e.getMessage());
-            }
-        }
-
-        try {
-            // Validate that the instance contains all required fields.
-            validate(instance);
-        } catch (final TException e) {
-            log.error(String.format("Unable to deserialize JSON '%s' to type '%s'.",
-                    jp.getValueAsString(), instance.getClass().getName(), e));
-            ctxt.mappingException(e.getMessage());
-        }
-
-        return instance;
-    }
-
-    /**
-     * Returns the {@code <E>} enumerated value that represents the target
-     * field in the Thrift entity referenced in the JSON document.
-     * @param fieldName The name of the Thrift entity target field.
-     * @return The {@code <E>} enumerated value that represents the target
-     *   field in the Thrift entity referenced in the JSON document.
-     */
-    protected abstract E getField(String fieldName);
-
-    /**
-     * Creates a new instance of the Thrift entity class represented by this deserializer.
-     * @return A new instance of the Thrift entity class represented by this deserializer.
-     */
-    protected abstract T newInstance();
-
-    /**
-     * Validates that the Thrift entity instance contains all required fields after deserialization.
-     * @param instance A Thrift entity instance.
-     * @throws org.apache.thrift.TException if unable to validate the instance.
-     */
-    protected abstract void validate(T instance) throws TException;
-
-    /**
-     * Generates a {@link JavaType} that matches the target Thrift field represented by the provided
-     * {@code <E>} enumerated value.  If the field's type includes generics, the generics will
-     * be added to the generated {@link JavaType} to support proper conversion.
-     * @param thriftInstance The Thrift-generated class instance that will be converted to/from JSON.
-     * @param field A {@code <E>} enumerated value that represents a field in a Thrift-based entity.
-     * @return The {@link JavaType} representation of the type associated with the field.
-     * @throws NoSuchFieldException if unable to determine the field's type.
-     * @throws SecurityException if unable to determine the field's type.
-     */
-    protected JavaType generateValueType(final T thriftInstance, final E field) throws NoSuchFieldException, SecurityException {
-        final TypeFactory typeFactory = TypeFactory.defaultInstance();
-
-        final Field declaredField = thriftInstance.getClass().getDeclaredField(field.getFieldName());
-        if(declaredField.getType().equals(declaredField.getGenericType())) {
-            log.debug("Generating JavaType for type '{}'.", declaredField.getType());
-            return typeFactory.constructType(declaredField.getType());
-        } else {
-            final ParameterizedType type = (ParameterizedType)declaredField.getGenericType();
-            final Class<?>[] parameterizedTypes = new Class<?>[type.getActualTypeArguments().length];
-            for(int i=0; i<type.getActualTypeArguments().length; i++) {
-                parameterizedTypes[i] = (Class<?>)type.getActualTypeArguments()[i];
-            }
-            log.debug("Generating JavaType for type '{}' with generics '{}'", declaredField.getType(), parameterizedTypes);
-            return typeFactory.constructParametricType(declaredField.getType(), parameterizedTypes);
-        }
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftSerializer.java
deleted file mode 100644
index c692beb..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/AbstractThriftSerializer.java
+++ /dev/null
@@ -1,122 +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.persistance.registry.jpa.mongo.conversion;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonSerializer;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.google.common.base.CaseFormat;
-import org.apache.thrift.TBase;
-import org.apache.thrift.TFieldIdEnum;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.Collection;
-
-/**
- * This abstract class represents a generic serializer for converting Thrift-based entities
- * to JSON.
- *
- * @param <E> An implementation of the {@link org.apache.thrift.TFieldIdEnum} interface.
- * @param <T> An implementation of the {@link org.apache.thrift.TBase} interface.
- */
-public abstract class AbstractThriftSerializer<E extends TFieldIdEnum, T extends TBase<T, E>>
-        extends JsonSerializer<T> {
-
-    private static final Logger log = LoggerFactory.getLogger(AbstractThriftSerializer.class);
-
-    @Override
-    public Class<T> handledType() {
-        return getThriftClass();
-    }
-
-    @Override
-    public void serialize(final T value, final JsonGenerator jgen, final SerializerProvider provider)
-            throws IOException, JsonProcessingException {
-        jgen.writeStartObject();
-        for(final E field : getFieldValues()) {
-            if(value.isSet(field)) {
-                final Object fieldValue = value.getFieldValue(field);
-                if(fieldValue != null) {
-                    log.debug("Adding field {} to the JSON string...",
-                            CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName())
-                    );
-
-                    jgen.writeFieldName(CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName()));
-                    if(fieldValue instanceof Short) {
-                        jgen.writeNumber((Short)fieldValue);
-                    } else if(fieldValue instanceof Integer) {
-                        jgen.writeNumber((Integer)fieldValue);
-                    } else if(fieldValue instanceof Long) {
-                        jgen.writeNumber((Long)fieldValue);
-                    } else if(fieldValue instanceof Double) {
-                        jgen.writeNumber((Double)fieldValue);
-                    } else if(fieldValue instanceof Float) {
-                        jgen.writeNumber((Float)fieldValue);
-                    } else if(fieldValue instanceof Boolean) {
-                        jgen.writeBoolean((Boolean)fieldValue);
-                    } else if(fieldValue instanceof String) {
-                        jgen.writeString(fieldValue.toString());
-                    } else if(fieldValue instanceof Collection) {
-                        log.debug("Array opened for field {}.",
-                                CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName())
-                        );
-                        jgen.writeStartArray();
-                        for(final Object arrayObject : (Collection<?>)fieldValue) {
-                                jgen.writeObject(arrayObject);
-                        }
-                        jgen.writeEndArray();
-                        log.debug("Array closed for field {}.",
-                                CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName())
-                        );
-                    } else {
-                        jgen.writeObject(fieldValue);
-                    }
-                } else {
-                    log.debug("Skipping converting field {} to JSON:  value is null!",
-                            CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName())
-                    );
-                }
-            } else {
-                log.debug("Skipping converting field {} to JSON:  field has not been set!",
-                        CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,field.getFieldName())
-                );
-            }
-        }
-        jgen.writeEndObject();
-    }
-
-    /**
-     * Returns an array of {@code <E>} enumerated values that represent the fields present in the
-     * Thrift class associated with this serializer.
-     * @return The array of {@code <E>} enumerated values that represent the fields present in the
-     *   Thrift class.
-     */
-    protected abstract E[] getFieldValues();
-
-    /**
-     * Returns the {@code <T>} implementation class associated with this serializer.
-     * @return The {@code <T>} implementation class
-     */
-    protected abstract Class<T> getThriftClass();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/ModelConversionHelper.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/ModelConversionHelper.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/ModelConversionHelper.java
deleted file mode 100644
index 4144b2e..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/ModelConversionHelper.java
+++ /dev/null
@@ -1,218 +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.persistance.registry.jpa.mongo.conversion;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.Version;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.workspace.Gateway;
-import org.apache.airavata.model.workspace.Group;
-import org.apache.airavata.model.workspace.Project;
-import org.apache.airavata.model.workspace.User;
-import org.apache.airavata.model.workspace.experiment.*;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.appcatalog.idot.InputDataObjectTypeDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.appcatalog.idot.InputDataObjectTypeSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.appcatalog.odot.OutputDataObjectTypeDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.appcatalog.odot.OutputDataObjectTypeSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.ExperimentDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.ExperimentSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.aidh.AdvancedInputDataHandlingDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.aidh.AdvancedInputDataHandlingSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.aodh.AdvancedOutputDataHandlingDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.aodh.AdvancedOutputDataHandlingSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.appstatus.ApplicationStatusDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.appstatus.ApplicationStatusSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.crsh.ComputationalResourceSchedulingDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.crsh.ComputationalResourceSchedulingSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.datatrdetails.DataTransferDetailsDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.datatrdetails.DataTransferDetailsSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.errdetails.ErrorDetailsDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.errdetails.ErrorDetailsSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.expstatus.ExperimentStatusDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.expstatus.ExperimentStatusSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.expsummary.ExperimentSummaryDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.expsummary.ExperimentSummarySerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.jobdetails.JobDetailsDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.jobdetails.JobDetailsSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.jobstatus.JobStatusDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.jobstatus.JobStatusSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.qosp.QualityOfServiceParamsDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.qosp.QualityOfServiceParamsSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.taskdetails.TaskDetailsDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.taskdetails.TaskDetailsSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.taskstatus.TaskStatusDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.taskstatus.TaskStatusSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.trstatus.TransferStatusDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.trstatus.TransferStatusSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.ucdata.UserConfigurationDataDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.ucdata.UserConfigurationDataSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.validationrslt.ValidationResultsDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.validationrslt.ValidationResultsSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.wfnd.WorkflowNodeDetailsDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.wfnd.WorkflowNodeDetailsSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.wfns.WorkflowNodeStatusDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.wfns.WorkflowNodeStatusSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.gateway.GatewayDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.gateway.GatewaySerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.group.GroupDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.group.GroupSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.project.ProjectDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.project.ProjectSerializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.user.UserDeserializer;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.user.UserSerializer;
-import org.apache.thrift.TBase;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-
-/**
- * This is utility class for model conversion of thrift to/from json
- */
-public class ModelConversionHelper {
-    private final static Logger logger = LoggerFactory.getLogger(ModelConversionHelper.class);
-    private ObjectMapper objectMapper;
-
-    public ModelConversionHelper(){
-        init();
-    }
-
-    /**
-     * Private method to register the custom serializers and deserializers
-     */
-    private void init(){
-        this.objectMapper = new ObjectMapper();
-        SimpleModule module = new SimpleModule("SimpleModule",
-                new Version(1,0,0,null,null,null));
-
-        module.addSerializer(Gateway.class, new GatewaySerializer());
-        module.addDeserializer(Gateway.class, new GatewayDeserializer());
-
-        module.addSerializer(Group.class, new GroupSerializer());
-        module.addDeserializer(Group.class, new GroupDeserializer());
-
-        module.addSerializer(Project.class, new ProjectSerializer());
-        module.addDeserializer(Project.class, new ProjectDeserializer());
-
-        module.addSerializer(User.class, new UserSerializer());
-        module.addDeserializer(User.class, new UserDeserializer());
-
-        module.addSerializer(Experiment.class, new ExperimentSerializer());
-        module.addDeserializer(Experiment.class, new ExperimentDeserializer());
-
-        module.addSerializer(AdvancedInputDataHandling.class,
-                new AdvancedInputDataHandlingSerializer());
-        module.addDeserializer(AdvancedInputDataHandling.class,
-                new AdvancedInputDataHandlingDeserializer());
-
-        module.addSerializer(AdvancedOutputDataHandling.class,
-                new AdvancedOutputDataHandlingSerializer());
-        module.addDeserializer(AdvancedOutputDataHandling.class,
-                new AdvancedOutputDataHandlingDeserializer());
-
-        module.addSerializer(ApplicationStatus.class,
-                new ApplicationStatusSerializer());
-        module.addDeserializer(ApplicationStatus.class,
-                new ApplicationStatusDeserializer());
-
-        module.addSerializer(ComputationalResourceScheduling.class,
-                new ComputationalResourceSchedulingSerializer());
-        module.addDeserializer(ComputationalResourceScheduling.class,
-                new ComputationalResourceSchedulingDeserializer());
-
-        module.addSerializer(DataTransferDetails.class, new DataTransferDetailsSerializer());
-        module.addDeserializer(DataTransferDetails.class, new DataTransferDetailsDeserializer());
-
-        module.addSerializer(ErrorDetails.class, new ErrorDetailsSerializer());
-        module.addDeserializer(ErrorDetails.class, new ErrorDetailsDeserializer());
-
-        module.addSerializer(ExperimentStatus.class, new ExperimentStatusSerializer());
-        module.addDeserializer(ExperimentStatus.class, new ExperimentStatusDeserializer());
-
-        module.addSerializer(ExperimentSummary.class, new ExperimentSummarySerializer());
-        module.addDeserializer(ExperimentSummary.class, new ExperimentSummaryDeserializer());
-
-        module.addSerializer(JobDetails.class, new JobDetailsSerializer());
-        module.addDeserializer(JobDetails.class, new JobDetailsDeserializer());
-
-        module.addSerializer(JobStatus.class, new JobStatusSerializer());
-        module.addDeserializer(JobStatus.class, new JobStatusDeserializer());
-
-        module.addSerializer(QualityOfServiceParams.class,
-                new QualityOfServiceParamsSerializer());
-        module.addDeserializer(QualityOfServiceParams.class,
-                new QualityOfServiceParamsDeserializer());
-
-        module.addSerializer(TaskDetails.class, new TaskDetailsSerializer());
-        module.addDeserializer(TaskDetails.class, new TaskDetailsDeserializer());
-
-        module.addSerializer(TaskStatus.class, new TaskStatusSerializer());
-        module.addDeserializer(TaskStatus.class, new TaskStatusDeserializer());
-
-        module.addSerializer(TransferStatus.class, new TransferStatusSerializer());
-        module.addDeserializer(TransferStatus.class, new TransferStatusDeserializer());
-
-        module.addSerializer(UserConfigurationData.class, new UserConfigurationDataSerializer());
-        module.addDeserializer(UserConfigurationData.class, new UserConfigurationDataDeserializer());
-
-        module.addSerializer(ValidationResults.class, new ValidationResultsSerializer());
-        module.addDeserializer(ValidationResults.class, new ValidationResultsDeserializer());
-
-        module.addSerializer(WorkflowNodeDetails.class, new WorkflowNodeDetailsSerializer());
-        module.addDeserializer(WorkflowNodeDetails.class, new WorkflowNodeDetailsDeserializer());
-
-        module.addSerializer(WorkflowNodeStatus.class, new WorkflowNodeStatusSerializer());
-        module.addDeserializer(WorkflowNodeStatus.class, new WorkflowNodeStatusDeserializer());
-
-        module.addSerializer(InputDataObjectType.class, new InputDataObjectTypeSerializer());
-        module.addDeserializer(InputDataObjectType.class, new InputDataObjectTypeDeserializer());
-
-        module.addSerializer(OutputDataObjectType.class, new OutputDataObjectTypeSerializer());
-        module.addDeserializer(OutputDataObjectType.class, new OutputDataObjectTypeDeserializer());
-
-        objectMapper.registerModule(module);
-    }
-
-    /**
-     * Method to serialize a thrift object to json
-     * @param object
-     * @return
-     * @throws JsonProcessingException
-     */
-    public String serializeObject(TBase object) throws JsonProcessingException {
-        String json = this.objectMapper.writeValueAsString(object);
-        return json;
-    }
-
-    /**
-     * Method to deserialize a json to the thrift object
-     * @param clz
-     * @param json
-     * @return
-     * @throws IOException
-     */
-    public TBase deserializeObject(Class<?> clz, String json) throws IOException {
-        return (TBase)this.objectMapper.readValue(json, clz);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeDeserializer.java
deleted file mode 100644
index c0b4252..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.appcatalog.idot;
-
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class InputDataObjectTypeDeserializer extends
-        AbstractThriftDeserializer<InputDataObjectType._Fields, InputDataObjectType> {
-
-    @Override
-    protected InputDataObjectType._Fields getField(final String fieldName) {
-        return InputDataObjectType._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected InputDataObjectType newInstance() {
-        return new InputDataObjectType();
-    }
-
-    @Override
-    protected void validate(final InputDataObjectType instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeSerializer.java
deleted file mode 100644
index 23ba9a4..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/idot/InputDataObjectTypeSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.appcatalog.idot;
-
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class InputDataObjectTypeSerializer extends
-        AbstractThriftSerializer<InputDataObjectType._Fields, InputDataObjectType> {
-    private final static Logger logger = LoggerFactory.getLogger(InputDataObjectTypeSerializer.class);
-
-    @Override
-    protected InputDataObjectType._Fields[] getFieldValues() {
-        return InputDataObjectType._Fields.values();
-    }
-
-    @Override
-    protected Class<InputDataObjectType> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeDeserializer.java
deleted file mode 100644
index 8eb9dda..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.appcatalog.odot;
-
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class OutputDataObjectTypeDeserializer extends
-        AbstractThriftDeserializer<OutputDataObjectType._Fields, OutputDataObjectType> {
-
-    @Override
-    protected OutputDataObjectType._Fields getField(final String fieldName) {
-        return OutputDataObjectType._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected OutputDataObjectType newInstance() {
-        return new OutputDataObjectType();
-    }
-
-    @Override
-    protected void validate(final OutputDataObjectType instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeSerializer.java
deleted file mode 100644
index 26bc349..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/appcatalog/odot/OutputDataObjectTypeSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.appcatalog.odot;
-
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class OutputDataObjectTypeSerializer extends
-        AbstractThriftSerializer<OutputDataObjectType._Fields, OutputDataObjectType> {
-    private final static Logger logger = LoggerFactory.getLogger(OutputDataObjectTypeSerializer.class);
-
-    @Override
-    protected OutputDataObjectType._Fields[] getFieldValues() {
-        return OutputDataObjectType._Fields.values();
-    }
-
-    @Override
-    protected Class<OutputDataObjectType> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentDeserializer.java
deleted file mode 100644
index 21fed5b..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment;
-
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class ExperimentDeserializer extends
-        AbstractThriftDeserializer<Experiment._Fields, Experiment> {
-
-    @Override
-    protected Experiment._Fields getField(final String fieldName) {
-        return Experiment._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected Experiment newInstance() {
-        return new Experiment();
-    }
-
-    @Override
-    protected void validate(final Experiment instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentSerializer.java
deleted file mode 100644
index 96d07a3..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/ExperimentSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment;
-
-import org.apache.airavata.model.workspace.experiment.Experiment;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ExperimentSerializer extends
-        AbstractThriftSerializer<Experiment._Fields, Experiment> {
-    private final static Logger logger = LoggerFactory.getLogger(ExperimentSerializer.class);
-
-    @Override
-    protected Experiment._Fields[] getFieldValues() {
-        return Experiment._Fields.values();
-    }
-
-    @Override
-    protected Class<Experiment> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingDeserializer.java
deleted file mode 100644
index 6de28f3..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.aidh;
-
-import org.apache.airavata.model.workspace.experiment.AdvancedInputDataHandling;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class AdvancedInputDataHandlingDeserializer extends
-        AbstractThriftDeserializer<AdvancedInputDataHandling._Fields, AdvancedInputDataHandling> {
-
-    @Override
-    protected AdvancedInputDataHandling._Fields getField(final String fieldName) {
-        return AdvancedInputDataHandling._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected AdvancedInputDataHandling newInstance() {
-        return new AdvancedInputDataHandling();
-    }
-
-    @Override
-    protected void validate(final AdvancedInputDataHandling instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingSerializer.java
deleted file mode 100644
index 2f01375..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aidh/AdvancedInputDataHandlingSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.aidh;
-
-import org.apache.airavata.model.workspace.experiment.AdvancedInputDataHandling;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AdvancedInputDataHandlingSerializer extends
-        AbstractThriftSerializer<AdvancedInputDataHandling._Fields, AdvancedInputDataHandling> {
-    private final static Logger logger = LoggerFactory.getLogger(AdvancedInputDataHandlingSerializer.class);
-
-    @Override
-    protected AdvancedInputDataHandling._Fields[] getFieldValues() {
-        return AdvancedInputDataHandling._Fields.values();
-    }
-
-    @Override
-    protected Class<AdvancedInputDataHandling> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingDeserializer.java
deleted file mode 100644
index 071d31b..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.aodh;
-
-import org.apache.airavata.model.workspace.experiment.AdvancedOutputDataHandling;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class AdvancedOutputDataHandlingDeserializer extends
-        AbstractThriftDeserializer<AdvancedOutputDataHandling._Fields, AdvancedOutputDataHandling> {
-
-    @Override
-    protected AdvancedOutputDataHandling._Fields getField(final String fieldName) {
-        return AdvancedOutputDataHandling._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected AdvancedOutputDataHandling newInstance() {
-        return new AdvancedOutputDataHandling();
-    }
-
-    @Override
-    protected void validate(final AdvancedOutputDataHandling instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingSerializer.java
deleted file mode 100644
index c675ce0..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/aodh/AdvancedOutputDataHandlingSerializer.java
+++ /dev/null
@@ -1,41 +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.persistance.registry.jpa.mongo.conversion.experiment.aodh;
-
-import org.apache.airavata.model.workspace.experiment.AdvancedOutputDataHandling;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AdvancedOutputDataHandlingSerializer extends
-        AbstractThriftSerializer<AdvancedOutputDataHandling._Fields, AdvancedOutputDataHandling> {
-    private final static Logger logger = LoggerFactory.getLogger(AdvancedOutputDataHandlingSerializer.class);
-
-    @Override
-    protected AdvancedOutputDataHandling._Fields[] getFieldValues() {
-        return AdvancedOutputDataHandling._Fields.values();
-    }
-
-    @Override
-    protected Class<AdvancedOutputDataHandling> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusDeserializer.java
deleted file mode 100644
index e08c71d..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.appstatus;
-
-import org.apache.airavata.model.workspace.experiment.ApplicationStatus;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class ApplicationStatusDeserializer extends
-        AbstractThriftDeserializer<ApplicationStatus._Fields, ApplicationStatus> {
-
-    @Override
-    protected ApplicationStatus._Fields getField(final String fieldName) {
-        return ApplicationStatus._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected ApplicationStatus newInstance() {
-        return new ApplicationStatus();
-    }
-
-    @Override
-    protected void validate(final ApplicationStatus instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusSerializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusSerializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusSerializer.java
deleted file mode 100644
index f428a58..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/appstatus/ApplicationStatusSerializer.java
+++ /dev/null
@@ -1,42 +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.persistance.registry.jpa.mongo.conversion.experiment.appstatus;
-
-import org.apache.airavata.model.workspace.experiment.ApplicationStatus;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftSerializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ApplicationStatusSerializer extends
-        AbstractThriftSerializer<ApplicationStatus._Fields, ApplicationStatus> {
-    private final static Logger logger = LoggerFactory.getLogger(
-            ApplicationStatusSerializer.class);
-
-    @Override
-    protected ApplicationStatus._Fields[] getFieldValues() {
-        return ApplicationStatus._Fields.values();
-    }
-
-    @Override
-    protected Class<ApplicationStatus> getThriftClass() {
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingDeserializer.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingDeserializer.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingDeserializer.java
deleted file mode 100644
index 5ab463e..0000000
--- a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/mongo/conversion/experiment/crsh/ComputationalResourceSchedulingDeserializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.mongo.conversion.experiment.crsh;
-
-import org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling;
-import org.apache.airavata.persistance.registry.jpa.mongo.conversion.AbstractThriftDeserializer;
-import org.apache.thrift.TException;
-
-public class ComputationalResourceSchedulingDeserializer extends
-        AbstractThriftDeserializer<ComputationalResourceScheduling._Fields, ComputationalResourceScheduling> {
-
-    @Override
-    protected ComputationalResourceScheduling._Fields getField(final String fieldName) {
-        return ComputationalResourceScheduling._Fields.valueOf(fieldName);
-    }
-
-    @Override
-    protected ComputationalResourceScheduling newInstance() {
-        return new ComputationalResourceScheduling();
-    }
-
-    @Override
-    protected void validate(final ComputationalResourceScheduling instance) throws TException {
-        instance.validate();
-    }
-}
\ No newline at end of file


[22/44] airavata git commit: Adding modifications for the mongo registry impl

Posted by sc...@apache.org.
Adding modifications for the mongo registry impl


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

Branch: refs/heads/mongo-registry
Commit: 93064570482527a51b8c8c101574886104201e1b
Parents: e13d90d
Author: Supun Nakandala <sc...@apache.org>
Authored: Wed May 27 00:17:29 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Wed May 27 00:17:29 2015 +0530

----------------------------------------------------------------------
 .../registry/jpa/impl/RegistryImpl.java         | 735 +++++++++++++++++++
 1 file changed, 735 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/93064570/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
new file mode 100644
index 0000000..b8d7132
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryImpl.java
@@ -0,0 +1,735 @@
+/*
+ *
+ * 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.persistance.registry.jpa.impl;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.workspace.Gateway;
+import org.apache.airavata.model.workspace.Project;
+import org.apache.airavata.model.workspace.experiment.*;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
+import org.apache.airavata.persistance.registry.jpa.resources.UserResource;
+import org.apache.airavata.registry.cpi.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class RegistryImpl implements Registry {
+    private GatewayResource gatewayResource;
+    private UserResource user;
+    private final static Logger logger = LoggerFactory.getLogger(RegistryImpl.class);
+    private ExperimentRegistry experimentRegistry = null;
+    private ProjectRegistry projectRegistry = null;
+    private GatewayRegistry gatewayRegistry = null;
+
+    public RegistryImpl() throws RegistryException{
+        try {
+            if (!ResourceUtils.isGatewayExist(ServerSettings.getDefaultUserGateway())){
+                gatewayResource = (GatewayResource) ResourceUtils.createGateway(ServerSettings.getDefaultUserGateway());
+                gatewayResource.setGatewayName(ServerSettings.getDefaultUserGateway());
+                gatewayResource.save();
+            }else {
+                gatewayResource = (GatewayResource)ResourceUtils.getGateway(ServerSettings.getDefaultUserGateway());
+            }
+
+            if (!ResourceUtils.isUserExist(ServerSettings.getDefaultUser())){
+                user = ResourceUtils.createUser(ServerSettings.getDefaultUser(), ServerSettings.getDefaultUserPassword());
+                user.save();
+            }else {
+                user = (UserResource)ResourceUtils.getUser(ServerSettings.getDefaultUser());
+            }
+            experimentRegistry = new ExperimentRegistry(gatewayResource, user);
+            projectRegistry = new ProjectRegistry(gatewayResource, user);
+            gatewayRegistry = new GatewayRegistry();
+        } catch (ApplicationSettingsException e) {
+            logger.error("Unable to read airavata server properties..", e);
+            throw new RegistryException("Unable to read airavata server properties..", e);
+        }
+    }
+
+    public RegistryImpl(String gateway, String username, String password) throws RegistryException{
+        if (!ResourceUtils.isGatewayExist(gateway)){
+            gatewayResource = (GatewayResource) ResourceUtils.createGateway(gateway);
+            gatewayResource.save();
+        }else {
+            gatewayResource = (GatewayResource)ResourceUtils.getGateway(gateway);
+        }
+
+        if (!ResourceUtils.isUserExist(username)){
+            user = ResourceUtils.createUser(username, password);
+            user.save();
+        }else {
+            user = (UserResource)ResourceUtils.getUser(username);
+        }
+        experimentRegistry = new ExperimentRegistry(gatewayResource, user);
+        projectRegistry = new ProjectRegistry(gatewayResource, user);
+    }
+
+    /**
+     * This method is to add an object in to the registry
+     *
+     * @param dataType       Data type is a predefined type which the programmer should choose according to the object he
+     *                       is going to save in to registry
+     * @param newObjectToAdd Object which contains the fields that need to be saved in to registry. This object is a
+     *                       thrift model object. In experiment case this object can be BasicMetadata, ConfigurationData
+     *                       etc
+     * @return return the identifier to identify the object
+     */
+    @Override
+    public Object add(ParentDataType dataType, Object newObjectToAdd, String gatewayId) throws RegistryException {
+        try {
+            switch (dataType) {
+                case PROJECT:
+                    return projectRegistry.addProject((Project)newObjectToAdd, gatewayId);
+                case EXPERIMENT:
+                    return experimentRegistry.addExperiment((Experiment) newObjectToAdd, gatewayId);
+                case GATEWAY:
+                    return gatewayRegistry.addGateway((Gateway)newObjectToAdd);
+                default:
+                    logger.error("Unsupported top level type..", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while adding the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while adding the resource " + dataType.toString(), e);
+        }
+    }
+
+    /**
+     * This method is to add an object in to the registry
+     *
+     * @param dataType            Data type is a predefined type which the programmer should choose according to the object he
+     *                            is going to save in to registry
+     * @param newObjectToAdd      Object which contains the fields that need to be saved in to registry. This object is a
+     *                            thrift model object. In experiment case this object can be BasicMetadata, ConfigurationData
+     *                            etc
+     * @param dependentIdentifier Object which contains the identifier if the object that is going to add is not a top
+     *                            level object in the data model. If it is a top level object, programmer can pass it as
+     *                            null
+     */
+    @Override
+    public Object add(ChildDataType dataType, Object newObjectToAdd, Object dependentIdentifier) throws RegistryException {
+        try {
+            switch (dataType) {
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    return experimentRegistry.addUserConfigData((UserConfigurationData) newObjectToAdd, (String) dependentIdentifier);
+                case EXPERIMENT_OUTPUT:
+                    return experimentRegistry.addExpOutputs((List<OutputDataObjectType>) newObjectToAdd, (String) dependentIdentifier);
+                case EXPERIMENT_STATUS:
+                    return experimentRegistry.updateExperimentStatus((ExperimentStatus) newObjectToAdd, (String) dependentIdentifier);
+                case WORKFLOW_NODE_DETAIL:
+                    return experimentRegistry.addWorkflowNodeDetails((WorkflowNodeDetails) newObjectToAdd, (String) dependentIdentifier);
+                case WORKFLOW_NODE_STATUS:
+                    return experimentRegistry.addWorkflowNodeStatus((WorkflowNodeStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case NODE_OUTPUT:
+                    return experimentRegistry.addNodeOutputs((List<OutputDataObjectType>) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case TASK_DETAIL:
+                    return experimentRegistry.addTaskDetails((TaskDetails) newObjectToAdd, (String) dependentIdentifier);
+                case APPLICATION_OUTPUT:
+                    return experimentRegistry.addApplicationOutputs((List<OutputDataObjectType>) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case TASK_STATUS:
+                    return experimentRegistry.addTaskStatus((TaskStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case JOB_DETAIL:
+                    return experimentRegistry.addJobDetails((JobDetails) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case JOB_STATUS:
+                    return experimentRegistry.addJobStatus((JobStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case APPLICATION_STATUS:
+                    return experimentRegistry.addApplicationStatus((ApplicationStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case DATA_TRANSFER_DETAIL:
+                    return experimentRegistry.addDataTransferDetails((DataTransferDetails) newObjectToAdd, (String) dependentIdentifier);
+                case TRANSFER_STATUS:
+                    return experimentRegistry.addTransferStatus((TransferStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                    return experimentRegistry.addComputationalResourceScheduling((ComputationalResourceScheduling) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case ADVANCE_OUTPUT_DATA_HANDLING:
+                    return experimentRegistry.addOutputDataHandling((AdvancedOutputDataHandling) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case ADVANCE_INPUT_DATA_HANDLING:
+                    return experimentRegistry.addInputDataHandling((AdvancedInputDataHandling) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+                case QOS_PARAM:
+                    return experimentRegistry.addQosParams((QualityOfServiceParams) newObjectToAdd, (String) dependentIdentifier);
+                case ERROR_DETAIL:
+                    return experimentRegistry.addErrorDetails((ErrorDetails) newObjectToAdd, dependentIdentifier);
+                default:
+                    logger.error("Unsupported dependent data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while adding " + dataType.toString() , new RegistryException(e));
+            throw new RegistryException("Error while adding " + dataType.toString(), e);
+        }
+
+    }
+
+    /**
+     * This method is to update the whole object in registry
+     *
+     * @param dataType          Data type is a predefined type which the programmer should choose according to the object he
+     *                          is going to save in to registry
+     * @param newObjectToUpdate Object which contains the fields that need to be updated in to registry. This object is a
+     *                          thrift model object. In experiment case this object can be BasicMetadata, ConfigurationData
+     *                          etc. CPI programmer can only fill necessary fields that need to be updated. He does not
+     *                          have to fill the whole object. He needs to only fill the mandatory fields and whatever the
+     *                          other fields that need to be updated.
+     */
+    @Override
+    public void update(RegistryModelType dataType, Object newObjectToUpdate, Object identifier) throws RegistryException {
+        try {
+            switch (dataType) {
+                case PROJECT:
+                    projectRegistry.updateProject((Project)newObjectToUpdate, (String)identifier);
+                    break;
+                case GATEWAY:
+                    gatewayRegistry.updateGateway((String)identifier, (Gateway)newObjectToUpdate);
+                    break;
+                case EXPERIMENT:
+                    experimentRegistry.updateExperiment((Experiment) newObjectToUpdate, (String) identifier);
+                    break;
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    experimentRegistry.updateUserConfigData((UserConfigurationData) newObjectToUpdate, (String) identifier);
+                    break;
+                case EXPERIMENT_OUTPUT:
+                    experimentRegistry.updateExpOutputs((List<OutputDataObjectType>) newObjectToUpdate, (String) identifier);
+                    break;
+                case EXPERIMENT_STATUS:
+                    experimentRegistry.updateExperimentStatus((ExperimentStatus) newObjectToUpdate, (String) identifier);
+                    break;
+                case WORKFLOW_NODE_DETAIL:
+                    experimentRegistry.updateWorkflowNodeDetails((WorkflowNodeDetails) newObjectToUpdate, (String) identifier);
+                    break;
+                case WORKFLOW_NODE_STATUS:
+                    experimentRegistry.updateWorkflowNodeStatus((WorkflowNodeStatus) newObjectToUpdate, (String) identifier);
+                    break;
+                case NODE_OUTPUT:
+                    experimentRegistry.updateNodeOutputs((List<OutputDataObjectType>) newObjectToUpdate, (String) identifier);
+                    break;
+                case TASK_DETAIL:
+                    experimentRegistry.updateTaskDetails((TaskDetails) newObjectToUpdate, (String) identifier);
+                    break;
+                case APPLICATION_OUTPUT:
+                    experimentRegistry.updateAppOutputs((List<OutputDataObjectType>) newObjectToUpdate, (String) identifier);
+                    break;
+                case TASK_STATUS:
+                    experimentRegistry.updateTaskStatus((TaskStatus) newObjectToUpdate, (String) identifier);
+                    break;
+                case JOB_DETAIL:
+                    experimentRegistry.updateJobDetails((JobDetails) newObjectToUpdate, (CompositeIdentifier) identifier);
+                    break;
+                case JOB_STATUS:
+                    experimentRegistry.updateJobStatus((JobStatus) newObjectToUpdate, (CompositeIdentifier) identifier);
+                    break;
+                case APPLICATION_STATUS:
+                    experimentRegistry.updateApplicationStatus((ApplicationStatus) newObjectToUpdate, (CompositeIdentifier) identifier);
+                    break;
+                case DATA_TRANSFER_DETAIL:
+                    experimentRegistry.updateDataTransferDetails((DataTransferDetails) newObjectToUpdate, (CompositeIdentifier) identifier);
+                    break;
+                case TRANSFER_STATUS:
+                    experimentRegistry.updateTransferStatus((TransferStatus) newObjectToUpdate, (CompositeIdentifier) identifier);
+                    break;
+                case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                    experimentRegistry.updateScheduling((ComputationalResourceScheduling) newObjectToUpdate, (String) identifier, dataType.toString());
+                    break;
+                case ADVANCE_INPUT_DATA_HANDLING:
+                    experimentRegistry.updateInputDataHandling((AdvancedInputDataHandling) newObjectToUpdate, (String) identifier, dataType.toString());
+                    break;
+                case ADVANCE_OUTPUT_DATA_HANDLING:
+                    experimentRegistry.updateOutputDataHandling((AdvancedOutputDataHandling) newObjectToUpdate, (String) identifier, dataType.toString());
+                    break;
+                case QOS_PARAM:
+                    experimentRegistry.updateQOSParams((QualityOfServiceParams) newObjectToUpdate, (String) identifier, dataType.toString());
+                    break;
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while updating the resource.." + dataType.toString(), e);
+        }
+
+    }
+
+    /**
+     * This method is to update a specific field of the data model
+     *
+     * @param dataType   Data type is a predefined type which the programmer should choose according to the object he
+     *                   is going to save in to registry
+     * @param identifier Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
+     *                   identifier will be generated experimentID
+     * @param fieldName  Field which need to be updated in the registry. In Experiment_Basic_Type, if you want to update the
+     *                   description, field will be "description". Field names are defined in
+     *                   org.apache.airavata.registry.cpi.utils.Constants
+     * @param value      Value by which the given field need to be updated. If the field is "description", that field will be
+     *                   updated by given value
+     */
+    @Override
+    public void update(RegistryModelType dataType, Object identifier, String fieldName, Object value) throws RegistryException {
+        try {
+            switch (dataType) {
+                case EXPERIMENT:
+                    experimentRegistry.updateExperimentField((String) identifier, fieldName, value);
+                    break;
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    experimentRegistry.updateExpConfigDataField((String) identifier, fieldName, value);
+                    break;
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while updating the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while updating the resource " + dataType.toString(), e);
+        }
+
+    }
+
+    /**
+     * This method is to retrieve object according to the identifier. In the experiment basic data type, if you give the
+     * experiment id, this method will return the BasicMetadata object
+     *
+     * @param dataType   Data type is a predefined type which the programmer should choose according to the object he
+     *                   is going to save in to registry
+     * @param identifier Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
+     *                   identifier will be generated experimentID
+     * @return object according to the given identifier.
+     */
+    @Override
+    public Object get(RegistryModelType dataType, Object identifier) throws RegistryException {
+        try {
+            switch (dataType) {
+                case PROJECT:
+                    return projectRegistry.getProject((String)identifier);
+                case GATEWAY:
+                    return gatewayRegistry.getGateway((String)identifier);
+                case EXPERIMENT:
+                    return experimentRegistry.getExperiment((String) identifier, null);
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    return experimentRegistry.getConfigData((String) identifier, null);
+                case EXPERIMENT_OUTPUT:
+                    return experimentRegistry.getExperimentOutputs((String) identifier);
+                case EXPERIMENT_STATUS:
+                    return experimentRegistry.getExperimentStatus((String) identifier);
+                case WORKFLOW_NODE_DETAIL:
+                    return experimentRegistry.getWorkflowNodeDetails((String) identifier);
+                case WORKFLOW_NODE_STATUS:
+                    return experimentRegistry.getWorkflowNodeStatus((String) identifier);
+                case NODE_OUTPUT:
+                    return experimentRegistry.getNodeOutputs((String) identifier);
+                case TASK_DETAIL:
+                    return experimentRegistry.getTaskDetails((String) identifier);
+                case APPLICATION_OUTPUT:
+                    return experimentRegistry.getApplicationOutputs((String) identifier);
+                case TASK_STATUS:
+                    return experimentRegistry.getTaskStatus((String) identifier);
+                case JOB_DETAIL:
+                    return experimentRegistry.getJobDetails((CompositeIdentifier) identifier);
+                case JOB_STATUS:
+                    return experimentRegistry.getJobStatus((CompositeIdentifier) identifier);
+                case APPLICATION_STATUS:
+                    return experimentRegistry.getApplicationStatus((CompositeIdentifier) identifier);
+                case DATA_TRANSFER_DETAIL:
+                    return experimentRegistry.getDataTransferDetails((CompositeIdentifier) identifier);
+                case TRANSFER_STATUS:
+                    return experimentRegistry.getDataTransferStatus((CompositeIdentifier) identifier);
+                case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                    return experimentRegistry.getComputationalScheduling(dataType, (String) identifier);
+                case ADVANCE_INPUT_DATA_HANDLING:
+                    return experimentRegistry.getInputDataHandling(dataType, (String) identifier);
+                case ADVANCE_OUTPUT_DATA_HANDLING:
+                    return experimentRegistry.getOutputDataHandling(dataType, (String) identifier);
+                case QOS_PARAM:
+                    return experimentRegistry.getQosParams(dataType, (String) identifier);
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while retrieving the resource " + dataType.toString() , e);
+        }
+    }
+
+    /**
+     * This method is to retrieve list of objects according to a given criteria
+     *
+     * @param dataType  Data type is a predefined type which the programmer should choose according to the object he
+     *                  is going to save in to registry
+     * @param fieldName FieldName is the field that filtering should be done. For example, if we want to retrieve all
+     *                  the experiments for a given user, filterBy will be "userName"
+     * @param value     value for the filtering field. In the experiment case, value for "userName" can be "admin"
+     * @return List of objects according to the given criteria
+     */
+    @Override
+    public List<Object> get(RegistryModelType dataType, String fieldName, Object value) throws RegistryException {
+        try {
+            List<Object> result = new ArrayList<Object>();
+            switch (dataType) {
+                case PROJECT:
+                    List<Project> projectList = projectRegistry.getProjectList(fieldName, value);
+                    for (Project project : projectList ){
+                        result.add(project);
+                    }
+                    return result;
+                case GATEWAY:
+                    List<Gateway> allGateways = gatewayRegistry.getAllGateways();
+                    for (Gateway gateway : allGateways){
+                        result.add(gateway);
+                    }
+                    return result;
+                case EXPERIMENT:
+                    List<Experiment> experimentList = experimentRegistry.getExperimentList(fieldName, value);
+                    for (Experiment experiment : experimentList) {
+                        result.add(experiment);
+                    }
+                    return result;
+                case WORKFLOW_NODE_DETAIL:
+                    List<WorkflowNodeDetails> wfNodeDetails = experimentRegistry.getWFNodeDetails(fieldName, value);
+                    for (WorkflowNodeDetails wf : wfNodeDetails) {
+                        result.add(wf);
+                    }
+                    return result;
+                case WORKFLOW_NODE_STATUS:
+                    List<WorkflowNodeStatus> wfNodeStatusList = experimentRegistry.getWFNodeStatusList(fieldName, value);
+                    for (WorkflowNodeStatus wfs : wfNodeStatusList) {
+                        result.add(wfs);
+                    }
+                    return result;
+                case TASK_DETAIL:
+                    List<TaskDetails> taskDetails = experimentRegistry.getTaskDetails(fieldName, value);
+                    for (TaskDetails task : taskDetails) {
+                        result.add(task);
+                    }
+                    return result;
+                case JOB_DETAIL:
+                    List<JobDetails> jobDetails = experimentRegistry.getJobDetails(fieldName, value);
+                    for (JobDetails job : jobDetails) {
+                        result.add(job);
+                    }
+                    return result;
+                case DATA_TRANSFER_DETAIL:
+                    List<DataTransferDetails> dataTransferDetails = experimentRegistry.getDataTransferDetails(fieldName, value);
+                    for (DataTransferDetails transferDetails : dataTransferDetails) {
+                        result.add(transferDetails);
+                    }
+                    return result;
+                case ERROR_DETAIL:
+                    List<ErrorDetails> errorDetails = experimentRegistry.getErrorDetails(fieldName, value);
+                    for (ErrorDetails error : errorDetails) {
+                        result.add(error);
+                    }
+                    return result;
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while retrieving the resource " + dataType.toString(), e);
+        }
+
+    }
+
+    /**
+     * This method is to retrieve list of objects according to a given criteria with pagination and ordering
+     *
+     * @param dataType  Data type is a predefined type which the programmer should choose according to the object he
+     *                  is going to save in to registry
+     * @param fieldName FieldName is the field that filtering should be done. For example, if we want to retrieve all
+     *                  the experiments for a given user, filterBy will be "userName"
+     * @param value     value for the filtering field. In the experiment case, value for "userName" can be "admin"
+     * @param limit     Size of the results to be returned
+     * @param offset    Start position of the results to be retrieved
+     * @param orderByIdentifier     Named of the column in which the ordering is based
+     * @param resultOrderType       Type of ordering i.e ASC or DESC
+     * @return
+     * @throws RegistryException
+     */
+    @Override
+    public List<Object> get(RegistryModelType dataType, String fieldName, Object value, int limit,
+                            int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+        try {
+            List<Object> result = new ArrayList<Object>();
+            switch (dataType) {
+                case PROJECT:
+                    List<Project> projectList = projectRegistry
+                            .getProjectList(fieldName, value, limit, offset, orderByIdentifier, resultOrderType);
+                    for (Project project : projectList ){
+                        result.add(project);
+                    }
+                    return result;
+                case EXPERIMENT:
+                    List<Experiment> experimentList = experimentRegistry.getExperimentList(fieldName, value,
+                            limit, offset, orderByIdentifier, resultOrderType);
+                    for (Experiment experiment : experimentList) {
+                        result.add(experiment);
+                    }
+                    return result;
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while retrieving the resource " + dataType.toString(), e);
+        }
+    }
+
+    /**
+     * This method is to retrieve list of objects according to a given criteria
+     * @param dataType Data type is a predefined type which the programmer should choose according to the object he
+     *                 is going to save in to registry
+     * @param filters filters is a map of field name and value that you need to use for search filtration
+     * @return List of objects according to the given criteria
+     */
+    @Override
+    public List<Object> search(RegistryModelType dataType, Map<String, String> filters) throws RegistryException {
+        return search(dataType, filters, -1, -1, null, null);
+    }
+
+    /**
+     * This method is to retrieve list of objects with pagination according to a given criteria sorted
+     * according by the specified  identified and specified ordering (i.e either ASC or DESC)
+     * @param dataType Data type is a predefined type which the programmer should choose according to the object he
+     *                 is going to save in to registry
+     * @param filters            filters is a map of field name and value that you need to use for search filtration
+     * @param limit              amount of the results to be returned
+     * @param offset             offset of the results from the sorted list to be fetched from
+     * @param orderByIdentifier  identifier (i.e the column) which will be used as the basis to sort the results
+     * @param resultOrderType    The type of ordering (i.e ASC or DESC) that has to be used when retrieving the results
+     * @return List of objects according to the given criteria
+     */
+    @Override
+    public List<Object> search(RegistryModelType dataType, Map<String, String> filters, int limit,
+                               int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+        try {
+            List<Object> result = new ArrayList<Object>();
+            switch (dataType) {
+                case PROJECT:
+                    List<Project> projectList
+                            = projectRegistry.searchProjects(filters, limit, offset,
+                            orderByIdentifier, resultOrderType);
+                    for (Project project : projectList ){
+                        result.add(project);
+                    }
+                    return result;
+                case EXPERIMENT:
+                    List<ExperimentSummary> experimentSummaries = experimentRegistry
+                            .searchExperiments(filters, limit, offset, orderByIdentifier,
+                                    resultOrderType);
+                    for (ExperimentSummary ex : experimentSummaries){
+                        result.add(ex);
+                    }
+                    return result;
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while retrieving the resource " + dataType.toString(), e);
+        }
+    }
+
+    /**
+     * This method is to retrieve a specific value for a given field.
+     *
+     * @param dataType   Data type is a predefined type which the programmer should choose according to the object he
+     *                   is going to save in to registry
+     * @param identifier Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
+     *                   identifier will be generated experimentID
+     * @param field      field that filtering should be done. For example, if we want to execution user for a given
+     *                   experiment, field will be "userName"
+     * @return return the value for the specific field where data model is identified by the unique identifier that has
+     * given
+     */
+    @Override
+    public Object getValue(RegistryModelType dataType, Object identifier, String field) throws RegistryException {
+        try {
+            switch (dataType) {
+                case EXPERIMENT:
+                    return experimentRegistry.getExperiment((String) identifier, field);
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    return experimentRegistry.getConfigData((String) identifier, field);
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while retrieving the resource " + dataType.toString(), e);
+        }
+
+    }
+
+    /**
+     * This method is to retrieve all the identifiers according to given filtering criteria. For an example, if you want
+     * to get all the experiment ids for a given gateway, your field name will be "gateway" and the value will be the
+     * name of the gateway ("default"). Similar manner you can retrieve all the experiment ids for a given user.
+     *
+     * @param dataType  Data type is a predefined type which the programmer should choose according to the object he
+     *                  is going to save in to registry
+     * @param fieldName FieldName is the field that filtering should be done. For example, if we want to retrieve all
+     *                  the experiments for a given user, filterBy will be "userName"
+     * @param value     value for the filtering field. In the experiment case, value for "userName" can be "admin"
+     * @return id list according to the filtering criteria
+     */
+    @Override
+    public List<String> getIds(RegistryModelType dataType, String fieldName, Object value) throws RegistryException {
+        try {
+            switch (dataType) {
+                case PROJECT:
+                    return projectRegistry.getProjectIds(fieldName, value);
+                case EXPERIMENT:
+                    return experimentRegistry.getExperimentIds(fieldName, value);
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    return experimentRegistry.getExperimentIds(fieldName, value);
+                case WORKFLOW_NODE_DETAIL:
+                    return experimentRegistry.getWorkflowNodeIds(fieldName, value);
+                case TASK_DETAIL:
+                    return experimentRegistry.getTaskDetailIds(fieldName, value);
+                case JOB_DETAIL:
+                    return experimentRegistry.getJobDetailIds(fieldName, value);
+                case DATA_TRANSFER_DETAIL:
+                    return experimentRegistry.getTransferDetailIds(fieldName, value);
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while retrieving the ids for" + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while retrieving the ids for " + dataType.toString(), e);
+        }
+
+    }
+
+    /**
+     * This method is to remove a item from the registry
+     *
+     * @param dataType   Data type is a predefined type which the programmer should choose according to the object he
+     *                   is going to save in to registry
+     * @param identifier Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
+     *                   identifier will be generated experimentID
+     */
+    @Override
+    public void remove(RegistryModelType dataType, Object identifier) throws RegistryException {
+        try {
+            switch (dataType) {
+                case PROJECT:
+                    projectRegistry.removeProject((String)identifier);
+                    break;
+                case GATEWAY:
+                    gatewayRegistry.removeGateway((String)identifier);
+                    break;
+                case EXPERIMENT:
+                    experimentRegistry.removeExperiment((String) identifier);
+                    break;
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    experimentRegistry.removeExperimentConfigData((String) identifier);
+                    break;
+                case WORKFLOW_NODE_DETAIL:
+                    experimentRegistry.removeWorkflowNode((String) identifier);
+                    break;
+                case TASK_DETAIL:
+                    experimentRegistry.removeTaskDetails((String) identifier);
+                    break;
+                case JOB_DETAIL:
+                    experimentRegistry.removeJobDetails((CompositeIdentifier) identifier);
+                    break;
+                case DATA_TRANSFER_DETAIL:
+                    experimentRegistry.removeDataTransferDetails((CompositeIdentifier) identifier);
+                    break;
+                case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                    experimentRegistry.removeComputationalScheduling(dataType, (String) identifier);
+                    break;
+                case ADVANCE_OUTPUT_DATA_HANDLING:
+                    experimentRegistry.removeOutputDataHandling(dataType, (String) identifier);
+                    break;
+                case ADVANCE_INPUT_DATA_HANDLING:
+                    experimentRegistry.removeInputDataHandling(dataType, (String) identifier);
+                    break;
+                case QOS_PARAM:
+                    experimentRegistry.removeQOSParams(dataType, (String) identifier);
+                    break;
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while removing the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while removing the resource " + dataType.toString(), e);
+        }
+
+    }
+
+    /**
+     * This method will check whether a given data type which can be identified with the identifier exists or not
+     *
+     * @param dataType   Data type is a predefined type which the programmer should choose according to the object he
+     *                   is going to save in to registry
+     * @param identifier Identifier which will uniquely identify the data model. For example, in Experiment_Basic_Type,
+     *                   identifier will be generated experimentID
+     * @return whether the given data type exists or not
+     */
+    @Override
+    public boolean isExist(RegistryModelType dataType, Object identifier) throws RegistryException {
+        try {
+            switch (dataType) {
+                case PROJECT:
+                    return projectRegistry.isProjectExist((String)identifier);
+                case GATEWAY:
+                    return gatewayRegistry.isGatewayExist((String)identifier);
+                case EXPERIMENT:
+                    return experimentRegistry.isExperimentExist((String) identifier);
+                case EXPERIMENT_CONFIGURATION_DATA:
+                    return experimentRegistry.isExperimentConfigDataExist((String) identifier);
+                case WORKFLOW_NODE_DETAIL:
+                    return experimentRegistry.isWFNodeExist((String) identifier);
+                case TASK_DETAIL:
+                    return experimentRegistry.isTaskDetailExist((String) identifier);
+                case JOB_DETAIL:
+                    return experimentRegistry.isJobDetailExist((CompositeIdentifier) identifier);
+                case DATA_TRANSFER_DETAIL:
+                    return experimentRegistry.isTransferDetailExist((CompositeIdentifier) identifier);
+                case COMPUTATIONAL_RESOURCE_SCHEDULING:
+                    return experimentRegistry.isComputationalSchedulingExist(dataType, (String) identifier);
+                case ADVANCE_INPUT_DATA_HANDLING:
+                    return experimentRegistry.isInputDataHandlingExist(dataType, (String) identifier);
+                case ADVANCE_OUTPUT_DATA_HANDLING:
+                    return experimentRegistry.isOutputDataHandlingExist(dataType, (String) identifier);
+                case QOS_PARAM:
+                    return experimentRegistry.isQOSParamsExist(dataType, (String) identifier);
+                default:
+                    logger.error("Unsupported data type...", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+        } catch (Exception e) {
+            logger.error("Error while checking existence of the resource " + dataType.toString(), new RegistryException(e));
+            throw new RegistryException("Error while checking existence of the resource " + dataType.toString(), e);
+        }
+    }
+
+}


[03/44] airavata git commit: Changing the thrift model variable names to lower camel case

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
index c0784fb..6059e0a 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
@@ -112,13 +112,13 @@ public class GSISSHProvider extends AbstractProvider {
             String jobID = cluster.submitBatchJob(jobDescriptor);
             jobExecutionContext.setJobDetails(jobDetails);
             if (jobID == null) {
-                jobDetails.setJobID("none");
+                jobDetails.setJobId("none");
                 GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED, monitorPublisher);
             } else {
-                jobDetails.setJobID(jobID.split("\\.")[0]);
+                jobDetails.setJobId(jobID.split("\\.")[0]);
                 GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.SUBMITTED, monitorPublisher);
             }
-            data.append(",jobId=").append(jobDetails.getJobID());
+            data.append(",jobId=").append(jobDetails.getJobId());
 
             // Now job has submitted to the resource, its up to the Provider to parse the information to daemon handler
             // to perform monitoring, daemon handlers can be accessed from anywhere
@@ -127,7 +127,7 @@ public class GSISSHProvider extends AbstractProvider {
         } catch (Exception e) {
 		    String error = "Error submitting the job to host " + computeResourceDescription.getHostName() + " message: " + e.getMessage();
             log.error(error);
-            jobDetails.setJobID("none");
+            jobDetails.setJobId("none");
             GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED, monitorPublisher);
             StringWriter errors = new StringWriter();
             e.printStackTrace(new PrintWriter(errors));
@@ -201,9 +201,9 @@ public class GSISSHProvider extends AbstractProvider {
                 log.error("There is not JobDetails so cancelations cannot perform !!!");
                 return false;
             }
-            if (jobDetails.getJobID() != null) {
+            if (jobDetails.getJobId() != null) {
                 // if this operation success without any exceptions, we can assume cancel operation succeeded.
-                cluster.cancelJob(jobDetails.getJobID());
+                cluster.cancelJob(jobDetails.getJobId());
             } else {
                 log.error("No Job Id is set, so cannot perform the cancel operation !!!");
                 return false;
@@ -214,14 +214,14 @@ public class GSISSHProvider extends AbstractProvider {
         } catch (SSHApiException e) {
             String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
             log.error(error);
-            jobDetails.setJobID("none");
+            jobDetails.setJobId("none");
             GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED, monitorPublisher);
             GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
             throw new GFacProviderException(error, e);
         } catch (Exception e) {
             String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
             log.error(error);
-            jobDetails.setJobID("none");
+            jobDetails.setJobId("none");
             GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED, monitorPublisher);
             GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
             throw new GFacProviderException(error, e);
@@ -230,7 +230,7 @@ public class GSISSHProvider extends AbstractProvider {
 
     public void recover(JobExecutionContext jobExecutionContext) throws GFacProviderException,GFacException {
         // have to implement the logic to recover a gfac failure
-        log.info("Invoking Recovering for the Experiment: " + jobExecutionContext.getExperimentID());
+        log.info("Invoking Recovering for the Experiment: " + jobExecutionContext.getExperimentId());
         ComputeResourceDescription computeResourceDescription = jobExecutionContext.getApplicationContext()
                 .getComputeResourceDescription();
         String hostName = jobExecutionContext.getHostName();
@@ -275,7 +275,7 @@ public class GSISSHProvider extends AbstractProvider {
             // Now we are we have enough data to recover
             JobDetails jobDetails = new JobDetails();
             jobDetails.setJobDescription(jobDesc);
-            jobDetails.setJobID(jobId);
+            jobDetails.setJobId(jobId);
             jobExecutionContext.setJobDetails(jobDetails);
             if (jobExecutionContext.getSecurityContext(hostName) == null) {
                 try {
@@ -323,7 +323,7 @@ public class GSISSHProvider extends AbstractProvider {
         ThreadedHandler pullMonitorHandler = null;
         ThreadedHandler pushMonitorHandler = null;
         MonitorMode monitorMode = sshJobSubmission.getMonitorMode();
-        String jobID = jobExecutionContext.getJobDetails().getJobID();
+        String jobID = jobExecutionContext.getJobDetails().getJobId();
         for (ThreadedHandler threadedHandler : daemonHandlers) {
             if ("org.apache.airavata.gfac.monitor.handlers.GridPullMonitorHandler".equals(threadedHandler.getClass().getName())) {
                 pullMonitorHandler = threadedHandler;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
index 0428bc0..85f7f8e 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
@@ -282,7 +282,7 @@ public class GFACGSISSHUtils {
         ComputationalResourceScheduling taskScheduling = taskData.getTaskScheduling();
         if (taskScheduling != null) {
             int totalNodeCount = taskScheduling.getNodeCount();
-            int totalCPUCount = taskScheduling.getTotalCPUCount();
+            int totalCPUCount = taskScheduling.getTotalCpuCount();
 
 //        jobDescriptor.setJobSubmitter(applicationDeploymentType.getJobSubmitterCommand());
             if (taskScheduling.getComputationalProjectAccount() != null) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java b/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
index 630cd5c..a7a4767 100644
--- a/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
+++ b/modules/gfac/gfac-gsissh/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
@@ -221,9 +221,9 @@
 //    @Test
 //    public void testGSISSHProvider() throws GFacException {
 //        BetterGfacImpl gFacAPI = new BetterGfacImpl();
-//        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+//        gFacAPI.submitJob(jobExecutionContext.getExperimentId(), jobExecutionContext.getTaskData().getTaskId(), jobExecutionContext.getGatewayID());
 //        System.out.println(jobExecutionContext.getJobDetails().getJobDescription());
-//        System.out.println(jobExecutionContext.getJobDetails().getJobID());
+//        System.out.println(jobExecutionContext.getJobDetails().getJobId());
 //    }
 //
 //}

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java b/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
index ef66171..99f7e23 100644
--- a/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
+++ b/modules/gfac/gfac-local/src/main/java/org/apache/airavata/gfac/local/provider/impl/LocalProvider.java
@@ -131,8 +131,8 @@ public class LocalProvider extends AbstractProvider {
         jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
         JobDetails jobDetails = new JobDetails();
         try {
-        	jobId = jobExecutionContext.getTaskData().getTaskID();
-            jobDetails.setJobID(jobId);
+        	jobId = jobExecutionContext.getTaskData().getTaskId();
+            jobDetails.setJobId(jobId);
             jobDetails.setJobDescription(jobExecutionContext.getApplicationContext()
                     .getApplicationDeploymentDescription().getAppDeploymentDescription());
             jobExecutionContext.setJobDetails(jobDetails);
@@ -175,10 +175,10 @@ public class LocalProvider extends AbstractProvider {
 
             // updating the job status to complete because there's nothing to monitor in local jobs
 //            MonitorID monitorID = createMonitorID(jobExecutionContext);
-            JobIdentifier jobIdentity = new JobIdentifier(jobExecutionContext.getJobDetails().getJobID(),
-                    jobExecutionContext.getTaskData().getTaskID(),
+            JobIdentifier jobIdentity = new JobIdentifier(jobExecutionContext.getJobDetails().getJobId(),
+                    jobExecutionContext.getTaskData().getTaskId(),
                     jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                    jobExecutionContext.getExperimentID(),
+                    jobExecutionContext.getExperimentId(),
                     jobExecutionContext.getGatewayID());
             this.getMonitorPublisher().publish(new JobStatusChangeEvent(JobState.COMPLETE, jobIdentity));
         } catch (IOException io) {
@@ -192,8 +192,8 @@ public class LocalProvider extends AbstractProvider {
 
 //	private MonitorID createMonitorID(JobExecutionContext jobExecutionContext) {
 //		MonitorID monitorID = new MonitorID(jobExecutionContext.getApplicationContext().getHostDescription(), jobId,
-//		        jobExecutionContext.getTaskData().getTaskID(),
-//		        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getExperimentID(),
+//		        jobExecutionContext.getTaskData().getTaskId(),
+//		        jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(), jobExecutionContext.getExperimentId(),
 //		        jobExecutionContext.getExperiment().getUserName(),jobId);
 //		return monitorID;
 //	}
@@ -226,15 +226,15 @@ public class LocalProvider extends AbstractProvider {
             String stdErrStr = GFacUtils.readFileToString(jobExecutionContext.getStandardError());
 			Map<String, Object> output = jobExecutionContext.getOutMessageContext().getParameters();
             OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr, outputArray);
-            TaskDetails taskDetails = (TaskDetails)registry.get(RegistryModelType.TASK_DETAIL, jobExecutionContext.getTaskData().getTaskID());
+            TaskDetails taskDetails = (TaskDetails)registry.get(RegistryModelType.TASK_DETAIL, jobExecutionContext.getTaskData().getTaskId());
             if (taskDetails != null){
                 taskDetails.setApplicationOutputs(outputArray);
-                registry.update(RegistryModelType.TASK_DETAIL, taskDetails, taskDetails.getTaskID());
+                registry.update(RegistryModelType.TASK_DETAIL, taskDetails, taskDetails.getTaskId());
             }
-            registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
-            TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskID(),
+            registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentId());
+            TaskIdentifier taskIdentity = new TaskIdentifier(jobExecutionContext.getTaskData().getTaskId(),
                     jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                    jobExecutionContext.getExperimentID(),
+                    jobExecutionContext.getExperimentId(),
                     jobExecutionContext.getGatewayID());
             getMonitorPublisher().publish(new TaskOutputChangeEvent(outputArray, taskIdentity));
         } catch (XmlException e) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java b/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
index aeb8158..cb311ce 100644
--- a/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
+++ b/modules/gfac/gfac-local/src/test/java/org/apache/airavata/core/gfac/services/impl/LocalProviderTest.java
@@ -149,11 +149,11 @@
 //
 //        jobExecutionContext.setOutMessageContext(outMessage);
 //
-//        jobExecutionContext.setExperimentID("test123");
+//        jobExecutionContext.setExperimentId("test123");
 //        jobExecutionContext.setExperiment(new Experiment("test123","project1","admin","testExp"));
-//        jobExecutionContext.setTaskData(new TaskDetails(jobExecutionContext.getExperimentID()));
+//        jobExecutionContext.setTaskData(new TaskDetails(jobExecutionContext.getExperimentId()));
 //        jobExecutionContext.setRegistry(new LoggingRegistryImpl());
-//        jobExecutionContext.setWorkflowNodeDetails(new WorkflowNodeDetails(jobExecutionContext.getExperimentID(),"none", ExecutionUnit.APPLICATION));
+//        jobExecutionContext.setWorkflowNodeDetails(new WorkflowNodeDetails(jobExecutionContext.getExperimentId(),"none", ExecutionUnit.APPLICATION));
 //
 //
 //    }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java b/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
index 0c94daa..5c159a4 100644
--- a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
+++ b/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
@@ -93,7 +93,7 @@ public class EmailBasedMonitor implements Runnable{
     }
 
     public void addToJobMonitorMap(JobExecutionContext jobExecutionContext) {
-        String monitorId = jobExecutionContext.getJobDetails().getJobID();
+        String monitorId = jobExecutionContext.getJobDetails().getJobId();
         if (monitorId == null || monitorId.isEmpty()) {
             monitorId = jobExecutionContext.getJobDetails().getJobName();
         }
@@ -300,10 +300,10 @@ public class EmailBasedMonitor implements Runnable{
 
     private void publishJobStatusChange(JobExecutionContext jobExecutionContext) {
         JobStatusChangeRequestEvent jobStatus = new JobStatusChangeRequestEvent();
-        JobIdentifier jobIdentity = new JobIdentifier(jobExecutionContext.getJobDetails().getJobID(),
-                jobExecutionContext.getTaskData().getTaskID(),
+        JobIdentifier jobIdentity = new JobIdentifier(jobExecutionContext.getJobDetails().getJobId(),
+                jobExecutionContext.getTaskData().getTaskId(),
                 jobExecutionContext.getWorkflowNodeDetails().getNodeInstanceId(),
-                jobExecutionContext.getExperimentID(),
+                jobExecutionContext.getExperimentId(),
                 jobExecutionContext.getGatewayID());
         jobStatus.setJobIdentity(jobIdentity);
         jobStatus.setState(jobExecutionContext.getJobDetails().getJobStatus().getJobState());

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
index ae463a7..3cc3c83 100644
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/HPCMonitorID.java
@@ -47,9 +47,9 @@ public class HPCMonitorID extends MonitorID {
         setComputeResourceDescription(computeResourceDescription);
         setJobStartedTime(new Timestamp((new Date()).getTime()));
         setUserName(userName);
-        setJobID(jobID);
-        setTaskID(taskID);
-        setExperimentID(experimentID);
+        setJobId(jobID);
+        setTaskId(taskID);
+        setExperimentId(experimentID);
         setWorkflowNodeID(workflowNodeID);
     }
 
@@ -91,9 +91,9 @@ public class HPCMonitorID extends MonitorID {
                 setUserName(((MyProxyAuthenticationInfo) this.authenticationInfo).getUserName());
             }
         }
-        setJobID(jobID);
-        setTaskID(taskID);
-        setExperimentID(experimentID);
+        setJobId(jobID);
+        setTaskId(taskID);
+        setExperimentId(experimentID);
         setWorkflowNodeID(workflowNodeID);
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
index 2476c85..822cf63 100644
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/handlers/GridPullMonitorHandler.java
@@ -89,7 +89,7 @@ public class GridPullMonitorHandler extends ThreadedHandler implements Watcher{
         try {
            /* ZooKeeper zk = jobExecutionContext.getZk();
             try {
-                String experimentEntry = GFacUtils.findExperimentEntry(jobExecutionContext.getExperimentID(), zk);
+                String experimentEntry = GFacUtils.findExperimentEntry(jobExecutionContext.getExperimentId(), zk);
                 String path = experimentEntry + File.separator + "operation";
                 Stat exists = zk.exists(path, this);
                 if (exists != null) {
@@ -103,8 +103,8 @@ public class GridPullMonitorHandler extends ThreadedHandler implements Watcher{
             CommonUtils.addMonitortoQueue(hpcPullMonitor.getQueue(), monitorID, jobExecutionContext);
             CommonUtils.increaseZkJobCount(monitorID); // update change job count to zookeeper
         } catch (AiravataMonitorException e) {
-            logger.errorId(monitorID.getJobID(), "Error adding job {} monitorID object to the queue with experiment {}",
-                    monitorID.getJobID(),  monitorID.getExperimentID());
+            logger.errorId(monitorID.getJobId(), "Error adding job {} monitorID object to the queue with experiment {}",
+                    monitorID.getJobId(),  monitorID.getExperimentId());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
index 3442367..d4e5929 100644
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
@@ -185,15 +185,15 @@ public class HPCPullMonitor extends PullMonitor {
                         MonitorID iMonitorID = monitorIDListIterator.next();
                         while (iterator1.hasNext()) {
                             String cancelMId = iterator1.next();
-                            if (cancelMId.equals(iMonitorID.getExperimentID() + "+" + iMonitorID.getTaskID())) {
+                            if (cancelMId.equals(iMonitorID.getExperimentId() + "+" + iMonitorID.getTaskId())) {
                                 iMonitorID.setStatus(JobState.CANCELED);
 //                                CommonUtils.removeMonitorFromQueue(take, iMonitorID);
                                 removeList.add(iMonitorID);
                                 logger.debugId(cancelMId, "Found a match in cancel monitor queue, hence moved to the " +
                                                 "completed job queue, experiment {}, task {} , job {}",
-                                        iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobID());
+                                        iMonitorID.getExperimentId(), iMonitorID.getTaskId(), iMonitorID.getJobId());
                                 logger.info("Job cancelled: marking the Job as ************CANCELLED************ experiment {}, task {}, job name {} .",
-                                        iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
+                                        iMonitorID.getExperimentId(), iMonitorID.getTaskId(), iMonitorID.getJobName());
                                 sendNotification(iMonitorID);
                                 logger.info("To avoid timing issues we sleep sometime and try to retrieve output files");
                                 Thread.sleep(10000);
@@ -217,10 +217,10 @@ public class HPCPullMonitor extends PullMonitor {
 //                                    CommonUtils.removeMonitorFromQueue(take, iMonitorID);//we have to make this empty everytime we iterate, otherwise this list will accumulate and will lead to a memory leak
                                     removeList.add(iMonitorID);
                                     logger.debugId(completeId, "Push notification updated job {} status to {}. " +
-                                                    "experiment {} , task {}.", iMonitorID.getJobID(), JobState.COMPLETE.toString(),
-                                            iMonitorID.getExperimentID(), iMonitorID.getTaskID());
+                                                    "experiment {} , task {}.", iMonitorID.getJobId(), JobState.COMPLETE.toString(),
+                                            iMonitorID.getExperimentId(), iMonitorID.getTaskId());
                                     logger.info("AMQP message recieved: marking the Job as ************COMPLETE************ experiment {}, task {}, job name {} .",
-                                            iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
+                                            iMonitorID.getExperimentId(), iMonitorID.getTaskId(), iMonitorID.getJobName());
 
                                     sendNotification(iMonitorID);
                                     logger.info("To avoid timing issues we sleep sometime and try to retrieve output files");
@@ -242,17 +242,17 @@ public class HPCPullMonitor extends PullMonitor {
                         currentMonitorID = iMonitorID;
                         if (!JobState.CANCELED.equals(iMonitorID.getStatus()) &&
                                 !JobState.COMPLETE.equals(iMonitorID.getStatus())) {
-                            iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobID() + "," + iMonitorID.getJobName()));    //IMPORTANT this is NOT a simple setter we have a logic
+                            iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobId() + "," + iMonitorID.getJobName()));    //IMPORTANT this is NOT a simple setter we have a logic
                         } else if (JobState.COMPLETE.equals(iMonitorID.getStatus())) {
-                            logger.debugId(iMonitorID.getJobID(), "Moved job {} to completed jobs map, experiment {}, " +
-                                    "task {}", iMonitorID.getJobID(), iMonitorID.getExperimentID(), iMonitorID.getTaskID());
+                            logger.debugId(iMonitorID.getJobId(), "Moved job {} to completed jobs map, experiment {}, " +
+                                    "task {}", iMonitorID.getJobId(), iMonitorID.getExperimentId(), iMonitorID.getTaskId());
 //                            CommonUtils.removeMonitorFromQueue(take, iMonitorID);
                             removeList.add(iMonitorID);
                             logger.info("PULL Notification is complete: marking the Job as ************COMPLETE************ experiment {}, task {}, job name {} .",
-                                    iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
+                                    iMonitorID.getExperimentId(), iMonitorID.getTaskId(), iMonitorID.getJobName());
                             GFacThreadPoolExecutor.getCachedThreadPool().execute(new OutHandlerWorker(gfac, iMonitorID, publisher));
                         }
-                        iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobID() + "," + iMonitorID.getJobName()));    //IMPORTANT this is not a simple setter we have a logic
+                        iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobId() + "," + iMonitorID.getJobName()));    //IMPORTANT this is not a simple setter we have a logic
                         iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
                         sendNotification(iMonitorID);
                         // if the job is completed we do not have to put the job to the queue again
@@ -280,11 +280,11 @@ public class HPCPullMonitor extends PullMonitor {
                             }
                             if (stdOut != null && stdOut.size() > 0 && !stdOut.get(0).isEmpty()) { // have to be careful with this
                                 iMonitorID.setStatus(JobState.COMPLETE);
-                                logger.errorId(iMonitorID.getJobID(), "Job monitoring failed {} times, " +
+                                logger.errorId(iMonitorID.getJobId(), "Job monitoring failed {} times, " +
                                                 " Experiment {} , task {}", iMonitorID.getFailedCount(),
-                                        iMonitorID.getExperimentID(), iMonitorID.getTaskID());
+                                        iMonitorID.getExperimentId(), iMonitorID.getTaskId());
                                 logger.info("Listing directory came as complete: marking the Job as ************COMPLETE************ experiment {}, task {}, job name {} .",
-                                        iMonitorID.getExperimentID(), iMonitorID.getTaskID(), iMonitorID.getJobName());
+                                        iMonitorID.getExperimentId(), iMonitorID.getTaskId(), iMonitorID.getJobName());
                                 sendNotification(iMonitorID);
 //                                CommonUtils.removeMonitorFromQueue(take, iMonitorID);
                                 removeList.add(iMonitorID);
@@ -331,7 +331,7 @@ public class HPCPullMonitor extends PullMonitor {
                     e1.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                 }
             }
-            logger.error("Error handling the job with Job ID:" + currentMonitorID.getJobID());
+            logger.error("Error handling the job with Job ID:" + currentMonitorID.getJobId());
             throw new AiravataMonitorException(e);
         } catch (SSHApiException e) {
             logger.error(e.getMessage());
@@ -340,10 +340,10 @@ public class HPCPullMonitor extends PullMonitor {
                 jobStatus.setState(JobState.UNKNOWN);
                 JobIdentifier jobIdentifier = new JobIdentifier("UNKNOWN", "UNKNOWN", "UNKNOWN", "UNKNOWN", "UNKNOWN");
                 if (currentMonitorID != null){
-                    jobIdentifier.setExperimentId(currentMonitorID.getExperimentID());
-                    jobIdentifier.setTaskId(currentMonitorID.getTaskID());
+                    jobIdentifier.setExperimentId(currentMonitorID.getExperimentId());
+                    jobIdentifier.setTaskId(currentMonitorID.getTaskId());
                     jobIdentifier.setWorkflowNodeId(currentMonitorID.getWorkflowNodeID());
-                    jobIdentifier.setJobId(currentMonitorID.getJobID());
+                    jobIdentifier.setJobId(currentMonitorID.getJobId());
                     jobIdentifier.setGatewayId(currentMonitorID.getJobExecutionContext().getGatewayID());
                 }
                 jobStatus.setJobIdentity(jobIdentifier);
@@ -371,10 +371,10 @@ public class HPCPullMonitor extends PullMonitor {
 
     private void sendNotification(MonitorID iMonitorID) {
         JobStatusChangeRequestEvent jobStatus = new JobStatusChangeRequestEvent();
-        JobIdentifier jobIdentity = new JobIdentifier(iMonitorID.getJobID(),
-                iMonitorID.getTaskID(),
+        JobIdentifier jobIdentity = new JobIdentifier(iMonitorID.getJobId(),
+                iMonitorID.getTaskId(),
                 iMonitorID.getWorkflowNodeID(),
-                iMonitorID.getExperimentID(),
+                iMonitorID.getExperimentId(),
                 iMonitorID.getJobExecutionContext().getGatewayID());
         jobStatus.setJobIdentity(jobIdentity);
         jobStatus.setState(iMonitorID.getStatus());
@@ -463,7 +463,7 @@ public class HPCPullMonitor extends PullMonitor {
                 CommonUtils.removeMonitorFromQueue(userMonitorData, iMonitorId);
             } catch (AiravataMonitorException e) {
                 logger.error(e.getMessage(), e);
-                logger.error("Error deleting the monitor data: " + iMonitorId.getJobID());
+                logger.error("Error deleting the monitor data: " + iMonitorId.getJobId());
             }
         }
         removeList.clear();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
index f718535..1c32c11 100644
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/ResourceConnection.java
@@ -85,7 +85,7 @@ public class ResourceConnection {
     }
 
     public JobState getJobStatus(MonitorID monitorID) throws SSHApiException {
-        String jobID = monitorID.getJobID();
+        String jobID = monitorID.getJobId();
         //todo so currently we execute the qstat for each job but we can use user based monitoring
         //todo or we should concatenate all the commands and execute them in one go and parseSingleJob the response
         return getStatusFromString(cluster.getJobStatus(jobID).toString());
@@ -97,7 +97,7 @@ public class ResourceConnection {
         // creating a sorted map with all the jobIds and with the predefined
         // status as UNKNOWN
         for (MonitorID monitorID : monitorIDs) {
-            treeMap.put(monitorID.getJobID()+","+monitorID.getJobName(), JobStatus.U);
+            treeMap.put(monitorID.getJobId()+","+monitorID.getJobName(), JobStatus.U);
         }
         String userName = cluster.getServerInfo().getUserName();
         //todo so currently we execute the qstat for each job but we can use user based monitoring

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java
index de8cd8c..0b37cb6 100644
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/push/amqp/AMQPMonitor.java
@@ -135,7 +135,7 @@ public class AMQPMonitor extends PushMonitor {
                 }
             }
         } else {
-            throw new AiravataMonitorException("Couldn't register monitor for jobId :" + monitorID.getJobID() +
+            throw new AiravataMonitorException("Couldn't register monitor for jobId :" + monitorID.getJobId() +
                     " , ComputeResourceDescription " + computeResourceDescription.getHostName() + " doesn't has an " +
                     "IpAddress with it");
         }
@@ -174,7 +174,7 @@ public class AMQPMonitor extends PushMonitor {
         MonitorID next = null;
         while(iterator.hasNext()){
             next = iterator.next();
-            if(next.getJobID().endsWith(monitorID.getJobID())){
+            if(next.getJobId().endsWith(monitorID.getJobId())){
                 break;
             }
         }
@@ -209,10 +209,10 @@ public class AMQPMonitor extends PushMonitor {
             }
         }
         next.setStatus(monitorID.getStatus());
-        JobIdentifier jobIdentity = new JobIdentifier(next.getJobID(),
-                                                     next.getTaskID(),
+        JobIdentifier jobIdentity = new JobIdentifier(next.getJobId(),
+                                                     next.getTaskId(),
                                                      next.getWorkflowNodeID(),
-                                                     next.getExperimentID(),
+                                                     next.getExperimentId(),
                                                      next.getJobExecutionContext().getGatewayID());
         publisher.publish(new JobStatusChangeEvent(next.getStatus(),jobIdentity));
         return true;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
index 15b7241..98c7367 100644
--- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
+++ b/modules/gfac/gfac-monitor/gfac-hpc-monitor/src/main/java/org/apache/airavata/gfac/monitor/util/CommonUtils.java
@@ -75,8 +75,8 @@ public class CommonUtils {
                         if (isEqual(host.getComputeResourceDescription(), monitorID.getComputeResourceDescription())) {
                             // ok we found right place to add this monitorID
                             host.addMonitorIDForHost(monitorID);
-                            logger.debugId(monitorID.getJobID(), "Added new job to the monitoring queue, experiment {}," +
-                                    " task {}", monitorID.getExperimentID(), monitorID.getTaskID());
+                            logger.debugId(monitorID.getJobId(), "Added new job to the monitoring queue, experiment {}," +
+                                    " task {}", monitorID.getExperimentId(), monitorID.getTaskId());
                             return;
                         }
                     }
@@ -85,8 +85,8 @@ public class CommonUtils {
                     HostMonitorData hostMonitorData = new HostMonitorData(jobExecutionContext);
                     hostMonitorData.addMonitorIDForHost(monitorID);
                     next.addHostMonitorData(hostMonitorData);
-                    logger.debugId(monitorID.getJobID(), "Added new job to the monitoring queue, experiment {}," +
-                            " task {}", monitorID.getExperimentID(), monitorID.getTaskID());
+                    logger.debugId(monitorID.getJobId(), "Added new job to the monitoring queue, experiment {}," +
+                            " task {}", monitorID.getExperimentId(), monitorID.getTaskId());
                     return;
                 }
             }
@@ -97,8 +97,8 @@ public class CommonUtils {
             userMonitorData.addHostMonitorData(hostMonitorData);
             try {
                 queue.put(userMonitorData);
-                logger.debugId(monitorID.getJobID(), "Added new job to the monitoring queue, experiment {}," +
-                        " task {}", monitorID.getExperimentID(), monitorID.getTaskID());
+                logger.debugId(monitorID.getJobId(), "Added new job to the monitoring queue, experiment {}," +
+                        " task {}", monitorID.getExperimentId(), monitorID.getTaskId());
             } catch (InterruptedException e) {
                 throw new AiravataMonitorException(e);
             }
@@ -138,13 +138,13 @@ public class CommonUtils {
                             Iterator<MonitorID> iterator2 = iHostMonitorID.getMonitorIDs().iterator();
                             while (iterator2.hasNext()) {
                                 MonitorID iMonitorID = iterator2.next();
-                                if (iMonitorID.getJobID().equals(monitorID.getJobID())
+                                if (iMonitorID.getJobId().equals(monitorID.getJobId())
                                         || iMonitorID.getJobName().equals(monitorID.getJobName())) {
                                     // OK we found the object, we cannot do list.remove(object) states of two objects
                                     // could be different, thats why we check the jobID
                                     iterator2.remove();
-                                    logger.infoId(monitorID.getJobID(), "Removed the jobId: {} JobName: {} from monitoring last " +
-                                            "status:{}", monitorID.getJobID(),monitorID.getJobName(), monitorID.getStatus().toString());
+                                    logger.infoId(monitorID.getJobId(), "Removed the jobId: {} JobName: {} from monitoring last " +
+                                            "status:{}", monitorID.getJobId(),monitorID.getJobName(), monitorID.getStatus().toString());
 
                                     return;
                                 }
@@ -153,7 +153,7 @@ public class CommonUtils {
                     }
                 }
         logger.info("Cannot find the given MonitorID in the queue with userName " +
-                monitorID.getUserName() + "  and jobID " + monitorID.getJobID());
+                monitorID.getUserName() + "  and jobID " + monitorID.getJobId());
         logger.info("This might not be an error because someone else removed this job from the queue");
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
index 46f1dc3..bdf4f36 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
@@ -121,7 +121,7 @@ public class AdvancedSCPInputHandler extends AbstractHandler {
             }
 
             // Server info
-            String parentPath = inputPath + File.separator + jobExecutionContext.getExperimentID() + File.separator + jobExecutionContext.getTaskData().getTaskID();
+            String parentPath = inputPath + File.separator + jobExecutionContext.getExperimentId() + File.separator + jobExecutionContext.getTaskData().getTaskId();
             if (index < oldIndex) {
                 parentPath = oldFiles.get(index);
                 data.append(oldFiles.get(index++)).append(","); // we get already transfered file and increment the index
@@ -166,7 +166,7 @@ public class AdvancedSCPInputHandler extends AbstractHandler {
                         status.setTransferState(TransferState.UPLOAD);
                         detail.setTransferStatus(status);
                         detail.setTransferDescription("Input Data Staged: " + stageInputFile);
-                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
 
                         GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
                     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
index 0a2aa8d..b034f73 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
@@ -136,7 +136,7 @@ public class AdvancedSCPOutputHandler extends AbstractHandler {
             String key = GFACSSHUtils.prepareSecurityContext(jobExecutionContext, authenticationInfo, this.userName, this.hostName, DEFAULT_SSH_PORT);
             pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(key)).getPbsCluster();
             if(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() != null && !jobExecutionContext.getTaskData().getAdvancedOutputDataHandling().isPersistOutputData()){
-            outputPath = outputPath + File.separator + jobExecutionContext.getExperimentID() + "-" + jobExecutionContext.getTaskData().getTaskID()
+            outputPath = outputPath + File.separator + jobExecutionContext.getExperimentId() + "-" + jobExecutionContext.getTaskData().getTaskId()
                     + File.separator;
                 pbsCluster.makeDirectory(outputPath);
             }
@@ -194,7 +194,7 @@ public class AdvancedSCPOutputHandler extends AbstractHandler {
                     outputArray.add(dataObjectType);
                 }
              }
-           registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
+           registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentId());
         } catch (SSHApiException e) {
             try {
                 StringWriter errors = new StringWriter();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java
index 93d0ed0..92b7524 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/NewSSHOutputHandler.java
@@ -56,7 +56,7 @@ public class NewSSHOutputHandler extends AbstractHandler{
 	        super.invoke(jobExecutionContext);
 	        List<OutputDataObjectType> outputArray =  HandleOutputs.handleOutputs(jobExecutionContext, cluster);
 	        try {
-				registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
+				registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentId());
 			} catch (RegistryException e) {
 				throw new GFacHandlerException(e);
 			}

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
index a985bd3..bfcaab3 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java
@@ -92,7 +92,7 @@ public class SSHDirectorySetupHandler extends AbstractHandler {
             detail.setTransferStatus(status);
             detail.setTransferDescription("Working directory = " + workingDirectory);
 
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
 
         } catch (Exception e) {
 			DataTransferDetails detail = new DataTransferDetails();
@@ -101,7 +101,7 @@ public class SSHDirectorySetupHandler extends AbstractHandler {
             detail.setTransferStatus(status);
             detail.setTransferDescription("Working directory = " + jobExecutionContext.getWorkingDir());
             try {
-                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
                 StringWriter errors = new StringWriter();
                 e.printStackTrace(new PrintWriter(errors));
                 GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
index b2210a9..be7b8e2 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHInputHandler.java
@@ -108,7 +108,7 @@ public class SSHInputHandler extends AbstractHandler {
                         status.setTransferState(TransferState.UPLOAD);
                         detail.setTransferStatus(status);
                         detail.setTransferDescription("Input Data Staged: " + stageInputFile);
-                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
 
                         GFacUtils.saveHandlerData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
                     }
@@ -126,7 +126,7 @@ public class SSHInputHandler extends AbstractHandler {
 //                        status.setTransferState(TransferState.UPLOAD);
 //                        detail.setTransferStatus(status);
 //                        detail.setTransferDescription("Input Data Staged: " + stageInputFiles);
-//                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+//                        registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
 //                        newFiles.add(stageInputFiles);
 //                        StringBuffer temp = new StringBuffer(data.append(stageInputFiles).append(",").toString());
 //                        GFacUtils.savePluginData(jobExecutionContext, temp.insert(0, ++index), this.getClass().getName());
@@ -144,7 +144,7 @@ public class SSHInputHandler extends AbstractHandler {
                 StringWriter errors = new StringWriter();
                 e.printStackTrace(new PrintWriter(errors));
                 GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);
-                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
             } catch (Exception e1) {
                 throw new GFacHandlerException("Error persisting status", e1, e1.getLocalizedMessage());
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
index f9eb1ef..29805ad 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
@@ -87,7 +87,7 @@ public class SSHOutputHandler extends AbstractHandler {
             }
 
             // Get the Stdouts and StdErrs
-            String timeStampedExperimentID = GFacUtils.createUniqueNameWithDate(jobExecutionContext.getExperimentID());
+            String timeStampedExperimentID = GFacUtils.createUniqueNameWithDate(jobExecutionContext.getExperimentId());
 
             TaskDetails taskData = jobExecutionContext.getTaskData();
             String outputDataDir = null;
@@ -100,7 +100,7 @@ public class SSHOutputHandler extends AbstractHandler {
             if (outputDataDir == null) {
                 outputDataDir = File.separator + "tmp";
             }
-            outputDataDir = outputDataDir + File.separator + jobExecutionContext.getExperimentID() + "-" + jobExecutionContext.getTaskData().getTaskID();
+            outputDataDir = outputDataDir + File.separator + jobExecutionContext.getExperimentId() + "-" + jobExecutionContext.getTaskData().getTaskId();
             (new File(outputDataDir)).mkdirs();
 
 
@@ -128,12 +128,12 @@ public class SSHOutputHandler extends AbstractHandler {
             status.setTransferState(TransferState.STDOUT_DOWNLOAD);
             detail.setTransferStatus(status);
             detail.setTransferDescription("STDOUT:" + localStdOutFile.getAbsolutePath());
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
 
             status.setTransferState(TransferState.STDERROR_DOWNLOAD);
             detail.setTransferStatus(status);
             detail.setTransferDescription("STDERR:" + localStdErrFile.getAbsolutePath());
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
 
 
             List<OutputDataObjectType> outputArray = new ArrayList<OutputDataObjectType>();
@@ -224,14 +224,14 @@ public class SSHOutputHandler extends AbstractHandler {
             status.setTransferState(TransferState.DOWNLOAD);
             detail.setTransferStatus(status);
             detail.setTransferDescription(outputDataDir);
-            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
-            registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());
+            registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
+            registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentId());
 
         } catch (Exception e) {
             try {
                 status.setTransferState(TransferState.FAILED);
                 detail.setTransferStatus(status);
-                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
+                registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskId());
                 StringWriter errors = new StringWriter();
                 e.printStackTrace(new PrintWriter(errors));
                 GFacUtils.saveErrorDetails(jobExecutionContext,  errors.toString(), CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.FILE_SYSTEM_FAILURE);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
index 19ea3ac..11e1bb7 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
@@ -92,7 +92,7 @@ public class SSHProvider extends AbstractProvider {
             if (jobExecutionContext.getSecurityContext(hostAddress) == null) {
                 GFACSSHUtils.addSecurityContext(jobExecutionContext);
             }
-            taskID = jobExecutionContext.getTaskData().getTaskID();
+            taskID = jobExecutionContext.getTaskData().getTaskId();
 
             JobSubmissionProtocol preferredJobSubmissionProtocol = jobExecutionContext.getPreferredJobSubmissionProtocol();
             if (preferredJobSubmissionProtocol == JobSubmissionProtocol.SSH && resourceJobManagerType == ResourceJobManagerType.FORK) {
@@ -100,7 +100,7 @@ public class SSHProvider extends AbstractProvider {
                 cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(hostAddress)).getPbsCluster();
 
                 String remoteFile = jobExecutionContext.getWorkingDir() + File.separatorChar + Constants.EXECUTABLE_NAME;
-                details.setJobID(taskID);
+                details.setJobId(taskID);
                 details.setJobDescription(remoteFile);
                 jobExecutionContext.setJobDetails(details);
                 // FIXME : Why cluster is passed as null
@@ -164,7 +164,7 @@ public class SSHProvider extends AbstractProvider {
                     jobDetails.setJobDescription(jobDescriptor.toXML());
                     String jobID = cluster.submitBatchJob(jobDescriptor);
                     if (jobID != null && !jobID.isEmpty()) {
-                        jobDetails.setJobID(jobID);
+                        jobDetails.setJobId(jobID);
                         GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.SUBMITTED, monitorPublisher);
                         monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
                                 , GfacExperimentState.JOBSUBMITTED));
@@ -180,7 +180,7 @@ public class SSHProvider extends AbstractProvider {
                         if (verifyJobId != null && !verifyJobId.isEmpty()) {
                             // JobStatus either changed from SUBMITTED to QUEUED or directly to QUEUED
                             jobID = verifyJobId;
-                            jobDetails.setJobID(jobID);
+                            jobDetails.setJobId(jobID);
                             monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext)
                                     , GfacExperimentState.JOBSUBMITTED));
                             GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.QUEUED, monitorPublisher);
@@ -188,24 +188,24 @@ public class SSHProvider extends AbstractProvider {
                     }
 
                     if (jobID == null || jobID.isEmpty()) {
-                        log.error("Couldn't find remote jobId for JobName:" + jobDetails.getJobName() + ", ExperimentId:" + jobExecutionContext.getExperimentID());
-                        GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentID(), ExperimentState.FAILED);
+                        log.error("Couldn't find remote jobId for JobName:" + jobDetails.getJobName() + ", ExperimentId:" + jobExecutionContext.getExperimentId());
+                        GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentId(), ExperimentState.FAILED);
                         return;
                     }
                     data.append("jobDesc=").append(jobDescriptor.toXML());
-                    data.append(",jobId=").append(jobDetails.getJobID());
+                    data.append(",jobId=").append(jobDetails.getJobId());
                     monitor(jobExecutionContext);
                 } catch (SSHApiException e) {
                     String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
                     log.error(error);
-                    jobDetails.setJobID("none");
+                    jobDetails.setJobId("none");
                     GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED, monitorPublisher);
                     GFacUtils.saveErrorDetails(jobExecutionContext, error, CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
                     throw new GFacProviderException(error, e);
                 } catch (Exception e) {
                     String error = "Error submitting the job to host " + jobExecutionContext.getHostName() + " message: " + e.getMessage();
                     log.error(error);
-                    jobDetails.setJobID("none");
+                    jobDetails.setJobId("none");
                     GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED, monitorPublisher);
                     GFacUtils.saveErrorDetails(jobExecutionContext, error, CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
                     throw new GFacProviderException(error, e);
@@ -259,8 +259,8 @@ public class SSHProvider extends AbstractProvider {
                 return false;
             }
             try {
-                if (jobDetails.getJobID() != null) {
-                    if (cluster.cancelJob(jobDetails.getJobID()) != null) {
+                if (jobDetails.getJobId() != null) {
+                    if (cluster.cancelJob(jobDetails.getJobId()) != null) {
                         // if this operation success without any exceptions, we can assume cancel operation succeeded.
                         GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.CANCELED, monitorPublisher);
                         return true;
@@ -379,7 +379,7 @@ public class SSHProvider extends AbstractProvider {
         // have to implement the logic to recover a gfac failure
         initialize(jobExecutionContext);
         if(hpcType) {
-            log.info("Invoking Recovering for the Experiment: " + jobExecutionContext.getExperimentID());
+            log.info("Invoking Recovering for the Experiment: " + jobExecutionContext.getExperimentId());
             String hostName = jobExecutionContext.getHostName();
             String jobId = "";
             String jobDesc = "";
@@ -421,7 +421,7 @@ public class SSHProvider extends AbstractProvider {
                 // Now we are we have enough data to recover
                 JobDetails jobDetails = new JobDetails();
                 jobDetails.setJobDescription(jobDesc);
-                jobDetails.setJobID(jobId);
+                jobDetails.setJobId(jobId);
                 jobDetails.setJobName(jobName);
                 jobExecutionContext.setJobDetails(jobDetails);
                 if (jobExecutionContext.getSecurityContext(hostName) == null) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
index b38a170..633a040 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
@@ -426,7 +426,7 @@ public class GFACSSHUtils {
         ComputationalResourceScheduling taskScheduling = taskData.getTaskScheduling();
         if (taskScheduling != null) {
             int totalNodeCount = taskScheduling.getNodeCount();
-            int totalCPUCount = taskScheduling.getTotalCPUCount();
+            int totalCPUCount = taskScheduling.getTotalCpuCount();
 
 
             if (taskScheduling.getComputationalProjectAccount() != null) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
index 704528f..c6211a5 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
@@ -24,7 +24,7 @@ public class HandleOutputs {
 	public static List<OutputDataObjectType> handleOutputs(JobExecutionContext jobExecutionContext, Cluster cluster) throws GFacHandlerException {
 		List<OutputDataObjectType> outputArray = new ArrayList<OutputDataObjectType>();
 		try {
-			String outputDataDir = File.separator + "tmp" + File.separator + jobExecutionContext.getExperimentID();
+			String outputDataDir = File.separator + "tmp" + File.separator + jobExecutionContext.getExperimentId();
 			(new File(outputDataDir)).mkdirs();
 
 			List<OutputDataObjectType> outputs = jobExecutionContext.getTaskData().getApplicationOutputs();

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
index c65f386..ebcd892 100644
--- a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
+++ b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/BigRed2TestWithSSHAuth.java
@@ -244,9 +244,9 @@
 //    @Test
 //    public void testSSHProvider() throws GFacException {
 //        BetterGfacImpl gFacAPI = new BetterGfacImpl();
-//        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+//        gFacAPI.submitJob(jobExecutionContext.getExperimentId(), jobExecutionContext.getTaskData().getTaskId(), jobExecutionContext.getGatewayID());
 //        org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobDescription());
-//        org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobID());
+//        org.junit.Assert.assertNotNull(jobExecutionContext.getJobDetails().getJobId());
 //    }
 //
 //}

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
index b115b6c..bf81017 100644
--- a/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
+++ b/modules/gfac/gfac-ssh/src/test/java/org/apache/airavata/core/gfac/services/impl/SSHProviderTestWithSSHAuth.java
@@ -165,7 +165,7 @@
 //    @Test
 //    public void testLocalProvider() throws GFacException {
 //        BetterGfacImpl gFacAPI = new BetterGfacImpl();
-//        gFacAPI.submitJob(jobExecutionContext.getExperimentID(), jobExecutionContext.getTaskData().getTaskID(), jobExecutionContext.getGatewayID());
+//        gFacAPI.submitJob(jobExecutionContext.getExperimentId(), jobExecutionContext.getTaskData().getTaskId(), jobExecutionContext.getGatewayID());
 //        MessageContext outMessageContext = jobExecutionContext.getOutMessageContext();
 //        Assert.assertEquals(MappingFactory.toString((ActualParameter)outMessageContext.getParameter("echo_output")), "hello");
 //    }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
----------------------------------------------------------------------
diff --git a/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java b/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
index a23fff0..226c125 100644
--- a/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
+++ b/modules/integration-tests/src/test/java/org/apache/airavata/integration/DataRetrievalIT.java
@@ -110,7 +110,7 @@ public class DataRetrievalIT extends AbstractIntegrationTest {
         	log.info("\t"+user+" : "+data.size()+" experiments");
 			Assert.assertEquals(listUserExperiments.size(), data.size());
 			for (Experiment experiment : listUserExperiments) {
-				Assert.assertThat(experiment.getExperimentID(), isIn(data)); 
+				Assert.assertThat(experiment.getExperimentId(), isIn(data));
 			}
 		}
     }
@@ -125,7 +125,7 @@ public class DataRetrievalIT extends AbstractIntegrationTest {
         	log.info("\t"+project+" : "+data.size()+" experiments");
 			Assert.assertEquals(listProjectExperiments.size(), data.size());
 			for (Experiment experiment : listProjectExperiments) {
-				Assert.assertThat(experiment.getExperimentID(), isIn(data)); 
+				Assert.assertThat(experiment.getExperimentId(), isIn(data));
 			}
 		}
     }
@@ -141,7 +141,7 @@ public class DataRetrievalIT extends AbstractIntegrationTest {
             log.info("\t"+user+" : "+data.size()+" projects");
 			Assert.assertEquals(listUserProjects.size(), 4);
 //			for (Project project : listUserProjects) {
-//				Assert.assertThat(project.getProjectID(), isIn(data));
+//				Assert.assertThat(project.getProjectId(), isIn(data));
 //			}
 		}
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
index 1b3e1f3..4bf612a 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
@@ -433,7 +433,7 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface,
 			}
 			ApplicationDeploymentDescription applicationDeploymentDescription = getAppDeployment(taskData, applicationId);
             taskData.setApplicationDeploymentId(applicationDeploymentDescription.getAppDeploymentId());
-			registry.update(RegistryModelType.TASK_DETAIL, taskData,taskData.getTaskID());
+			registry.update(RegistryModelType.TASK_DETAIL, taskData,taskData.getTaskId());
 			List<Object> workflowNodeDetailList = registry.get(RegistryModelType.WORKFLOW_NODE_DETAIL,
 							org.apache.airavata.registry.cpi.utils.Constants.FieldConstants.WorkflowNodeConstants.TASK_LIST, taskData);
 			if (workflowNodeDetailList != null
@@ -562,7 +562,7 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface,
                         TaskDetails taskDetails = (TaskDetails) o;
                         TaskStatus taskStatus = ((TaskDetails) o).getTaskStatus();
                         if (taskStatus.getExecutionState().getValue() > 7 && taskStatus.getExecutionState().getValue()<12) {
-                            log.error(((TaskDetails) o).getTaskID() + " Task status cannot mark as cancelled, because " +
+                            log.error(((TaskDetails) o).getTaskId() + " Task status cannot mark as cancelled, because " +
                                     "current task state is " + ((TaskDetails) o).getTaskStatus().getExecutionState().toString());
                             continue;// this continue is very useful not to process deeper loops if the upper layers have non-cancel states
                         } else {
@@ -571,7 +571,7 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface,
                                     .getTimeInMillis());
                             taskDetails.setTaskStatus(taskStatus);
                             registry.update(RegistryModelType.TASK_DETAIL, o,
-                                    taskDetails.getTaskID());
+                                    taskDetails.getTaskId());
                         }
                         orchestrator.cancelExperiment(experiment,
                                 workflowNodeDetail, taskDetails, tokenId);
@@ -721,9 +721,9 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface,
                         MessageContext messageContext = new MessageContext(event, MessageType.EXPERIMENT, messageId, gatewayId);
                         messageContext.setUpdatedTime(AiravataUtils.getCurrentTimestamp());
                         publisher.publish(messageContext);
-                        registry.update(RegistryModelType.TASK_DETAIL, taskData, taskData.getTaskID());
+                        registry.update(RegistryModelType.TASK_DETAIL, taskData, taskData.getTaskId());
                         //launching the experiment
-                        launchTask(taskData.getTaskID(), airavataCredStoreToken);
+                        launchTask(taskData.getTaskId(), airavataCredStoreToken);
                     }
                 }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/orchestrator/airavata-orchestrator-stubs/src/main/java/org/apache/airavata/orchestrator/cpi/OrchestratorService.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-stubs/src/main/java/org/apache/airavata/orchestrator/cpi/OrchestratorService.java b/modules/orchestrator/airavata-orchestrator-stubs/src/main/java/org/apache/airavata/orchestrator/cpi/OrchestratorService.java
index ad3edb3..c388bb6 100644
--- a/modules/orchestrator/airavata-orchestrator-stubs/src/main/java/org/apache/airavata/orchestrator/cpi/OrchestratorService.java
+++ b/modules/orchestrator/airavata-orchestrator-stubs/src/main/java/org/apache/airavata/orchestrator/cpi/OrchestratorService.java
@@ -1576,7 +1576,7 @@ import org.slf4j.LoggerFactory;
      * Performs a deep copy on <i>other</i>.
      */
     public launchExperiment_args(launchExperiment_args other) {
-      if (other.isSetExperimentId()) {
+      if (other.issetExperimentId()) {
         this.experimentId = other.experimentId;
       }
       if (other.isSetAiravataCredStoreToken()) {
@@ -1608,7 +1608,7 @@ import org.slf4j.LoggerFactory;
     }
 
     /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
-    public boolean isSetExperimentId() {
+    public boolean issetExperimentId() {
       return this.experimentId != null;
     }
 
@@ -1683,7 +1683,7 @@ import org.slf4j.LoggerFactory;
 
       switch (field) {
       case EXPERIMENT_ID:
-        return isSetExperimentId();
+        return issetExperimentId();
       case AIRAVATA_CRED_STORE_TOKEN:
         return isSetAiravataCredStoreToken();
       }
@@ -1703,8 +1703,8 @@ import org.slf4j.LoggerFactory;
       if (that == null)
         return false;
 
-      boolean this_present_experimentId = true && this.isSetExperimentId();
-      boolean that_present_experimentId = true && that.isSetExperimentId();
+      boolean this_present_experimentId = true && this.issetExperimentId();
+      boolean that_present_experimentId = true && that.issetExperimentId();
       if (this_present_experimentId || that_present_experimentId) {
         if (!(this_present_experimentId && that_present_experimentId))
           return false;
@@ -1737,11 +1737,11 @@ import org.slf4j.LoggerFactory;
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
+      lastComparison = Boolean.valueOf(issetExperimentId()).compareTo(other.issetExperimentId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetExperimentId()) {
+      if (issetExperimentId()) {
         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
         if (lastComparison != 0) {
           return lastComparison;
@@ -2373,7 +2373,7 @@ import org.slf4j.LoggerFactory;
      * Performs a deep copy on <i>other</i>.
      */
     public launchTask_args(launchTask_args other) {
-      if (other.isSetTaskId()) {
+      if (other.issetTaskId()) {
         this.taskId = other.taskId;
       }
       if (other.isSetAiravataCredStoreToken()) {
@@ -2405,7 +2405,7 @@ import org.slf4j.LoggerFactory;
     }
 
     /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
-    public boolean isSetTaskId() {
+    public boolean issetTaskId() {
       return this.taskId != null;
     }
 
@@ -2480,7 +2480,7 @@ import org.slf4j.LoggerFactory;
 
       switch (field) {
       case TASK_ID:
-        return isSetTaskId();
+        return issetTaskId();
       case AIRAVATA_CRED_STORE_TOKEN:
         return isSetAiravataCredStoreToken();
       }
@@ -2500,8 +2500,8 @@ import org.slf4j.LoggerFactory;
       if (that == null)
         return false;
 
-      boolean this_present_taskId = true && this.isSetTaskId();
-      boolean that_present_taskId = true && that.isSetTaskId();
+      boolean this_present_taskId = true && this.issetTaskId();
+      boolean that_present_taskId = true && that.issetTaskId();
       if (this_present_taskId || that_present_taskId) {
         if (!(this_present_taskId && that_present_taskId))
           return false;
@@ -2534,11 +2534,11 @@ import org.slf4j.LoggerFactory;
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId());
+      lastComparison = Boolean.valueOf(issetTaskId()).compareTo(other.issetTaskId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetTaskId()) {
+      if (issetTaskId()) {
         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
         if (lastComparison != 0) {
           return lastComparison;
@@ -3161,7 +3161,7 @@ import org.slf4j.LoggerFactory;
      * Performs a deep copy on <i>other</i>.
      */
     public validateExperiment_args(validateExperiment_args other) {
-      if (other.isSetExperimentId()) {
+      if (other.issetExperimentId()) {
         this.experimentId = other.experimentId;
       }
     }
@@ -3189,7 +3189,7 @@ import org.slf4j.LoggerFactory;
     }
 
     /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
-    public boolean isSetExperimentId() {
+    public boolean issetExperimentId() {
       return this.experimentId != null;
     }
 
@@ -3229,7 +3229,7 @@ import org.slf4j.LoggerFactory;
 
       switch (field) {
       case EXPERIMENT_ID:
-        return isSetExperimentId();
+        return issetExperimentId();
       }
       throw new IllegalStateException();
     }
@@ -3247,8 +3247,8 @@ import org.slf4j.LoggerFactory;
       if (that == null)
         return false;
 
-      boolean this_present_experimentId = true && this.isSetExperimentId();
-      boolean that_present_experimentId = true && that.isSetExperimentId();
+      boolean this_present_experimentId = true && this.issetExperimentId();
+      boolean that_present_experimentId = true && that.issetExperimentId();
       if (this_present_experimentId || that_present_experimentId) {
         if (!(this_present_experimentId && that_present_experimentId))
           return false;
@@ -3272,11 +3272,11 @@ import org.slf4j.LoggerFactory;
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
+      lastComparison = Boolean.valueOf(issetExperimentId()).compareTo(other.issetExperimentId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetExperimentId()) {
+      if (issetExperimentId()) {
         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
         if (lastComparison != 0) {
           return lastComparison;
@@ -3973,7 +3973,7 @@ import org.slf4j.LoggerFactory;
      * Performs a deep copy on <i>other</i>.
      */
     public terminateExperiment_args(terminateExperiment_args other) {
-      if (other.isSetExperimentId()) {
+      if (other.issetExperimentId()) {
         this.experimentId = other.experimentId;
       }
       if (other.isSetTokenId()) {
@@ -4005,7 +4005,7 @@ import org.slf4j.LoggerFactory;
     }
 
     /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
-    public boolean isSetExperimentId() {
+    public boolean issetExperimentId() {
       return this.experimentId != null;
     }
 
@@ -4080,7 +4080,7 @@ import org.slf4j.LoggerFactory;
 
       switch (field) {
       case EXPERIMENT_ID:
-        return isSetExperimentId();
+        return issetExperimentId();
       case TOKEN_ID:
         return isSetTokenId();
       }
@@ -4100,8 +4100,8 @@ import org.slf4j.LoggerFactory;
       if (that == null)
         return false;
 
-      boolean this_present_experimentId = true && this.isSetExperimentId();
-      boolean that_present_experimentId = true && that.isSetExperimentId();
+      boolean this_present_experimentId = true && this.issetExperimentId();
+      boolean that_present_experimentId = true && that.issetExperimentId();
       if (this_present_experimentId || that_present_experimentId) {
         if (!(this_present_experimentId && that_present_experimentId))
           return false;
@@ -4134,11 +4134,11 @@ import org.slf4j.LoggerFactory;
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
+      lastComparison = Boolean.valueOf(issetExperimentId()).compareTo(other.issetExperimentId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetExperimentId()) {
+      if (issetExperimentId()) {
         lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
         if (lastComparison != 0) {
           return lastComparison;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ExperimentConfigurationData.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ExperimentConfigurationData.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ExperimentConfigurationData.java
index 2f17c40..b656f4c 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ExperimentConfigurationData.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/model/ExperimentConfigurationData.java
@@ -28,10 +28,10 @@ public class ExperimentConfigurationData {
 	 private ResourceScheduling resourceScheduling;
 	 private Map<String,Object> inputParameters;
 	 private Map<String,Object> outputParameters;
-	public String getExperimentID() {
+	public String getExperimentId() {
 		return experimentID;
 	}
-	public void setExperimentID(String experimentID) {
+	public void setExperimentId(String experimentID) {
 		this.experimentID = experimentID;
 	}
 	public String getApplicationName() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b376aa85/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
index 66ae987..82a9fc2 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
@@ -69,8 +69,8 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
 
     public boolean launchExperiment(Experiment experiment, WorkflowNodeDetails workflowNode, TaskDetails task,String tokenId) throws OrchestratorException {
         // we give higher priority to userExperimentID
-        String experimentId = experiment.getExperimentID();
-        String taskId = task.getTaskID();
+        String experimentId = experiment.getExperimentId();
+        String taskId = task.getTaskId();
         // creating monitorID to register with monitoring queue
         // this is a special case because amqp has to be in place before submitting the job
         try {
@@ -107,7 +107,7 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
                 String nodeID = (String) newRegistry.add(ChildDataType.WORKFLOW_NODE_DETAIL, iDontNeedaNode, experimentId);
 
                 TaskDetails taskDetails = ExperimentModelUtil.cloneTaskFromExperiment(experiment);
-                taskDetails.setTaskID((String) newRegistry.add(ChildDataType.TASK_DETAIL, taskDetails, nodeID));
+                taskDetails.setTaskId((String) newRegistry.add(ChildDataType.TASK_DETAIL, taskDetails, nodeID));
                 tasks.add(taskDetails);
             }
 
@@ -140,7 +140,7 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
                                 }
                             }
                         }
-                        logger.error("Validation of " + validator + " for experiment Id " + experiment.getExperimentID() + " is FAILED:[error]. " + errorMsg);
+                        logger.error("Validation of " + validator + " for experiment Id " + experiment.getExperimentId() + " is FAILED:[error]. " + errorMsg);
                         validationResults.setValidationState(false);
                         try {
                             ErrorDetails details = new ErrorDetails();
@@ -150,7 +150,7 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
                             details.setCreationTime(Calendar.getInstance().getTimeInMillis());
                             details.setErrorCategory(ErrorCategory.APPLICATION_FAILURE);
                             orchestratorContext.getNewRegistry().add(ChildDataType.ERROR_DETAIL, details,
-                                    taskID.getTaskID());
+                                    taskID.getTaskId());
                         } catch (RegistryException e) {
                             logger.error("Error while saving error details to registry", e);
                         }
@@ -186,11 +186,11 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
             JobState jobState = jobDetails.getJobStatus().getJobState();
             if (jobState.getValue() > 4){
                 logger.error("Cannot cancel the job, because current job state is : " + jobState.toString() +
-                "jobId: " + jobDetails.getJobID() + " Job Name: " + jobDetails.getJobName());
+                "jobId: " + jobDetails.getJobId() + " Job Name: " + jobDetails.getJobName());
                 return;
             }
         }
-        jobSubmitter.terminate(experiment.getExperimentID(),task.getTaskID(),tokenId);
+        jobSubmitter.terminate(experiment.getExperimentId(),task.getTaskId(),tokenId);
     }
 
 


[11/44] airavata git commit: Adding mongo-registry WIP

Posted by sc...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
new file mode 100644
index 0000000..fbf7855
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkerResource.java
@@ -0,0 +1,908 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.model.workspace.experiment.ExperimentState;
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
+import org.apache.airavata.registry.cpi.ResultOrderType;
+import org.apache.airavata.registry.cpi.utils.Constants;
+import org.apache.airavata.registry.cpi.utils.StatusType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.airavata.registry.cpi.RegistryException;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+public class WorkerResource extends AbstractResource {
+    private final static Logger logger = LoggerFactory.getLogger(WorkerResource.class);
+    private String user;
+	private GatewayResource gateway;
+
+    /**
+     *
+     */
+    public WorkerResource() {
+    }
+
+    /**
+     *
+     * @param user username
+     * @param gateway  gatewayResource
+     */
+    public WorkerResource(String user, GatewayResource gateway) {
+		this.setUser(user);
+		this.gateway=gateway;
+	}
+
+    /**
+     * Gateway worker can create child data structures such as projects and user workflows
+     * @param type child resource type
+     * @return  child resource
+     */
+	public Resource create(ResourceType type) throws RegistryException{
+		Resource result = null;
+		switch (type) {
+			case PROJECT:
+				ProjectResource projectResource = new ProjectResource();
+				projectResource.setWorker(this);
+				projectResource.setGateway(gateway);
+				result=projectResource;
+				break;
+            case EXPERIMENT:
+                ExperimentResource experimentResource = new ExperimentResource();
+                experimentResource.setExecutionUser(user);
+                experimentResource.setGateway(gateway);
+                result = experimentResource;
+                break;
+			default:
+                logger.error("Unsupported resource type for worker resource.", new IllegalArgumentException());
+                throw new IllegalArgumentException("Unsupported resource type for worker resource.");
+
+		}
+		return result;
+	}
+
+    /**
+     *
+     * @param type child resource type
+     * @param name child resource name
+     */
+	public void remove(ResourceType type, Object name) throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+            QueryGenerator generator;
+            switch (type) {
+                case PROJECT:
+                    generator = new QueryGenerator(PROJECT);
+                    generator.setParameter(ProjectConstants.PROJECT_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case EXPERIMENT:
+                    generator = new QueryGenerator(EXPERIMENT);
+                    generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                default:
+                    logger.error("Unsupported resource type for worker resource.", new IllegalArgumentException());
+                    break;
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e.getMessage());
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    /**
+     *
+     * @param type child resource type
+     * @param name child resource name
+     * @return child resource
+     */
+	public Resource get(ResourceType type, Object name) throws RegistryException{
+        Resource result = null;
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            QueryGenerator generator;
+            Query q;
+            switch (type) {
+                case PROJECT:
+                    generator = new QueryGenerator(PROJECT);
+                    generator.setParameter(ProjectConstants.PROJECT_ID, name);
+                    q = generator.selectQuery(em);
+                    Project project = (Project) q.getSingleResult();
+                    result = Utils.getResource(ResourceType.PROJECT, project);
+                    break;
+                case EXPERIMENT:
+                    generator = new QueryGenerator(EXPERIMENT);
+                    generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
+                    q = generator.selectQuery(em);
+                    Experiment experiment = (Experiment) q.getSingleResult();
+                    result = Utils.getResource(ResourceType.EXPERIMENT, experiment);
+                    break;
+                default:
+                    logger.error("Unsupported resource type for worker resource.", new IllegalArgumentException());
+                    break;
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return result;
+    }
+
+//	public List<GFacJobDataResource> getGFacJobs(String serviceDescriptionId, String hostDescriptionId, String applicationDescriptionId){
+//		List<GFacJobDataResource> result = new ArrayList<GFacJobDataResource>();
+//        EntityManager em = ResourceUtils.getEntityManager();
+//        em.getTransaction().begin();
+//        QueryGenerator generator;
+//        Query q;
+//        generator = new QueryGenerator(GFAC_JOB_DATA);
+//        generator.setParameter(GFacJobDataConstants.SERVICE_DESC_ID, serviceDescriptionId);
+//        generator.setParameter(GFacJobDataConstants.HOST_DESC_ID, hostDescriptionId);
+//        generator.setParameter(GFacJobDataConstants.APP_DESC_ID, applicationDescriptionId);
+//        q = generator.selectQuery(em);
+//        for (Object o : q.getResultList()) {
+//            GFac_Job_Data gFacJobData = (GFac_Job_Data)o;
+//            result.add((GFacJobDataResource)Utils.getResource(ResourceType.GFAC_JOB_DATA, gFacJobData));
+//        }
+//        em.getTransaction().commit();
+//        em.close();
+//		return result;
+//	}
+//
+//	public List<GFacJobStatusResource> getGFacJobStatuses(String jobId){
+//		List<GFacJobStatusResource> resourceList = new ArrayList<GFacJobStatusResource>();
+//        EntityManager em = ResourceUtils.getEntityManager();
+//        em.getTransaction().begin();
+//        QueryGenerator generator;
+//        Query q;
+//        generator = new QueryGenerator(GFAC_JOB_STATUS);
+//        generator.setParameter(GFacJobStatusConstants.LOCAL_JOB_ID, jobId);
+//        q = generator.selectQuery(em);
+//        for (Object result : q.getResultList()) {
+//            GFac_Job_Status gFacJobStatus = (GFac_Job_Status) result;
+//            GFacJobStatusResource gFacJobStatusResource =
+//                    (GFacJobStatusResource)Utils.getResource(ResourceType.GFAC_JOB_STATUS, gFacJobStatus);
+//            resourceList.add(gFacJobStatusResource);
+//        }
+//        return resourceList;
+//	}
+
+    /**
+     * Method getExperiment all results of the given child resource type
+     *
+     * @param type child resource type
+     * @return list of child resources
+     */
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        return get(type, -1, -1, null, null);
+    }
+
+    /**
+     * Method getExperiment all results of the given child resource type with paginaltion and ordering
+     *
+     * @param type child resource type
+     * @param limit
+     * @param offset
+     * @param orderByIdentifier
+     * @param resultOrderType
+     * @return list of child resources
+     * @throws RegistryException
+     */
+    public List<Resource> get(ResourceType type, int limit, int offset, Object orderByIdentifier,
+                              ResultOrderType resultOrderType) throws RegistryException{
+        List<Resource> result = new ArrayList<Resource>();
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            QueryGenerator generator;
+            Query q;
+            switch (type) {
+                case PROJECT:
+                    generator = new QueryGenerator(PROJECT);
+                    Users users = em.find(Users.class, getUser());
+                    Gateway gatewayModel = em.find(Gateway.class, gateway.getGatewayId());
+                    generator.setParameter("users", users);
+                    generator.setParameter("gateway", gatewayModel);
+
+                    //ordering - only supported only by CREATION_TIME
+                    if(orderByIdentifier != null && resultOrderType != null
+                            && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {
+                        q = generator.selectQuery(em, ProjectConstants.CREATION_TIME, resultOrderType);
+                    }else{
+                        q = generator.selectQuery(em);
+                    }
+
+                    //pagination
+                    if(limit>0 && offset>=0){
+                        q.setFirstResult(offset);
+                        q.setMaxResults(limit);
+                    }
+
+                    for (Object o : q.getResultList()) {
+                        Project project = (Project) o;
+                        ProjectResource projectResource = (ProjectResource) Utils.getResource(ResourceType.PROJECT, project);
+                        result.add(projectResource);
+                    }
+                    break;
+                case EXPERIMENT:
+                    generator = new QueryGenerator(EXPERIMENT);
+                    generator.setParameter(ExperimentConstants.EXECUTION_USER, getUser());
+
+                    //ordering - only supported only by CREATION_TIME
+                    if(orderByIdentifier != null && resultOrderType != null
+                            && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {
+                        q = generator.selectQuery(em, ExperimentConstants.CREATION_TIME, resultOrderType);
+                    }else{
+                        q = generator.selectQuery(em);
+                    }
+
+                    //pagination
+                    if(limit>0 && offset>=0){
+                        q.setFirstResult(offset);
+                        q.setMaxResults(limit);
+                    }
+                    for (Object o : q.getResultList()) {
+                        Experiment experiment = (Experiment) o;
+                        ExperimentResource experimentResource = (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
+                        result.add(experimentResource);
+                    }
+
+                    break;
+                default:
+                    logger.error("Unsupported resource type for worker resource.", new IllegalArgumentException());
+                    break;
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return result;
+    }
+
+    /**
+     * saveExperiment gateway worker to database
+     */
+	public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            Gateway_Worker existingWorker = em.find(Gateway_Worker.class, new Gateway_Worker_PK(gateway.getGatewayId(), user));
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Gateway_Worker gatewayWorker = new Gateway_Worker();
+            Users existingUser = em.find(Users.class, this.user);
+            gatewayWorker.setUser(existingUser);
+            gatewayWorker.setUser_name(existingUser.getUser_name());
+            Gateway gatewaymodel = em.find(Gateway.class, gateway.getGatewayId());
+            gatewayWorker.setGateway(gatewaymodel);
+            gatewayWorker.setGateway_id(gatewaymodel.getGateway_id());
+            if (existingWorker != null) {
+                existingWorker.setUser_name(existingUser.getUser_name());
+                existingWorker.setUser(existingUser);
+                existingWorker.setGateway(gatewaymodel);
+                existingWorker.setGateway_id(gatewaymodel.getGateway_id());
+                gatewayWorker = em.merge(existingWorker);
+            } else {
+                em.persist(gatewayWorker);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    /**
+     *
+     * @return user name
+     */
+	public String getUser() {
+		return user;
+	}
+
+    /**
+     *
+     * @param user user name
+     */
+    public void setUser(String user) {
+		this.user = user;
+	}
+
+    /**
+     *
+     * @return gateway resource
+     */
+    public GatewayResource getGateway() {
+        return gateway;
+    }
+
+    /**
+     *
+     * @param gateway  gateway resource
+     */
+    public void setGateway(GatewayResource gateway) {
+        this.gateway = gateway;
+    }
+
+    /**
+     *
+     * @param id  project id
+     * @return whether the project is available under the user
+     */
+    public boolean isProjectExists(String id) throws RegistryException{
+		return isExists(ResourceType.PROJECT, id);
+	}
+
+    /**
+     *
+     * @param projectId project id
+     * @return project resource for the user
+     */
+	public ProjectResource createProject(String projectId) throws RegistryException{
+		ProjectResource project=(ProjectResource)create(ResourceType.PROJECT);
+        project.setId(projectId);
+		return project;
+	}
+
+    public String getProjectId(String projectName) {
+        String pro = projectName.replaceAll("\\s", "");
+        return pro + "_" + UUID.randomUUID();
+    }
+
+    /**
+     *
+     * @param id project id
+     * @return project resource
+     */
+	public ProjectResource getProject(String id) throws RegistryException{
+		return (ProjectResource)get(ResourceType.PROJECT, id);
+	}
+
+    /**
+     *
+     * @param id project id
+     */
+	public void removeProject(String id) throws RegistryException{
+		remove(ResourceType.PROJECT, id);
+	}
+
+    /**
+     * Get projects list of user
+     * @return  list of projects for the user
+     */
+    public List<ProjectResource> getProjects() throws RegistryException{
+		return getProjects(-1, -1, null, null);
+	}
+
+
+    /**
+     * Get projects list of user with pagination and ordering
+     *
+     * @return  list of projects for the user
+     */
+    public List<ProjectResource> getProjects(int limit, int offset, Object orderByIdentifier,
+                                             ResultOrderType resultOrderType) throws RegistryException{
+        List<ProjectResource> result=new ArrayList<ProjectResource>();
+        List<Resource> list = get(ResourceType.PROJECT, limit, offset, orderByIdentifier, resultOrderType);
+        for (Resource resource : list) {
+            result.add((ProjectResource) resource);
+        }
+        return result;
+    }
+
+    /**
+     *
+     * @param name experiment name
+     * @return whether experiment is already exist for the given user
+     */
+	public boolean isExperimentExists(String name) throws RegistryException{
+		return isExists(ResourceType.EXPERIMENT, name);
+	}
+	
+
+    /**
+     *
+     * @param name experiment name
+     * @return experiment resource
+     */
+    public ExperimentResource getExperiment(String name) throws RegistryException{
+		return (ExperimentResource)get(ResourceType.EXPERIMENT, name);
+	}
+//
+//    public GFacJobDataResource getGFacJob(String jobId){
+//    	return (GFacJobDataResource)getExperiment(ResourceType.GFAC_JOB_DATA,jobId);
+//    }
+
+    /**
+     * Method to getExperiment list of expeirments of user
+     * @return list of experiments for the user
+     */
+	public List<ExperimentResource> getExperiments() throws RegistryException{
+		return getExperiments(-1, -1, null, null);
+	}
+
+    /**
+     * Method to getExperiment list of experiments of user with pagination and ordering
+     * @param limit
+     * @param offset
+     * @param orderByIdentifier
+     * @param resultOrderType
+     * @return
+     * @throws RegistryException
+     */
+    public List<ExperimentResource> getExperiments(int limit, int offset, Object orderByIdentifier,
+                                                   ResultOrderType resultOrderType) throws RegistryException{
+        List<ExperimentResource> result=new ArrayList<ExperimentResource>();
+        List<Resource> list = get(ResourceType.EXPERIMENT, limit, offset, orderByIdentifier, resultOrderType);
+        for (Resource resource : list) {
+            result.add((ExperimentResource) resource);
+        }
+        return result;
+    }
+
+    /**
+     *
+     * @param experimentId  experiment name
+     */
+	public void removeExperiment(String experimentId) throws RegistryException{
+		remove(ResourceType.EXPERIMENT, experimentId);
+	}
+
+    /**
+     * To search projects of user with the given filter criteria. All the matching results will be sent.
+     * Results are not ordered in any order
+     * @param filters
+     * @return
+     * @throws RegistryException
+     */
+    public List<ProjectResource> searchProjects (Map<String, String> filters) throws RegistryException{
+        return searchProjects(filters, -1, -1, null, null);
+    }
+
+    /**
+     * To search the projects of user with the given filter criteria and retrieve the results with
+     * pagination support. Results can be ordered based on an identifier (i.e column) either ASC or
+     * DESC. But in the current implementation ordering is only supported based on the project
+     * creation time
+     *
+     * @param filters
+     * @param limit
+     * @param offset
+     * @param orderByIdentifier
+     * @param resultOrderType
+     * @return
+     * @throws RegistryException
+     */
+    public List<ProjectResource> searchProjects(Map<String, String> filters, int limit,
+             int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+        List<ProjectResource> result = new ArrayList<ProjectResource>();
+        EntityManager em = null;
+        try {
+            String query = "SELECT p from Project p WHERE ";
+            if (filters != null && filters.size() != 0) {
+                for (String field : filters.keySet()) {
+                    String filterVal = filters.get(field);
+                    if (field.equals(ProjectConstants.USERNAME)) {
+                        query += "p." + field + "= '" + filterVal + "' AND ";
+                    }else if (field.equals(ProjectConstants.GATEWAY_ID)) {
+                        query += "p." + field + "= '" + filterVal + "' AND ";
+                    }else {
+                        if (filterVal.contains("*")){
+                            filterVal = filterVal.replaceAll("\\*", "");
+                        }
+                        query += "p." + field + " LIKE '%" + filterVal + "%' AND ";
+                    }
+                }
+            }
+            query = query.substring(0, query.length() - 5);
+
+            //ordering
+            if( orderByIdentifier != null && resultOrderType != null
+                    && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)){
+                String order = (resultOrderType == ResultOrderType.ASC) ? "ASC" : "DESC";
+                query += " ORDER BY p." + ProjectConstants.CREATION_TIME + " " + order;
+            }
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+
+            //pagination
+            if(offset>=0 && limit >=0){
+                q = em.createQuery(query).setFirstResult(offset).setMaxResults(limit);
+            }else{
+                q = em.createQuery(query);
+            }
+
+            List resultList = q.getResultList();
+            for (Object o : resultList) {
+                Project project = (Project) o;
+                ProjectResource projectResource =
+                        (ProjectResource) Utils.getResource(ResourceType.PROJECT, project);
+                result.add(projectResource);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return result;
+    }
+
+    /**
+     * To search experiments of user with the given filter criteria. All the matching results will be sent.
+     * Results are not ordered in any order
+     * @param filters
+     * @return
+     * @throws RegistryException
+     */
+    public List<ExperimentResource> searchExperiments (Map<String, String> filters) throws RegistryException{
+        return searchExperiments(filters, -1, -1, null, null);
+    }
+
+    /**
+     * To search the experiments of user with the given filter criteria and retrieve the results with
+     * pagination support. Results can be ordered based on an identifier (i.e column) either ASC or
+     * DESC. But in the current implementation ordering is only supported based on creationTime
+     *
+     * @param filters
+     * @param limit
+     * @param offset
+     * @param orderByIdentifier
+     * @param resultOrderType
+     * @return
+     * @throws RegistryException
+     */
+    public List<ExperimentResource> searchExperiments(Map<String, String> filters, int limit,
+                                                      int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
+
+        List<ExperimentResource> result = new ArrayList<ExperimentResource>();
+        EntityManager em = null;
+        try {
+            String query = "SELECT e from Experiment e WHERE ";
+            if (filters != null && filters.size() != 0) {
+                for (String field : filters.keySet()) {
+                    String filterVal = filters.get(field);
+                    if (field.equals(ExperimentConstants.EXECUTION_USER)) {
+                        query += "e." + field + "= '" + filterVal + "' AND ";
+                    }else if (field.equals(ExperimentConstants.GATEWAY_ID)) {
+                        query += "e." + field + "= '" + filterVal + "' AND ";
+                    } else if (field.equals(ExperimentConstants.PROJECT_ID)) {
+                        query += "e." + field + "= '" + filterVal + "' AND ";
+                    } else {
+                        if (filterVal.contains("*")){
+                            filterVal = filterVal.replaceAll("\\*", "");
+                        }
+                        query += "e." + field + " LIKE '%" + filterVal + "%' AND ";
+                    }
+                }
+            }
+            query = query.substring(0, query.length() - 5);
+
+            //ordering
+            if( orderByIdentifier != null && resultOrderType != null
+                    && orderByIdentifier.equals(Constants.FieldConstants.ExperimentConstants.CREATION_TIME)){
+                String order = (resultOrderType == ResultOrderType.ASC) ? "ASC" : "DESC";
+                query += " ORDER BY e." + ExperimentConstants.CREATION_TIME + " " + order;
+            }
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+
+            //pagination
+            if(offset>=0 && limit >=0){
+                q = em.createQuery(query).setFirstResult(offset).setMaxResults(limit);
+            }else{
+                q = em.createQuery(query);
+            }
+
+            List resultList = q.getResultList();
+            for (Object o : resultList) {
+                Experiment experiment = (Experiment) o;
+                ExperimentResource experimentResource =
+                        (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
+                result.add(experimentResource);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Method to getExperiment experiments by state
+     * @param filters
+     * @return
+     * @throws RegistryException
+     */
+    public List<ExperimentResource> searchExperimentsByState (Map<String, String> filters) throws RegistryException{
+        return searchExperimentsByState(filters, -1, -1, null, null);
+    }
+
+    /**
+     * Method to getExperiment experiments of the given state with pagination and ordering
+     * @param filters
+     * @param limit
+     * @param offset
+     * @param orderByIdentifier
+     * @param resultOrderType
+     * @return
+     * @throws RegistryException
+     */
+    public List<ExperimentResource> searchExperimentsByState (Map<String, String> filters, int limit, int offset,
+            Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException{
+        List<ExperimentResource> result = new ArrayList<ExperimentResource>();
+        EntityManager em = null;
+        try {
+            String experimentState = ExperimentState.valueOf(filters.get(StatusConstants.STATE)).toString();
+            String query = "SELECT e FROM Status s " +
+                    "JOIN s.experiment e " +
+                    "WHERE s.state='" + experimentState +  "' " +
+                    "AND s.statusType='" + StatusType.EXPERIMENT + "' AND ";
+
+            filters.remove(StatusConstants.STATE);
+            if (filters.size() != 0) {
+                for (String field : filters.keySet()) {
+                    String filterVal = filters.get(field);
+                    if (field.equals(ExperimentConstants.EXECUTION_USER)) {
+                        query += "e." + field + "= '" + filterVal + "' AND ";
+                    }else if (field.equals(ExperimentConstants.GATEWAY_ID)) {
+                        query += "e." + field + "= '" + filterVal + "' AND ";
+                    } else if (field.equals(ExperimentConstants.PROJECT_ID)) {
+                        query += "e." + field + "= '" + filterVal + "' AND ";
+                    } else {
+                        if (filterVal.contains("*")){
+                            filterVal = filterVal.replaceAll("\\*", "");
+                        }
+                        query += "e." + field + " LIKE '%" + filterVal + "%' AND ";
+                    }
+                }
+            }
+            query = query.substring(0, query.length() - 5);
+
+            //ordering
+            if( orderByIdentifier != null && resultOrderType != null
+                    && orderByIdentifier.equals(Constants.FieldConstants.ExperimentConstants.CREATION_TIME)){
+                String order = (resultOrderType == ResultOrderType.ASC) ? "ASC" : "DESC";
+                query += " ORDER BY e." + ExperimentConstants.CREATION_TIME + " " + order;
+            }
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+
+            //pagination
+            if(offset>=0 && limit >=0){
+                q = em.createQuery(query).setFirstResult(offset).setMaxResults(limit);
+            }else{
+                q = em.createQuery(query);
+            }
+
+            List resultList = q.getResultList();
+            for (Object o : resultList) {
+                Experiment experiment = (Experiment) o;
+                ExperimentResource experimentResource = (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
+                result.add(experimentResource);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Search experiments from creation time between interval. Returns all results
+     * @param fromTime
+     * @param toTime
+     * @return
+     * @throws RegistryException
+     */
+    public List<ExperimentResource> searchExperimentsByCreationTime (Timestamp fromTime, Timestamp toTime) throws RegistryException{
+        return  searchExperimentsByCreationTime(fromTime, toTime, -1, -1, null, null);
+    }
+
+
+    /**
+     * Search experiments from creation time between interval. Results are ordered creation time DESC.
+     * Supports pagination
+     *
+     * @param fromTime
+     * @param toTime
+     * @param limit
+     * @param offset
+     * @param orderByIdentifier
+     * @param resultOrderType
+     * @return
+     * @throws RegistryException
+     */
+    public List<ExperimentResource> searchExperimentsByCreationTime(
+            Timestamp fromTime, Timestamp toTime, int limit, int offset, Object orderByIdentifier,
+            ResultOrderType resultOrderType) throws RegistryException{
+
+        List<ExperimentResource> result = new ArrayList<ExperimentResource>();
+        EntityManager em = null;
+        try {
+            String query = "SELECT e FROM Experiment e " +
+                    "WHERE e.creationTime > '" + fromTime +  "' " +
+                    "AND e.creationTime <'" + toTime + "'";
+
+            //ordering
+            if( orderByIdentifier != null && resultOrderType != null
+                    && orderByIdentifier.equals(Constants.FieldConstants.ExperimentConstants.CREATION_TIME)){
+                String order = (resultOrderType == ResultOrderType.ASC) ? "ASC" : "DESC";
+                query += " ORDER BY e." + ExperimentConstants.CREATION_TIME + " " + order;
+            }
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+
+            //pagination
+            if(offset>=0 && limit >=0){
+                q = em.createQuery(query).setFirstResult(offset).setMaxResults(limit);
+            }else{
+                q = em.createQuery(query);
+            }
+
+            List resultList = q.getResultList();
+            for (Object o : resultList) {
+                Experiment experiment = (Experiment) o;
+                ExperimentResource experimentResource = (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
+                result.add(experimentResource);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return result;
+    }
+
+    /**
+     *
+     * @return list of experiments for the user
+     */
+    public List<ExperimentResource> getExperimentsByCaching(String user) throws RegistryException{
+        List<ExperimentResource> result = new ArrayList<ExperimentResource>();
+        EntityManager em = null;
+        try {
+            String query = "SELECT e from Experiment e WHERE e.executionUser = '" + user + "'";
+            em = ResourceUtils.getEntityManager();
+//        OpenJPAEntityManagerFactory oemf = OpenJPAPersistence.cast(em.getEntityManagerFactory());
+//        QueryResultCache qcache = oemf.getQueryResultCache();
+            // qcache.evictAll(Experiment.class);
+            em.getTransaction().begin();
+            Query q = em.createQuery(query);
+            List resultList = q.getResultList();
+            for (Object o : resultList) {
+                Experiment experiment = (Experiment) o;
+                ExperimentResource experimentResource = (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
+                result.add(experimentResource);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowNodeDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowNodeDetailResource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowNodeDetailResource.java
new file mode 100644
index 0000000..9d2869d
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/WorkflowNodeDetailResource.java
@@ -0,0 +1,473 @@
+/*
+ *
+ * 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.persistance.registry.jpa.resources;
+
+import org.apache.airavata.persistance.registry.jpa.Resource;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
+import org.apache.airavata.registry.cpi.utils.StatusType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.airavata.registry.cpi.RegistryException;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+
+public class WorkflowNodeDetailResource extends AbstractResource {
+    private static final Logger logger = LoggerFactory.getLogger(WorkflowNodeDetailResource.class);
+    private ExperimentResource experimentResource;
+    private String nodeInstanceId;
+    private Timestamp creationTime;
+    private String nodeName;
+    private String executionUnit;
+    private String executionUnitData;
+
+    public ExperimentResource getExperimentResource() {
+        return experimentResource;
+    }
+
+    public void setExperimentResource(ExperimentResource experimentResource) {
+        this.experimentResource = experimentResource;
+    }
+
+    public String getNodeInstanceId() {
+        return nodeInstanceId;
+    }
+
+    public void setNodeInstanceId(String nodeInstanceId) {
+        this.nodeInstanceId = nodeInstanceId;
+    }
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public String getNodeName() {
+        return nodeName;
+    }
+
+    public void setNodeName(String nodeName) {
+        this.nodeName = nodeName;
+    }
+
+    public Resource create(ResourceType type) throws RegistryException{
+        switch (type){
+            case TASK_DETAIL:
+                TaskDetailResource taskDetailResource = new TaskDetailResource();
+                taskDetailResource.setWorkflowNodeDetailResource(this);
+                return taskDetailResource;
+            case ERROR_DETAIL:
+                ErrorDetailResource errorDetailResource = new ErrorDetailResource();
+                errorDetailResource.setNodeDetail(this);
+                return errorDetailResource;
+            case NODE_INPUT:
+                NodeInputResource nodeInputResource = new NodeInputResource();
+                nodeInputResource.setNodeDetailResource(this);
+                return nodeInputResource;
+            case NODE_OUTPUT:
+                NodeOutputResource nodeOutputResource = new NodeOutputResource();
+                nodeOutputResource.setNodeDetailResource(this);
+                return nodeOutputResource;
+            case STATUS:
+                StatusResource statusResource = new StatusResource();
+                statusResource.setWorkflowNodeDetail(this);
+                return statusResource;
+            default:
+                logger.error("Unsupported resource type for workflow node detail resource.", new IllegalArgumentException());
+                throw new IllegalArgumentException("Unsupported resource type for workflow node detail resource.");
+        }
+    }
+
+    public void remove(ResourceType type, Object name) throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+            QueryGenerator generator;
+            switch (type) {
+                case TASK_DETAIL:
+                    generator = new QueryGenerator(TASK_DETAIL);
+                    generator.setParameter(TaskDetailConstants.TASK_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case ERROR_DETAIL:
+                    generator = new QueryGenerator(ERROR_DETAIL);
+                    generator.setParameter(ErrorDetailConstants.NODE_INSTANCE_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case NODE_INPUT:
+                    generator = new QueryGenerator(NODE_INPUT);
+                    generator.setParameter(NodeInputConstants.NODE_INSTANCE_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case NODE_OUTPUT:
+                    generator = new QueryGenerator(NODE_OUTPUT);
+                    generator.setParameter(NodeOutputConstants.NODE_INSTANCE_ID, name);
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                case STATUS:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(StatusConstants.NODE_INSTANCE_ID, name);
+                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.WORKFLOW_NODE.toString());
+                    q = generator.deleteQuery(em);
+                    q.executeUpdate();
+                    break;
+                default:
+                    logger.error("Unsupported resource type for experiment resource.", new IllegalArgumentException());
+                    break;
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    public Resource get(ResourceType type, Object name) throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            QueryGenerator generator;
+            Query q;
+            switch (type) {
+                case TASK_DETAIL:
+                    generator = new QueryGenerator(TASK_DETAIL);
+                    generator.setParameter(TaskDetailConstants.TASK_ID, name);
+                    q = generator.selectQuery(em);
+                    TaskDetail taskDetail = (TaskDetail) q.getSingleResult();
+                    TaskDetailResource taskDetailResource = (TaskDetailResource) Utils.getResource(ResourceType.TASK_DETAIL, taskDetail);
+                    em.getTransaction().commit();
+                    em.close();
+                    return taskDetailResource;
+                case ERROR_DETAIL:
+                    generator = new QueryGenerator(ERROR_DETAIL);
+                    generator.setParameter(ErrorDetailConstants.NODE_INSTANCE_ID, name);
+                    q = generator.selectQuery(em);
+                    ErrorDetail errorDetail = (ErrorDetail) q.getSingleResult();
+                    ErrorDetailResource errorDetailResource = (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
+                    em.getTransaction().commit();
+                    em.close();
+                    return errorDetailResource;
+                case NODE_INPUT:
+                    generator = new QueryGenerator(NODE_INPUT);
+                    generator.setParameter(NodeInputConstants.NODE_INSTANCE_ID, name);
+                    q = generator.selectQuery(em);
+                    NodeInput nodeInput = (NodeInput) q.getSingleResult();
+                    NodeInputResource nodeInputResource = (NodeInputResource) Utils.getResource(ResourceType.NODE_INPUT, nodeInput);
+                    em.getTransaction().commit();
+                    em.close();
+                    return nodeInputResource;
+                case NODE_OUTPUT:
+                    generator = new QueryGenerator(NODE_OUTPUT);
+                    generator.setParameter(NodeOutputConstants.NODE_INSTANCE_ID, name);
+                    q = generator.selectQuery(em);
+                    NodeOutput nodeOutput = (NodeOutput) q.getSingleResult();
+                    NodeOutputResource nodeOutputResource = (NodeOutputResource) Utils.getResource(ResourceType.NODE_OUTPUT, nodeOutput);
+                    em.getTransaction().commit();
+                    em.close();
+                    return nodeOutputResource;
+                case STATUS:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(StatusConstants.NODE_INSTANCE_ID, name);
+                    generator.setParameter(StatusConstants.STATUS_TYPE, StatusType.WORKFLOW_NODE.toString());
+                    q = generator.selectQuery(em);
+                    Status status = (Status) q.getSingleResult();
+                    StatusResource statusResource = (StatusResource) Utils.getResource(ResourceType.STATUS, status);
+                    em.getTransaction().commit();
+                    em.close();
+                    return statusResource;
+                default:
+                    em.getTransaction().commit();
+                    em.close();
+                    logger.error("Unsupported resource type for workflow node resource.", new IllegalArgumentException());
+                    throw new IllegalArgumentException("Unsupported resource type for workflow node resource.");
+            }
+        } catch (Exception e) {
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    public List<Resource> get(ResourceType type) throws RegistryException{
+        List<Resource> resourceList = new ArrayList<Resource>();
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            Query q;
+            QueryGenerator generator;
+            List results;
+            switch (type) {
+                case TASK_DETAIL:
+                    generator = new QueryGenerator(TASK_DETAIL);
+                    generator.setParameter(TaskDetailConstants.NODE_INSTANCE_ID, nodeInstanceId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            TaskDetail taskDetail = (TaskDetail) result;
+                            TaskDetailResource taskDetailResource =
+                                    (TaskDetailResource) Utils.getResource(ResourceType.TASK_DETAIL, taskDetail);
+                            resourceList.add(taskDetailResource);
+                        }
+                    }
+                    break;
+                case ERROR_DETAIL:
+                    generator = new QueryGenerator(ERROR_DETAIL);
+                    generator.setParameter(ErrorDetailConstants.NODE_INSTANCE_ID, nodeInstanceId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            ErrorDetail errorDetail = (ErrorDetail) result;
+                            ErrorDetailResource errorDetailResource =
+                                    (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
+                            resourceList.add(errorDetailResource);
+                        }
+                    }
+                    break;
+                case NODE_INPUT:
+                    generator = new QueryGenerator(NODE_INPUT);
+                    generator.setParameter(NodeInputConstants.NODE_INSTANCE_ID, nodeInstanceId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            NodeInput nodeInput = (NodeInput) result;
+                            NodeInputResource nodeInputResource =
+                                    (NodeInputResource) Utils.getResource(ResourceType.NODE_INPUT, nodeInput);
+                            resourceList.add(nodeInputResource);
+                        }
+                    }
+                    break;
+                case NODE_OUTPUT:
+                    generator = new QueryGenerator(NODE_OUTPUT);
+                    generator.setParameter(NodeOutputConstants.NODE_INSTANCE_ID, nodeInstanceId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            NodeOutput nodeOutput = (NodeOutput) result;
+                            NodeOutputResource nodeOutputResource =
+                                    (NodeOutputResource) Utils.getResource(ResourceType.NODE_OUTPUT, nodeOutput);
+                            resourceList.add(nodeOutputResource);
+                        }
+                    }
+                    break;
+                case STATUS:
+                    generator = new QueryGenerator(STATUS);
+                    generator.setParameter(StatusConstants.NODE_INSTANCE_ID, nodeInstanceId);
+                    q = generator.selectQuery(em);
+                    results = q.getResultList();
+                    if (results.size() != 0) {
+                        for (Object result : results) {
+                            Status status = (Status) result;
+                            StatusResource statusResource =
+                                    (StatusResource) Utils.getResource(ResourceType.STATUS, status);
+                            resourceList.add(statusResource);
+                        }
+                    }
+                    break;
+                default:
+                    em.getTransaction().commit();
+                    em.close();
+                    logger.error("Unsupported resource type for workflow node details resource.", new UnsupportedOperationException());
+                    throw new UnsupportedOperationException();
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+//            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return resourceList;
+    }
+
+    public void save() throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = ResourceUtils.getEntityManager();
+            WorkflowNodeDetail existingNode = em.find(WorkflowNodeDetail.class, nodeInstanceId);
+            em.close();
+
+            em = ResourceUtils.getEntityManager();
+            em.getTransaction().begin();
+            WorkflowNodeDetail workflowNodeDetail = new WorkflowNodeDetail();
+            workflowNodeDetail.setNodeId(nodeInstanceId);
+            Experiment experiment = em.find(Experiment.class, experimentResource.getExpID());
+            workflowNodeDetail.setExperiment(experiment);
+            workflowNodeDetail.setExpId(experimentResource.getExpID());
+            workflowNodeDetail.setCreationTime(creationTime);
+            workflowNodeDetail.setNodeName(nodeName);
+            workflowNodeDetail.setExecutionUnit(getExecutionUnit());
+            workflowNodeDetail.setExecutionUnitData(getExecutionUnitData());
+
+            if (existingNode != null) {
+                existingNode.setExperiment(experiment);
+                existingNode.setExpId(experimentResource.getExpID());
+                existingNode.setCreationTime(creationTime);
+                existingNode.setNodeName(nodeName);
+                existingNode.setExecutionUnit(getExecutionUnit());
+                existingNode.setExecutionUnitData(getExecutionUnitData());
+                workflowNodeDetail = em.merge(existingNode);
+            } else {
+                em.persist(workflowNodeDetail);
+            }
+            em.getTransaction().commit();
+            em.close();
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        } finally {
+            if (em != null && em.isOpen()) {
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    public List<NodeInputResource> getNodeInputs() throws RegistryException{
+        List<NodeInputResource> nodeInputResourceList = new ArrayList<NodeInputResource>();
+        List<Resource> resources = get(ResourceType.NODE_INPUT);
+        for (Resource resource : resources) {
+            NodeInputResource nodeInputResource = (NodeInputResource) resource;
+            nodeInputResourceList.add(nodeInputResource);
+        }
+        return nodeInputResourceList;
+    }
+
+    public List<NodeOutputResource> getNodeOutputs() throws RegistryException{
+        List<NodeOutputResource> outputResources = new ArrayList<NodeOutputResource>();
+        List<Resource> resources = get(ResourceType.NODE_OUTPUT);
+        for (Resource resource : resources) {
+            NodeOutputResource nodeOutputResource = (NodeOutputResource) resource;
+            outputResources.add(nodeOutputResource);
+        }
+        return outputResources;
+    }
+
+    public StatusResource getWorkflowNodeStatus() throws RegistryException{
+        List<Resource> resources = get(ResourceType.STATUS);
+        for (Resource resource : resources) {
+            StatusResource nodeStatus = (StatusResource) resource;
+            if(nodeStatus.getStatusType().equals(StatusType.WORKFLOW_NODE.toString())){
+                if (nodeStatus.getState() == null || nodeStatus.getState().equals("") ){
+                    nodeStatus.setState("UNKNOWN");
+                }
+                return nodeStatus;
+            }
+        }
+        return null;
+    }
+
+    public StatusResource getTaskStatus(String taskId) throws RegistryException{
+        List<Resource> resources = get(ResourceType.STATUS);
+        for (Resource resource : resources) {
+            StatusResource taskStatus = (StatusResource) resource;
+            if(taskStatus.getStatusType().equals(StatusType.TASK.toString()) && taskStatus.getTaskDetailResource().getTaskId().equals(taskId)){
+                if (taskStatus.getState() == null || taskStatus.getState().equals("") ){
+                    taskStatus.setState("UNKNOWN");
+                }
+                return taskStatus;
+            } 
+        }
+        return null;
+    }
+
+    public List<TaskDetailResource> getTaskDetails() throws RegistryException{
+        List<TaskDetailResource> taskDetailResources = new ArrayList<TaskDetailResource>();
+        List<Resource> resources = get(ResourceType.TASK_DETAIL);
+        for (Resource resource : resources) {
+            TaskDetailResource taskDetailResource = (TaskDetailResource) resource;
+            taskDetailResources.add(taskDetailResource);
+        }
+        return taskDetailResources;
+    }
+
+    public List<ErrorDetailResource> getErrorDetails() throws RegistryException{
+        List<ErrorDetailResource> errorDetails = new ArrayList<ErrorDetailResource>();
+        List<Resource> resources = get(ResourceType.ERROR_DETAIL);
+        for (Resource resource : resources) {
+            ErrorDetailResource errorDetailResource = (ErrorDetailResource) resource;
+            errorDetails.add(errorDetailResource);
+        }
+        return errorDetails;
+    }
+
+    public TaskDetailResource getTaskDetail(String taskId) throws RegistryException{
+        return (TaskDetailResource)get(ResourceType.TASK_DETAIL, taskId);
+    }
+
+	public String getExecutionUnit() {
+		return executionUnit;
+	}
+
+	public void setExecutionUnit(String executionUnit) {
+		this.executionUnit = executionUnit;
+	}
+
+	public String getExecutionUnitData() {
+		return executionUnitData;
+	}
+
+	public void setExecutionUnitData(String executionUnitData) {
+		this.executionUnitData = executionUnitData;
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/QueryGenerator.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/QueryGenerator.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/QueryGenerator.java
new file mode 100644
index 0000000..b0ebe45
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/QueryGenerator.java
@@ -0,0 +1,128 @@
+/*
+ *
+ * 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.persistance.registry.jpa.utils;
+
+import org.apache.airavata.registry.cpi.ResultOrderType;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+import java.util.HashMap;
+import java.util.Map;
+
+public class QueryGenerator {
+	private String tableName;
+	private Map<String,Object> matches=new HashMap<String, Object>();
+	private static final String SELECT_OBJ="p";
+	private static final String DELETE_OBJ="p";
+	private static final String TABLE_OBJ="p";
+//	
+//	public QueryGenerator(String tableName) {
+//		setTableName(tableName);
+//	}
+	
+	public QueryGenerator(String tableName, Object[]...params) {
+		setTableName(tableName);
+		for (Object[] param : params) {
+			addMatch(param[0].toString(), param[1]);
+		}
+	}
+	
+	public String getTableName() {
+		return tableName;
+	}
+	public void setTableName(String tableName) {
+		this.tableName = tableName;
+	}
+	public void addMatch(String colName, Object matchValue){
+		matches.put(colName, matchValue);
+	}
+	
+	public void setParameter(String colName, Object matchValue){
+		addMatch(colName, matchValue);
+	}
+
+    /**
+     * Select query
+     * @param entityManager
+     * @return
+     */
+	public Query selectQuery(EntityManager entityManager){
+        String queryString="SELECT "+ SELECT_OBJ + " FROM " +getTableName()+" "+TABLE_OBJ;
+        return generateQueryWithParameters(entityManager, queryString);
+    }
+
+    /**
+     * Select query with pagination
+     * @param entityManager
+     * @param orderByColumn
+     * @param resultOrderType
+     * @return
+     */
+    public Query selectQuery(EntityManager entityManager, String orderByColumn,
+                             ResultOrderType resultOrderType){
+        String order = (resultOrderType == ResultOrderType.ASC) ? "ASC" : "DESC";
+        String orderByClause = " ORDER BY " + SELECT_OBJ + "." + orderByColumn + " " + order;
+        String queryString="SELECT "+ SELECT_OBJ + " FROM " +getTableName()+" "+TABLE_OBJ;
+        return generateQueryWithParameters(entityManager, queryString, orderByClause);
+    }
+
+//    public Query countQuery(EntityManager entityManager){
+//        SELECT COUNT(p.host_descriptor_ID) FROM Host_Descriptor p WHERE p.gateway_name =:gate_ID and p.host_descriptor_ID =:host_desc_name")
+//        String queryString="SELECT COUNT("+ SELECT_OBJ + " FROM " +getTableName()+" "+TABLE_OBJ;
+//        return generateQueryWithParameters(entityManager, queryString);
+//    }
+	
+	public Query deleteQuery(EntityManager entityManager){
+		String queryString="Delete FROM "+getTableName()+" "+TABLE_OBJ;
+		return generateQueryWithParameters(entityManager, queryString);
+	}
+
+	private Query generateQueryWithParameters(EntityManager entityManager,
+			String queryString) {
+		return generateQueryWithParameters(entityManager, queryString, "");
+	}
+
+    private Query generateQueryWithParameters(EntityManager entityManager,
+                                              String queryString, String orderByClause) {
+        Map<String,Object> queryParameters=new HashMap<String, Object>();
+        if (matches.size()>0){
+            String matchString = "";
+            int paramCount=0;
+            for (String colName : matches.keySet()) {
+                String paramName="param"+paramCount;
+                queryParameters.put(paramName, matches.get(colName));
+                if (!matchString.equals("")){
+                    matchString+=" AND ";
+                }
+                matchString+=TABLE_OBJ+"."+colName+" =:"+paramName;
+                paramCount++;
+            }
+            queryString+=" WHERE "+matchString;
+        }
+        queryString += orderByClause;
+        Query query = entityManager.createQuery(queryString);
+        for (String paramName : queryParameters.keySet()) {
+            query.setParameter(paramName, queryParameters.get(paramName));
+        }
+        return query;
+    }
+}


[21/44] airavata git commit: Adding mongo-registry WIP

Posted by sc...@apache.org.
Adding mongo-registry WIP


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

Branch: refs/heads/mongo-registry
Commit: e13d90da792ba825dc9e279c66f79130b4a955ff
Parents: fed06c2
Author: Supun Nakandala <sc...@apache.org>
Authored: Wed May 27 00:16:12 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Wed May 27 00:16:14 2015 +0530

----------------------------------------------------------------------
 .../persistance/registry/jpa/JPAConstants.java  |   33 +
 .../persistance/registry/jpa/Resource.java      |   71 +
 .../persistance/registry/jpa/ResourceType.java  |   49 +
 .../persistance/registry/jpa/ResourceUtils.java |  525 ++++++
 .../registry/jpa/impl/ExperimentRegistry.java   | 1773 ++++++++++++++++++
 .../registry/jpa/impl/GatewayRegistry.java      |  115 ++
 .../registry/jpa/impl/LoggingRegistryImpl.java  |   97 +
 .../registry/jpa/impl/ProjectRegistry.java      |  305 +++
 .../registry/jpa/impl/RegistryFactory.java      |   80 +
 .../persistance/registry/jpa/impl/UserReg.java  |   41 +
 .../jpa/model/AdvancedInputDataHandling.java    |  129 ++
 .../jpa/model/AdvancedOutputDataHandling.java   |  119 ++
 .../registry/jpa/model/ApplicationInput.java    |  173 ++
 .../registry/jpa/model/ApplicationInput_PK.java |   65 +
 .../registry/jpa/model/ApplicationOutput.java   |  150 ++
 .../jpa/model/ApplicationOutput_PK.java         |   64 +
 .../Computational_Resource_Scheduling.java      |  190 ++
 .../registry/jpa/model/Configuration.java       |   80 +
 .../registry/jpa/model/Configuration_PK.java    |   74 +
 .../registry/jpa/model/DataTransferDetail.java  |   88 +
 .../registry/jpa/model/ErrorDetail.java         |  196 ++
 .../registry/jpa/model/Experiment.java          |  211 +++
 .../jpa/model/ExperimentConfigData.java         |  106 ++
 .../registry/jpa/model/Experiment_Input.java    |  178 ++
 .../registry/jpa/model/Experiment_Input_PK.java |   64 +
 .../registry/jpa/model/Experiment_Output.java   |  151 ++
 .../jpa/model/Experiment_Output_PK.java         |   64 +
 .../persistance/registry/jpa/model/Gateway.java |   76 +
 .../registry/jpa/model/Gateway_Worker.java      |   82 +
 .../registry/jpa/model/Gateway_Worker_PK.java   |   64 +
 .../registry/jpa/model/JobDetail.java           |  120 ++
 .../registry/jpa/model/JobDetails_PK.java       |   64 +
 .../registry/jpa/model/NodeInput.java           |  171 ++
 .../registry/jpa/model/NodeInput_PK.java        |   64 +
 .../registry/jpa/model/NodeOutput.java          |  148 ++
 .../registry/jpa/model/NodeOutput_PK.java       |   64 +
 .../registry/jpa/model/Notification_Email.java  |   97 +
 .../persistance/registry/jpa/model/Project.java |  125 ++
 .../registry/jpa/model/ProjectUser.java         |   81 +
 .../registry/jpa/model/ProjectUser_PK.java      |   64 +
 .../registry/jpa/model/QosParam.java            |  119 ++
 .../persistance/registry/jpa/model/Status.java  |  174 ++
 .../registry/jpa/model/TaskDetail.java          |  119 ++
 .../persistance/registry/jpa/model/Users.java   |   55 +
 .../registry/jpa/model/WorkflowNodeDetail.java  |  107 ++
 .../registry/jpa/mongo/ExperimentRegistry.java  |   28 +
 .../persistance/registry/jpa/mongo/Test.java    |   81 +
 .../conversion/AbstractThriftDeserializer.java  |  152 ++
 .../conversion/AbstractThriftSerializer.java    |  122 ++
 .../mongo/conversion/ModelConversionHelper.java |  218 +++
 .../idot/InputDataObjectTypeDeserializer.java   |   44 +
 .../idot/InputDataObjectTypeSerializer.java     |   41 +
 .../odot/OutputDataObjectTypeDeserializer.java  |   44 +
 .../odot/OutputDataObjectTypeSerializer.java    |   41 +
 .../experiment/ExperimentDeserializer.java      |   44 +
 .../experiment/ExperimentSerializer.java        |   41 +
 .../AdvancedInputDataHandlingDeserializer.java  |   44 +
 .../AdvancedInputDataHandlingSerializer.java    |   41 +
 .../AdvancedOutputDataHandlingDeserializer.java |   44 +
 .../AdvancedOutputDataHandlingSerializer.java   |   41 +
 .../ApplicationStatusDeserializer.java          |   44 +
 .../appstatus/ApplicationStatusSerializer.java  |   42 +
 ...utationalResourceSchedulingDeserializer.java |   44 +
 ...mputationalResourceSchedulingSerializer.java |   41 +
 .../DataTransferDetailsDeserializer.java        |   44 +
 .../DataTransferDetailsSerializer.java          |   41 +
 .../errdetails/ErrorDetailsDeserializer.java    |   44 +
 .../errdetails/ErrorDetailsSerializer.java      |   41 +
 .../expstatus/ExperimentStatusDeserializer.java |   44 +
 .../expstatus/ExperimentStatusSerializer.java   |   41 +
 .../ExperimentSummaryDeserializer.java          |   44 +
 .../expsummary/ExperimentSummarySerializer.java |   41 +
 .../jobdetails/JobDetailsDeserializer.java      |   44 +
 .../jobdetails/JobDetailsSerializer.java        |   41 +
 .../jobstatus/JobStatusDeserializer.java        |   44 +
 .../jobstatus/JobStatusSerializer.java          |   41 +
 .../QualityOfServiceParamsDeserializer.java     |   44 +
 .../qosp/QualityOfServiceParamsSerializer.java  |   41 +
 .../taskdetails/TaskDetailsDeserializer.java    |   44 +
 .../taskdetails/TaskDetailsSerializer.java      |   41 +
 .../taskstatus/TaskStatusDeserializer.java      |   44 +
 .../taskstatus/TaskStatusSerializer.java        |   41 +
 .../trstatus/TransferStatusDeserializer.java    |   44 +
 .../trstatus/TransferStatusSerializer.java      |   41 +
 .../UserConfigurationDataDeserializer.java      |   44 +
 .../ucdata/UserConfigurationDataSerializer.java |   41 +
 .../ValidationResultsDeserializer.java          |   44 +
 .../ValidationResultsSerializer.java            |   41 +
 .../ValidatorResultDeserializer.java            |   44 +
 .../ValidatorResultSerializer.java              |   41 +
 .../wfnd/WorkflowNodeDetailsDeserializer.java   |   44 +
 .../wfnd/WorkflowNodeDetailsSerializer.java     |   41 +
 .../wfns/WorkflowNodeStatusDeserializer.java    |   44 +
 .../wfns/WorkflowNodeStatusSerializer.java      |   41 +
 .../conversion/gateway/GatewayDeserializer.java |   44 +
 .../conversion/gateway/GatewaySerializer.java   |   41 +
 .../conversion/group/GroupDeserializer.java     |   44 +
 .../mongo/conversion/group/GroupSerializer.java |   41 +
 .../conversion/project/ProjectDeserializer.java |   44 +
 .../conversion/project/ProjectSerializer.java   |   40 +
 .../mongo/conversion/user/UserDeserializer.java |   44 +
 .../mongo/conversion/user/UserSerializer.java   |   40 +
 .../registry/jpa/mongo/dao/ExperimentDao.java   |  346 ++++
 .../registry/jpa/mongo/utils/MongoUtil.java     |   70 +
 .../jpa/resources/AbstractResource.java         |  317 ++++
 .../AdvanceInputDataHandlingResource.java       |  168 ++
 .../AdvancedOutputDataHandlingResource.java     |  159 ++
 .../jpa/resources/ApplicationInputResource.java |  235 +++
 .../resources/ApplicationOutputResource.java    |  213 +++
 .../ComputationSchedulingResource.java          |  229 +++
 .../jpa/resources/ConfigDataResource.java       |  162 ++
 .../jpa/resources/ConfigurationResource.java    |  208 ++
 .../resources/DataTransferDetailResource.java   |  272 +++
 .../jpa/resources/ErrorDetailResource.java      |  229 +++
 .../jpa/resources/ExperimentInputResource.java  |  229 +++
 .../jpa/resources/ExperimentOutputResource.java |  209 +++
 .../jpa/resources/ExperimentResource.java       |  777 ++++++++
 .../registry/jpa/resources/GatewayResource.java |  436 +++++
 .../jpa/resources/JobDetailResource.java        |  361 ++++
 .../jpa/resources/NodeInputResource.java        |  231 +++
 .../jpa/resources/NodeOutputResource.java       |  211 +++
 .../resources/NotificationEmailResource.java    |  125 ++
 .../registry/jpa/resources/ProjectResource.java |  531 ++++++
 .../jpa/resources/ProjectUserResource.java      |  123 ++
 .../jpa/resources/QosParamResource.java         |  152 ++
 .../registry/jpa/resources/StatusResource.java  |  195 ++
 .../jpa/resources/TaskDetailResource.java       |  661 +++++++
 .../registry/jpa/resources/UserResource.java    |  186 ++
 .../registry/jpa/resources/Utils.java           |  824 ++++++++
 .../registry/jpa/resources/WorkerResource.java  |  908 +++++++++
 .../resources/WorkflowNodeDetailResource.java   |  473 +++++
 .../registry/jpa/utils/QueryGenerator.java      |  128 ++
 .../jpa/utils/ThriftDataModelConversion.java    |  714 +++++++
 .../src/main/resources/META-INF/persistence.xml |   65 +
 .../main/resources/airavata-server.properties   |  280 +++
 .../src/main/resources/registry-derby.sql       |  391 ++++
 .../src/main/resources/registry-mysql.sql       |  392 ++++
 .../registry/mongo/ExperimentDaoTest.java       |  268 +++
 .../registry/RegistryUseCaseTest.java           |  291 +++
 modules/registry/pom.xml                        |    1 +
 140 files changed, 21565 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/JPAConstants.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/JPAConstants.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/JPAConstants.java
new file mode 100644
index 0000000..deb3ba2
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/JPAConstants.java
@@ -0,0 +1,33 @@
+/*
+ *
+ * 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.persistance.registry.jpa;
+
+public class JPAConstants {
+	public static final String KEY_JDBC_URL = "registry.jdbc.url";
+	public static final String KEY_JDBC_USER = "registry.jdbc.user";
+	public static final String KEY_JDBC_PASSWORD = "registry.jdbc.password";
+	public static final String KEY_JDBC_DRIVER = "registry.jdbc.driver";
+	public static final String KEY_DERBY_START_ENABLE = "start.derby.server.mode";
+    public static final String VALIDATION_QUERY = "validationQuery";
+    public static final String JPA_CACHE_SIZE = "jpa.cache.size";
+    public static final String ENABLE_CACHING = "cache.enable";
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/Resource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/Resource.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/Resource.java
new file mode 100644
index 0000000..640f771
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/Resource.java
@@ -0,0 +1,71 @@
+/*
+ *
+ * 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.persistance.registry.jpa;
+
+import org.apache.airavata.registry.cpi.RegistryException;
+
+import java.util.List;
+
+public interface Resource {
+    /**
+     * This method will create associate resource objects for the given resource type.
+     * @param type child resource type
+     * @return associate child resource
+     */
+    Resource create(ResourceType type) throws RegistryException, RegistryException;
+
+    /**
+     * This method will remove the given child resource from the database
+     * @param type child resource type
+     * @param name child resource name
+     */
+    void remove(ResourceType type, Object name) throws RegistryException;
+
+    /**
+     *  This method will return the given child resource from the database
+     * @param type child resource type
+     * @param name child resource name
+     * @return associate child resource
+     */
+    Resource get(ResourceType type, Object name) throws RegistryException;
+
+    /**
+     * This method will list all the child resources for the given resource type
+     * @param type child resource type
+     * @return list of child resources of the given child resource type
+     */
+    List<Resource> get(ResourceType type) throws RegistryException;
+
+    /**
+     * This method will saveExperiment the resource to the database.
+     */
+    void save() throws RegistryException;
+
+    /**
+     * This method will check whether an entry from the given resource type and resource name
+     * exists in the database
+     * @param type child resource type
+     * @param name child resource name
+     * @return whether the entry exists in the database or not
+     */
+    boolean isExists(ResourceType type, Object name) throws RegistryException;
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceType.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceType.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceType.java
new file mode 100644
index 0000000..0a38664
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceType.java
@@ -0,0 +1,49 @@
+/*
+ *
+ * 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.persistance.registry.jpa;
+
+public enum ResourceType {
+    GATEWAY,
+    PROJECT,
+    USER,
+    PROJECT_USER,
+    CONFIGURATION,
+    GATEWAY_WORKER,
+    EXPERIMENT,
+    NOTIFICATION_EMAIL,
+    EXPERIMENT_INPUT,
+    EXPERIMENT_OUTPUT,
+    WORKFLOW_NODE_DETAIL,
+    TASK_DETAIL,
+    ERROR_DETAIL,
+    APPLICATION_INPUT,
+    APPLICATION_OUTPUT,
+    NODE_INPUT,
+    NODE_OUTPUT,
+    JOB_DETAIL,
+    DATA_TRANSFER_DETAIL,
+    STATUS,
+    CONFIG_DATA,
+    COMPUTATIONAL_RESOURCE_SCHEDULING,
+    ADVANCE_INPUT_DATA_HANDLING,
+    ADVANCE_OUTPUT_DATA_HANDLING,
+    QOS_PARAM
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e13d90da/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
new file mode 100644
index 0000000..4b6fc80
--- /dev/null
+++ b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
@@ -0,0 +1,525 @@
+/*
+ *
+ * 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.persistance.registry.jpa;
+
+import org.apache.airavata.persistance.registry.jpa.model.*;
+import org.apache.airavata.persistance.registry.jpa.resources.*;
+import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
+import org.apache.airavata.registry.cpi.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.Persistence;
+import javax.persistence.Query;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class ResourceUtils {
+    private final static Logger logger = LoggerFactory.getLogger(ResourceUtils.class);
+    private static final String PERSISTENCE_UNIT_NAME = "airavata_data";
+    protected static EntityManagerFactory factory;
+
+    public static void reset(){
+    	factory=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();
+            System.out.println(connectionProperties);
+            Map<String, String> properties = new HashMap<String, String>();
+            properties.put("openjpa.ConnectionDriverName", "org.apache.commons.dbcp.BasicDataSource");
+            properties.put("openjpa.ConnectionProperties", connectionProperties);
+            properties.put("openjpa.DynamicEnhancementAgent", "true");
+            properties.put("openjpa.RuntimeUnenhancedClasses", "unsupported");
+            properties.put("openjpa.DataCache","" + Utils.isCachingEnabled() + "(CacheSize=" + Utils.getJPACacheSize() + ", SoftReferenceSize=0)");
+            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.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);
+        }
+		return factory.createEntityManager();
+    }
+
+    /**
+     * @param gatewayId
+     * @return
+     */
+    public static Resource createGateway(String gatewayId) throws RegistryException {
+        if (!isGatewayExist(gatewayId)) {
+            GatewayResource gatewayResource = new GatewayResource();
+            gatewayResource.setGatewayId(gatewayId);
+            return gatewayResource;
+        }else {
+            return getGateway(gatewayId);
+        }
+    }
+
+    public static UserResource createUser(String username, String password) throws RegistryException {
+        if (!isUserExist(username)) {
+            UserResource userResource = new UserResource();
+            userResource.setUserName(username);
+            userResource.setPassword(password);
+            return userResource;
+        }else {
+            return (UserResource)getUser(username);
+        }
+
+    }
+
+    public static Resource getGateway(String gatewayId) throws RegistryException{
+        EntityManager em = null;
+        try {
+            if (isGatewayExist(gatewayId)) {
+                em = getEntityManager();
+                Gateway gateway = em.find(Gateway.class, gatewayId);
+                GatewayResource gatewayResource = (GatewayResource)Utils.getResource(ResourceType.GATEWAY, gateway);
+                em.close();
+                return gatewayResource;
+            }
+        }catch (Exception e){
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return null;
+    }
+
+    public static void addUser (String userName, String password) throws RegistryException{
+        UserResource resource = new UserResource();
+        resource.setUserName(userName);
+        resource.setPassword(password);
+        resource.save();
+    }
+
+    public static boolean isUserExist (String username) throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = getEntityManager();
+            em.getTransaction().begin();
+            QueryGenerator generator = new QueryGenerator(AbstractResource.USERS);
+            generator.setParameter(AbstractResource.UserConstants.USERNAME, username);
+            Query q = generator.selectQuery(em);
+            int size = q.getResultList().size();
+            em.getTransaction().commit();
+            em.close();
+            return size>0;
+        } catch (Exception e){
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+
+    public static Resource getUser(String userName) throws RegistryException{
+        EntityManager em = null;
+        try {
+            if (isUserExist(userName)) {
+                em = getEntityManager();
+                Users user =  em.find(Users.class, userName);
+                UserResource userResource = (UserResource)Utils.getResource(ResourceType.USER, user);
+                em.close();
+                return userResource;
+            }
+        }catch (Exception e){
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return null;
+
+    }
+
+    public static Resource getWorker(String gatewayId, String userName) throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = getEntityManager();
+            Gateway_Worker gatewayWorker = em.find(Gateway_Worker.class, new Gateway_Worker_PK(gatewayId, userName));
+            WorkerResource workerResource = (WorkerResource) Utils.getResource(ResourceType.GATEWAY_WORKER, gatewayWorker);
+            em.close();
+            return workerResource;
+        }catch (Exception e){
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+
+
+    }
+
+
+    /**
+     * @param gatewayId
+     * @return
+     */
+    public static boolean isGatewayExist(String gatewayId) throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = getEntityManager();
+            em.getTransaction().begin();
+            QueryGenerator generator = new QueryGenerator(AbstractResource.GATEWAY);
+            generator.setParameter(AbstractResource.GatewayConstants.GATEWAY_ID, gatewayId);
+            Query q = generator.selectQuery(em);
+            int size = q.getResultList().size();
+            em.getTransaction().commit();
+            em.close();
+            return size>0;
+        }catch (Exception e){
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+
+    }
+
+    public static List<Resource> getAllGateways() throws RegistryException{
+        List<Resource> resourceList = new ArrayList<Resource>();
+        EntityManager em = null;
+        try {
+            em = getEntityManager();
+            em.getTransaction().begin();
+            QueryGenerator generator = new QueryGenerator(AbstractResource.GATEWAY);
+            Query q = generator.selectQuery(em);
+            List results = q.getResultList();
+            if (results.size() != 0) {
+                for (Object result : results) {
+                    Gateway gateway = (Gateway) result;
+                    GatewayResource gatewayResource =
+                            (GatewayResource) Utils.getResource(ResourceType.GATEWAY, gateway);
+                    resourceList.add(gatewayResource);
+                }
+            }
+            em.getTransaction().commit();
+            em.close();
+        }catch (Exception e){
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return resourceList;
+    }
+
+    /**
+     * @param gatewayId
+     * @return
+     */
+    public static boolean removeGateway(String gatewayId) {
+        EntityManager em = null;
+        try {
+            em = getEntityManager();
+            em.getTransaction().begin();
+            QueryGenerator generator = new QueryGenerator(AbstractResource.GATEWAY);
+            generator.setParameter(AbstractResource.GatewayConstants.GATEWAY_ID, gatewayId);
+            Query q = generator.deleteQuery(em);
+            q.executeUpdate();
+            em.getTransaction().commit();
+            em.close();
+            return true;
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return false;
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    /**
+     * @param gatewayResource
+     * @param userResource
+     */
+    public static WorkerResource addGatewayWorker(GatewayResource gatewayResource, UserResource userResource) throws RegistryException{
+        EntityManager em = null;
+        try {
+            em = getEntityManager();
+            em.getTransaction().begin();
+            if (!isGatewayExist(gatewayResource.getGatewayName())){
+                gatewayResource.save();
+            }
+            if (!isUserExist(userResource.getUserName())){
+                userResource.save();
+            }
+            Gateway gateway = em.find(Gateway.class, gatewayResource.getGatewayId());
+            Users user = em.find(Users.class, userResource.getUserName());
+            Gateway_Worker gatewayWorker = new Gateway_Worker();
+            gatewayWorker.setGateway(gateway);
+            gatewayWorker.setUser(user);
+            em.persist(gatewayWorker);
+            em.getTransaction().commit();
+            em.close();
+            return (WorkerResource)Utils.getResource(ResourceType.GATEWAY_WORKER, gatewayWorker);
+        } catch (Exception e){
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    /**
+     * @param gatewayResource
+     * @param userResource
+     * @return
+     */
+    public static boolean removeGatewayWorker(GatewayResource gatewayResource, UserResource userResource) {
+        EntityManager em = null;
+        try {
+            em = getEntityManager();
+            em.getTransaction().begin();
+            QueryGenerator generator = new QueryGenerator(AbstractResource.GATEWAY_WORKER);
+            generator.setParameter(AbstractResource.GatewayWorkerConstants.GATEWAY_ID,
+                    gatewayResource.getGatewayName());
+            generator.setParameter(AbstractResource.UserConstants.USERNAME, userResource.getUserName());
+            Query q = generator.deleteQuery(em);
+            q.executeUpdate();
+            em.getTransaction().commit();
+            em.close();
+            return true;
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+            return false;
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+
+    }
+
+    /**
+     * @param configKey
+     * @return
+     */
+    public static List<ConfigurationResource> getConfigurations(String configKey){
+        List<ConfigurationResource> list = new ArrayList<ConfigurationResource>();
+        EntityManager em = null;
+        try {
+            em = getEntityManager();
+            em.getTransaction().begin();
+            QueryGenerator generator = new QueryGenerator(AbstractResource.CONFIGURATION);
+            generator.setParameter(AbstractResource.ConfigurationConstants.CONFIG_KEY, configKey);
+            Query q = generator.selectQuery(em);
+            List<?> resultList = q.getResultList();
+            if (resultList.size() != 0) {
+                for (Object result : resultList) {
+                    ConfigurationResource configurationResource = createConfigurationResourceObject(result);
+                    list.add(configurationResource);
+                }
+            }
+            em.getTransaction().commit();
+            em.close();
+        }catch (Exception e) {
+            logger.error(e.getMessage(), e);
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+        return list;
+    }
+
+    /**
+     * @param configKey
+     * @return
+     */
+    public static ConfigurationResource getConfiguration(String configKey){
+        List<ConfigurationResource> configurations = getConfigurations(configKey);
+        return (configurations != null && configurations.size() > 0) ? configurations.get(0) : null;
+    }
+
+    /**
+     * @param configKey
+     * @return
+     */
+    public static boolean isConfigurationExist(String configKey){
+        List<ConfigurationResource> configurations = getConfigurations(configKey);
+        return (configurations != null && configurations.size() > 0);
+    }
+
+    /**
+     * @param configKey
+     * @return
+     */
+    public static ConfigurationResource createConfiguration(String configKey) {
+        ConfigurationResource config = new ConfigurationResource();
+        config.setConfigKey(configKey);
+        return config;
+    }
+
+    /**
+     * @param result
+     * @return
+     */
+    private static ConfigurationResource createConfigurationResourceObject(
+            Object result) {
+        Configuration configuration = (Configuration) result;
+        ConfigurationResource configurationResource = new ConfigurationResource(configuration.getConfig_key(), configuration.getConfig_val());
+        configurationResource.setExpireDate(configuration.getExpire_date());
+        return configurationResource;
+    }
+
+    /**
+     * @param configkey
+     * @param configValue
+     */
+    public static void removeConfiguration(String configkey, String configValue) throws RegistryException{
+        QueryGenerator queryGenerator = new QueryGenerator(AbstractResource.CONFIGURATION);
+        queryGenerator.setParameter(AbstractResource.ConfigurationConstants.CONFIG_KEY, configkey);
+        queryGenerator.setParameter(AbstractResource.ConfigurationConstants.CONFIG_VAL, configValue);
+        EntityManager em = null;
+        try {
+            if(isConfigurationExists(configkey, configValue)){
+                em = getEntityManager();
+                em.getTransaction().begin();
+                Query q = queryGenerator.deleteQuery(em);
+                q.executeUpdate();
+                em.getTransaction().commit();
+                em.close();
+            }
+        }catch (Exception e){
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    /**
+     * @param configkey
+     */
+    public static void removeConfiguration(String configkey) throws RegistryException{
+        QueryGenerator queryGenerator = new QueryGenerator(AbstractResource.CONFIGURATION);
+        queryGenerator.setParameter(AbstractResource.ConfigurationConstants.CONFIG_KEY, configkey);
+        EntityManager em = null;
+        try {
+            if(isConfigurationExist(configkey)){
+                em = getEntityManager();
+                em.getTransaction().begin();
+                Query q = queryGenerator.deleteQuery(em);
+                q.executeUpdate();
+                em.getTransaction().commit();
+                em.close();
+            }
+        }catch (Exception e){
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+
+    public static boolean isConfigurationExists(String configKey, String configVal) throws RegistryException{
+        EntityManager em = null;
+        try{
+            //Currently categoryID is hardcoded value
+            em = ResourceUtils.getEntityManager();
+            Configuration existing = em.find(Configuration.class, new Configuration_PK(configKey, configVal, AbstractResource.ConfigurationConstants.CATEGORY_ID_DEFAULT_VALUE));
+            em.close();
+            return existing!= null;
+        } catch (Exception e){
+            logger.error(e.getMessage(), e);
+            throw new RegistryException(e);
+        }finally {
+            if (em != null && em.isOpen()){
+                if (em.getTransaction().isActive()){
+                    em.getTransaction().rollback();
+                }
+                em.close();
+            }
+        }
+    }
+}