airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [04/31] airavata git commit: Feature request: User Compute Preference
Date Fri, 07 Oct 2016 20:52:31 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/81c6ea84/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
index 00db295..3454d4a 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
@@ -23,15 +23,32 @@
  */
 package org.apache.airavata.model.process;
 
-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.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 javax.annotation.Generated;
-import java.util.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 /**
@@ -51,7 +68,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
   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)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 LAST_UPDATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastUpdateTime", org.apache.thrift.protocol.TType.I64, (short)4);
-  private static final org.apache.thrift.protocol.TField PROCESS_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("processStatuses", org.apache.thrift.protocol.TType.LIST, (short)5);
+  private static final org.apache.thrift.protocol.TField PROCESS_STATUSES_FIELD_DESC = new org.apache.thrift.protocol.TField("processStatuses", org.apache.thrift.protocol.TType.LIST, (short)5);
   private static final org.apache.thrift.protocol.TField PROCESS_DETAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("processDetail", org.apache.thrift.protocol.TType.STRING, (short)6);
   private static final org.apache.thrift.protocol.TField APPLICATION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)7);
   private static final org.apache.thrift.protocol.TField APPLICATION_DEPLOYMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationDeploymentId", org.apache.thrift.protocol.TType.STRING, (short)8);
@@ -61,7 +78,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
   private static final org.apache.thrift.protocol.TField PROCESS_RESOURCE_SCHEDULE_FIELD_DESC = new org.apache.thrift.protocol.TField("processResourceSchedule", org.apache.thrift.protocol.TType.STRUCT, (short)12);
   private static final org.apache.thrift.protocol.TField TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("tasks", org.apache.thrift.protocol.TType.LIST, (short)13);
   private static final org.apache.thrift.protocol.TField TASK_DAG_FIELD_DESC = new org.apache.thrift.protocol.TField("taskDag", org.apache.thrift.protocol.TType.STRING, (short)14);
-  private static final org.apache.thrift.protocol.TField PROCESS_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("processErrors", org.apache.thrift.protocol.TType.LIST, (short)15);
+  private static final org.apache.thrift.protocol.TField PROCESS_ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("processErrors", org.apache.thrift.protocol.TType.LIST, (short)15);
   private static final org.apache.thrift.protocol.TField GATEWAY_EXECUTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayExecutionId", org.apache.thrift.protocol.TType.STRING, (short)16);
   private static final org.apache.thrift.protocol.TField ENABLE_EMAIL_NOTIFICATION_FIELD_DESC = new org.apache.thrift.protocol.TField("enableEmailNotification", org.apache.thrift.protocol.TType.BOOL, (short)17);
   private static final org.apache.thrift.protocol.TField EMAIL_ADDRESSES_FIELD_DESC = new org.apache.thrift.protocol.TField("emailAddresses", org.apache.thrift.protocol.TType.LIST, (short)18);
@@ -107,7 +124,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
     EXPERIMENT_ID((short)2, "experimentId"),
     CREATION_TIME((short)3, "creationTime"),
     LAST_UPDATE_TIME((short)4, "lastUpdateTime"),
-    PROCESS_STATUS((short)5, "processStatuses"),
+    PROCESS_STATUSES((short)5, "processStatuses"),
     PROCESS_DETAIL((short)6, "processDetail"),
     APPLICATION_INTERFACE_ID((short)7, "applicationInterfaceId"),
     APPLICATION_DEPLOYMENT_ID((short)8, "applicationDeploymentId"),
@@ -117,7 +134,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
     PROCESS_RESOURCE_SCHEDULE((short)12, "processResourceSchedule"),
     TASKS((short)13, "tasks"),
     TASK_DAG((short)14, "taskDag"),
-    PROCESS_ERROR((short)15, "processErrors"),
+    PROCESS_ERRORS((short)15, "processErrors"),
     GATEWAY_EXECUTION_ID((short)16, "gatewayExecutionId"),
     ENABLE_EMAIL_NOTIFICATION((short)17, "enableEmailNotification"),
     EMAIL_ADDRESSES((short)18, "emailAddresses"),
@@ -148,8 +165,8 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
           return CREATION_TIME;
         case 4: // LAST_UPDATE_TIME
           return LAST_UPDATE_TIME;
-        case 5: // PROCESS_STATUS
-          return PROCESS_STATUS;
+        case 5: // PROCESS_STATUSES
+          return PROCESS_STATUSES;
         case 6: // PROCESS_DETAIL
           return PROCESS_DETAIL;
         case 7: // APPLICATION_INTERFACE_ID
@@ -168,8 +185,8 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
           return TASKS;
         case 14: // TASK_DAG
           return TASK_DAG;
-        case 15: // PROCESS_ERROR
-          return PROCESS_ERROR;
+        case 15: // PROCESS_ERRORS
+          return PROCESS_ERRORS;
         case 16: // GATEWAY_EXECUTION_ID
           return GATEWAY_EXECUTION_ID;
         case 17: // ENABLE_EMAIL_NOTIFICATION
@@ -231,7 +248,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
   private static final int __ENABLEEMAILNOTIFICATION_ISSET_ID = 2;
   private static final int __GENERATECERT_ISSET_ID = 3;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.LAST_UPDATE_TIME,_Fields.PROCESS_STATUS,_Fields.PROCESS_DETAIL,_Fields.APPLICATION_INTERFACE_ID,_Fields.APPLICATION_DEPLOYMENT_ID,_Fields.COMPUTE_RESOURCE_ID,_Fields.PROCESS_INPUTS,_Fields.PROCESS_OUTPUTS,_Fields.PROCESS_RESOURCE_SCHEDULE,_Fields.TASKS,_Fields.TASK_DAG,_Fields.PROCESS_ERROR,_Fields.GATEWAY_EXECUTION_ID,_Fields.ENABLE_EMAIL_NOTIFICATION,_Fields.EMAIL_ADDRESSES,_Fields.STORAGE_RESOURCE_ID,_Fields.USER_DN,_Fields.GENERATE_CERT,_Fields.EXPERIMENT_DATA_DIR,_Fields.USER_NAME};
+  private static final _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.LAST_UPDATE_TIME,_Fields.PROCESS_STATUSES,_Fields.PROCESS_DETAIL,_Fields.APPLICATION_INTERFACE_ID,_Fields.APPLICATION_DEPLOYMENT_ID,_Fields.COMPUTE_RESOURCE_ID,_Fields.PROCESS_INPUTS,_Fields.PROCESS_OUTPUTS,_Fields.PROCESS_RESOURCE_SCHEDULE,_Fields.TASKS,_Fields.TASK_DAG,_Fields.PROCESS_ERRORS,_Fields.GATEWAY_EXECUTION_ID,_Fields.ENABLE_EMAIL_NOTIFICATION,_Fields.EMAIL_ADDRESSES,_Fields.STORAGE_RESOURCE_ID,_Fields.USER_DN,_Fields.GENERATE_CERT,_Fields.EXPERIMENT_DATA_DIR,_Fields.USER_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);
@@ -243,7 +260,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.LAST_UPDATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("lastUpdateTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-    tmpMap.put(_Fields.PROCESS_STATUS, new org.apache.thrift.meta_data.FieldMetaData("processStatuses", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+    tmpMap.put(_Fields.PROCESS_STATUSES, new org.apache.thrift.meta_data.FieldMetaData("processStatuses", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.status.ProcessStatus.class))));
     tmpMap.put(_Fields.PROCESS_DETAIL, new org.apache.thrift.meta_data.FieldMetaData("processDetail", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
@@ -267,7 +284,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.task.TaskModel.class))));
     tmpMap.put(_Fields.TASK_DAG, new org.apache.thrift.meta_data.FieldMetaData("taskDag", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(_Fields.PROCESS_ERROR, new org.apache.thrift.meta_data.FieldMetaData("processErrors", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+    tmpMap.put(_Fields.PROCESS_ERRORS, new org.apache.thrift.meta_data.FieldMetaData("processErrors", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.commons.ErrorModel.class))));
     tmpMap.put(_Fields.GATEWAY_EXECUTION_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayExecutionId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
@@ -320,12 +337,12 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
     }
     this.creationTime = other.creationTime;
     this.lastUpdateTime = other.lastUpdateTime;
-    if (other.isSetProcessStatus()) {
-      List<org.apache.airavata.model.status.ProcessStatus> __this__processStatus = new ArrayList<org.apache.airavata.model.status.ProcessStatus>(other.processStatuses.size());
+    if (other.isSetProcessStatuses()) {
+      List<org.apache.airavata.model.status.ProcessStatus> __this__processStatuses = new ArrayList<org.apache.airavata.model.status.ProcessStatus>(other.processStatuses.size());
       for (org.apache.airavata.model.status.ProcessStatus other_element : other.processStatuses) {
-        __this__processStatus.add(new org.apache.airavata.model.status.ProcessStatus(other_element));
+        __this__processStatuses.add(new org.apache.airavata.model.status.ProcessStatus(other_element));
       }
-      this.processStatuses = __this__processStatus;
+      this.processStatuses = __this__processStatuses;
     }
     if (other.isSetProcessDetail()) {
       this.processDetail = other.processDetail;
@@ -366,12 +383,12 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
     if (other.isSetTaskDag()) {
       this.taskDag = other.taskDag;
     }
-    if (other.isSetProcessError()) {
-      List<org.apache.airavata.model.commons.ErrorModel> __this__processError = new ArrayList<org.apache.airavata.model.commons.ErrorModel>(other.processErrors.size());
+    if (other.isSetProcessErrors()) {
+      List<org.apache.airavata.model.commons.ErrorModel> __this__processErrors = new ArrayList<org.apache.airavata.model.commons.ErrorModel>(other.processErrors.size());
       for (org.apache.airavata.model.commons.ErrorModel other_element : other.processErrors) {
-        __this__processError.add(new org.apache.airavata.model.commons.ErrorModel(other_element));
+        __this__processErrors.add(new org.apache.airavata.model.commons.ErrorModel(other_element));
       }
-      this.processErrors = __this__processError;
+      this.processErrors = __this__processErrors;
     }
     if (other.isSetGatewayExecutionId()) {
       this.gatewayExecutionId = other.gatewayExecutionId;
@@ -522,15 +539,15 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTUPDATETIME_ISSET_ID, value);
   }
 
-  public int getProcessStatusSize() {
+  public int getProcessStatusesSize() {
     return (this.processStatuses == null) ? 0 : this.processStatuses.size();
   }
 
-  public java.util.Iterator<org.apache.airavata.model.status.ProcessStatus> getProcessStatusIterator() {
+  public java.util.Iterator<org.apache.airavata.model.status.ProcessStatus> getProcessStatusesIterator() {
     return (this.processStatuses == null) ? null : this.processStatuses.iterator();
   }
 
-  public void addToProcessStatus(org.apache.airavata.model.status.ProcessStatus elem) {
+  public void addToProcessStatuses(org.apache.airavata.model.status.ProcessStatus elem) {
     if (this.processStatuses == null) {
       this.processStatuses = new ArrayList<org.apache.airavata.model.status.ProcessStatus>();
     }
@@ -545,16 +562,16 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
     this.processStatuses = processStatuses;
   }
 
-  public void unsetProcessStatus() {
+  public void unsetProcessStatuses() {
     this.processStatuses = null;
   }
 
   /** Returns true if field processStatuses is set (has been assigned a value) and false otherwise */
-  public boolean isSetProcessStatus() {
+  public boolean isSetProcessStatuses() {
     return this.processStatuses != null;
   }
 
-  public void setProcessStatusIsSet(boolean value) {
+  public void setProcessStatusesIsSet(boolean value) {
     if (!value) {
       this.processStatuses = null;
     }
@@ -812,15 +829,15 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
     }
   }
 
-  public int getProcessErrorSize() {
+  public int getProcessErrorsSize() {
     return (this.processErrors == null) ? 0 : this.processErrors.size();
   }
 
-  public java.util.Iterator<org.apache.airavata.model.commons.ErrorModel> getProcessErrorIterator() {
+  public java.util.Iterator<org.apache.airavata.model.commons.ErrorModel> getProcessErrorsIterator() {
     return (this.processErrors == null) ? null : this.processErrors.iterator();
   }
 
-  public void addToProcessError(org.apache.airavata.model.commons.ErrorModel elem) {
+  public void addToProcessErrors(org.apache.airavata.model.commons.ErrorModel elem) {
     if (this.processErrors == null) {
       this.processErrors = new ArrayList<org.apache.airavata.model.commons.ErrorModel>();
     }
@@ -835,16 +852,16 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
     this.processErrors = processErrors;
   }
 
-  public void unsetProcessError() {
+  public void unsetProcessErrors() {
     this.processErrors = null;
   }
 
   /** Returns true if field processErrors is set (has been assigned a value) and false otherwise */
-  public boolean isSetProcessError() {
+  public boolean isSetProcessErrors() {
     return this.processErrors != null;
   }
 
-  public void setProcessErrorIsSet(boolean value) {
+  public void setProcessErrorsIsSet(boolean value) {
     if (!value) {
       this.processErrors = null;
     }
@@ -1081,11 +1098,11 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
       }
       break;
 
-    case PROCESS_STATUS:
+    case PROCESS_STATUSES:
       if (value == null) {
-        unsetProcessStatus();
+        unsetProcessStatuses();
       } else {
-        setProcessStatuses((List<org.apache.airavata.model.status.ProcessStatus>) value);
+        setProcessStatuses((List<org.apache.airavata.model.status.ProcessStatus>)value);
       }
       break;
 
@@ -1161,11 +1178,11 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
       }
       break;
 
-    case PROCESS_ERROR:
+    case PROCESS_ERRORS:
       if (value == null) {
-        unsetProcessError();
+        unsetProcessErrors();
       } else {
-        setProcessErrors((List<org.apache.airavata.model.commons.ErrorModel>) value);
+        setProcessErrors((List<org.apache.airavata.model.commons.ErrorModel>)value);
       }
       break;
 
@@ -1250,7 +1267,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
     case LAST_UPDATE_TIME:
       return getLastUpdateTime();
 
-    case PROCESS_STATUS:
+    case PROCESS_STATUSES:
       return getProcessStatuses();
 
     case PROCESS_DETAIL:
@@ -1280,7 +1297,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
     case TASK_DAG:
       return getTaskDag();
 
-    case PROCESS_ERROR:
+    case PROCESS_ERRORS:
       return getProcessErrors();
 
     case GATEWAY_EXECUTION_ID:
@@ -1326,8 +1343,8 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
       return isSetCreationTime();
     case LAST_UPDATE_TIME:
       return isSetLastUpdateTime();
-    case PROCESS_STATUS:
-      return isSetProcessStatus();
+    case PROCESS_STATUSES:
+      return isSetProcessStatuses();
     case PROCESS_DETAIL:
       return isSetProcessDetail();
     case APPLICATION_INTERFACE_ID:
@@ -1346,8 +1363,8 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
       return isSetTasks();
     case TASK_DAG:
       return isSetTaskDag();
-    case PROCESS_ERROR:
-      return isSetProcessError();
+    case PROCESS_ERRORS:
+      return isSetProcessErrors();
     case GATEWAY_EXECUTION_ID:
       return isSetGatewayExecutionId();
     case ENABLE_EMAIL_NOTIFICATION:
@@ -1417,10 +1434,10 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
         return false;
     }
 
-    boolean this_present_processStatus = true && this.isSetProcessStatus();
-    boolean that_present_processStatus = true && that.isSetProcessStatus();
-    if (this_present_processStatus || that_present_processStatus) {
-      if (!(this_present_processStatus && that_present_processStatus))
+    boolean this_present_processStatuses = true && this.isSetProcessStatuses();
+    boolean that_present_processStatuses = true && that.isSetProcessStatuses();
+    if (this_present_processStatuses || that_present_processStatuses) {
+      if (!(this_present_processStatuses && that_present_processStatuses))
         return false;
       if (!this.processStatuses.equals(that.processStatuses))
         return false;
@@ -1507,10 +1524,10 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
         return false;
     }
 
-    boolean this_present_processError = true && this.isSetProcessError();
-    boolean that_present_processError = true && that.isSetProcessError();
-    if (this_present_processError || that_present_processError) {
-      if (!(this_present_processError && that_present_processError))
+    boolean this_present_processErrors = true && this.isSetProcessErrors();
+    boolean that_present_processErrors = true && that.isSetProcessErrors();
+    if (this_present_processErrors || that_present_processErrors) {
+      if (!(this_present_processErrors && that_present_processErrors))
         return false;
       if (!this.processErrors.equals(that.processErrors))
         return false;
@@ -1615,9 +1632,9 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
     if (present_lastUpdateTime)
       list.add(lastUpdateTime);
 
-    boolean present_processStatus = true && (isSetProcessStatus());
-    list.add(present_processStatus);
-    if (present_processStatus)
+    boolean present_processStatuses = true && (isSetProcessStatuses());
+    list.add(present_processStatuses);
+    if (present_processStatuses)
       list.add(processStatuses);
 
     boolean present_processDetail = true && (isSetProcessDetail());
@@ -1665,9 +1682,9 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
     if (present_taskDag)
       list.add(taskDag);
 
-    boolean present_processError = true && (isSetProcessError());
-    list.add(present_processError);
-    if (present_processError)
+    boolean present_processErrors = true && (isSetProcessErrors());
+    list.add(present_processErrors);
+    if (present_processErrors)
       list.add(processErrors);
 
     boolean present_gatewayExecutionId = true && (isSetGatewayExecutionId());
@@ -1761,11 +1778,11 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetProcessStatus()).compareTo(other.isSetProcessStatus());
+    lastComparison = Boolean.valueOf(isSetProcessStatuses()).compareTo(other.isSetProcessStatuses());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetProcessStatus()) {
+    if (isSetProcessStatuses()) {
       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.processStatuses, other.processStatuses);
       if (lastComparison != 0) {
         return lastComparison;
@@ -1861,11 +1878,11 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetProcessError()).compareTo(other.isSetProcessError());
+    lastComparison = Boolean.valueOf(isSetProcessErrors()).compareTo(other.isSetProcessErrors());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetProcessError()) {
+    if (isSetProcessErrors()) {
       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.processErrors, other.processErrors);
       if (lastComparison != 0) {
         return lastComparison;
@@ -1998,7 +2015,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
       sb.append(this.lastUpdateTime);
       first = false;
     }
-    if (isSetProcessStatus()) {
+    if (isSetProcessStatuses()) {
       if (!first) sb.append(", ");
       sb.append("processStatuses:");
       if (this.processStatuses == null) {
@@ -2098,7 +2115,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
       }
       first = false;
     }
-    if (isSetProcessError()) {
+    if (isSetProcessErrors()) {
       if (!first) sb.append(", ");
       sb.append("processErrors:");
       if (this.processErrors == null) {
@@ -2268,7 +2285,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 5: // PROCESS_STATUS
+          case 5: // PROCESS_STATUSES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
                 org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
@@ -2282,7 +2299,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
                 }
                 iprot.readListEnd();
               }
-              struct.setProcessStatusIsSet(true);
+              struct.setProcessStatusesIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -2393,7 +2410,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 15: // PROCESS_ERROR
+          case 15: // PROCESS_ERRORS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
                 org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
@@ -2407,7 +2424,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
                 }
                 iprot.readListEnd();
               }
-              struct.setProcessErrorIsSet(true);
+              struct.setProcessErrorsIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -2520,8 +2537,8 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
         oprot.writeFieldEnd();
       }
       if (struct.processStatuses != null) {
-        if (struct.isSetProcessStatus()) {
-          oprot.writeFieldBegin(PROCESS_STATUS_FIELD_DESC);
+        if (struct.isSetProcessStatuses()) {
+          oprot.writeFieldBegin(PROCESS_STATUSES_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.processStatuses.size()));
             for (org.apache.airavata.model.status.ProcessStatus _iter18 : struct.processStatuses)
@@ -2618,8 +2635,8 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
         }
       }
       if (struct.processErrors != null) {
-        if (struct.isSetProcessError()) {
-          oprot.writeFieldBegin(PROCESS_ERROR_FIELD_DESC);
+        if (struct.isSetProcessErrors()) {
+          oprot.writeFieldBegin(PROCESS_ERRORS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.processErrors.size()));
             for (org.apache.airavata.model.commons.ErrorModel _iter22 : struct.processErrors)
@@ -2716,7 +2733,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
       if (struct.isSetLastUpdateTime()) {
         optionals.set(1);
       }
-      if (struct.isSetProcessStatus()) {
+      if (struct.isSetProcessStatuses()) {
         optionals.set(2);
       }
       if (struct.isSetProcessDetail()) {
@@ -2746,7 +2763,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
       if (struct.isSetTaskDag()) {
         optionals.set(11);
       }
-      if (struct.isSetProcessError()) {
+      if (struct.isSetProcessErrors()) {
         optionals.set(12);
       }
       if (struct.isSetGatewayExecutionId()) {
@@ -2780,7 +2797,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
       if (struct.isSetLastUpdateTime()) {
         oprot.writeI64(struct.lastUpdateTime);
       }
-      if (struct.isSetProcessStatus()) {
+      if (struct.isSetProcessStatuses()) {
         {
           oprot.writeI32(struct.processStatuses.size());
           for (org.apache.airavata.model.status.ProcessStatus _iter24 : struct.processStatuses)
@@ -2834,7 +2851,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
       if (struct.isSetTaskDag()) {
         oprot.writeString(struct.taskDag);
       }
-      if (struct.isSetProcessError()) {
+      if (struct.isSetProcessErrors()) {
         {
           oprot.writeI32(struct.processErrors.size());
           for (org.apache.airavata.model.commons.ErrorModel _iter28 : struct.processErrors)
@@ -2903,7 +2920,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
             struct.processStatuses.add(_elem31);
           }
         }
-        struct.setProcessStatusIsSet(true);
+        struct.setProcessStatusesIsSet(true);
       }
       if (incoming.get(3)) {
         struct.processDetail = iprot.readString();
@@ -2984,7 +3001,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
             struct.processErrors.add(_elem43);
           }
         }
-        struct.setProcessErrorIsSet(true);
+        struct.setProcessErrorsIsSet(true);
       }
       if (incoming.get(13)) {
         struct.gatewayExecutionId = iprot.readString();

http://git-wip-us.apache.org/repos/asf/airavata/blob/81c6ea84/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/TaskModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/TaskModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/TaskModel.java
index 5ebdacf..12770ca 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/TaskModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/task/TaskModel.java
@@ -23,16 +23,32 @@
  */
 package org.apache.airavata.model.task;
 
-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 javax.annotation.Generated;
+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.*;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 /**
@@ -53,10 +69,10 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
   private static final org.apache.thrift.protocol.TField PARENT_PROCESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parentProcessId", org.apache.thrift.protocol.TType.STRING, (short)3);
   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)4);
   private static final org.apache.thrift.protocol.TField LAST_UPDATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastUpdateTime", org.apache.thrift.protocol.TType.I64, (short)5);
-  private static final org.apache.thrift.protocol.TField TASK_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("taskStatuses", org.apache.thrift.protocol.TType.LIST, (short)6);
+  private static final org.apache.thrift.protocol.TField TASK_STATUSES_FIELD_DESC = new org.apache.thrift.protocol.TField("taskStatuses", org.apache.thrift.protocol.TType.LIST, (short)6);
   private static final org.apache.thrift.protocol.TField TASK_DETAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("taskDetail", org.apache.thrift.protocol.TType.STRING, (short)7);
   private static final org.apache.thrift.protocol.TField SUB_TASK_MODEL_FIELD_DESC = new org.apache.thrift.protocol.TField("subTaskModel", org.apache.thrift.protocol.TType.STRING, (short)8);
-  private static final org.apache.thrift.protocol.TField TASK_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("taskErrors", org.apache.thrift.protocol.TType.LIST, (short)9);
+  private static final org.apache.thrift.protocol.TField TASK_ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("taskErrors", org.apache.thrift.protocol.TType.LIST, (short)9);
   private static final org.apache.thrift.protocol.TField JOBS_FIELD_DESC = new org.apache.thrift.protocol.TField("jobs", org.apache.thrift.protocol.TType.LIST, (short)10);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
@@ -87,10 +103,10 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
     PARENT_PROCESS_ID((short)3, "parentProcessId"),
     CREATION_TIME((short)4, "creationTime"),
     LAST_UPDATE_TIME((short)5, "lastUpdateTime"),
-    TASK_STATUS((short)6, "taskStatuses"),
+    TASK_STATUSES((short)6, "taskStatuses"),
     TASK_DETAIL((short)7, "taskDetail"),
     SUB_TASK_MODEL((short)8, "subTaskModel"),
-    TASK_ERROR((short)9, "taskErrors"),
+    TASK_ERRORS((short)9, "taskErrors"),
     JOBS((short)10, "jobs");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -116,14 +132,14 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
           return CREATION_TIME;
         case 5: // LAST_UPDATE_TIME
           return LAST_UPDATE_TIME;
-        case 6: // TASK_STATUS
-          return TASK_STATUS;
+        case 6: // TASK_STATUSES
+          return TASK_STATUSES;
         case 7: // TASK_DETAIL
           return TASK_DETAIL;
         case 8: // SUB_TASK_MODEL
           return SUB_TASK_MODEL;
-        case 9: // TASK_ERROR
-          return TASK_ERROR;
+        case 9: // TASK_ERRORS
+          return TASK_ERRORS;
         case 10: // JOBS
           return JOBS;
         default:
@@ -169,7 +185,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
   private static final int __CREATIONTIME_ISSET_ID = 0;
   private static final int __LASTUPDATETIME_ISSET_ID = 1;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.TASK_DETAIL,_Fields.SUB_TASK_MODEL,_Fields.TASK_ERROR,_Fields.JOBS};
+  private static final _Fields optionals[] = {_Fields.TASK_DETAIL,_Fields.SUB_TASK_MODEL,_Fields.TASK_ERRORS,_Fields.JOBS};
   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);
@@ -183,14 +199,14 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.LAST_UPDATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("lastUpdateTime", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-    tmpMap.put(_Fields.TASK_STATUS, new org.apache.thrift.meta_data.FieldMetaData("taskStatuses", org.apache.thrift.TFieldRequirementType.REQUIRED,
+    tmpMap.put(_Fields.TASK_STATUSES, new org.apache.thrift.meta_data.FieldMetaData("taskStatuses", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.status.TaskStatus.class))));
     tmpMap.put(_Fields.TASK_DETAIL, new org.apache.thrift.meta_data.FieldMetaData("taskDetail", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.SUB_TASK_MODEL, new org.apache.thrift.meta_data.FieldMetaData("subTaskModel", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
-    tmpMap.put(_Fields.TASK_ERROR, new org.apache.thrift.meta_data.FieldMetaData("taskErrors", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+    tmpMap.put(_Fields.TASK_ERRORS, new org.apache.thrift.meta_data.FieldMetaData("taskErrors", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.commons.ErrorModel.class))));
     tmpMap.put(_Fields.JOBS, new org.apache.thrift.meta_data.FieldMetaData("jobs", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
@@ -211,7 +227,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
     String parentProcessId,
     long creationTime,
     long lastUpdateTime,
-    List<org.apache.airavata.model.status.TaskStatus> taskStatus)
+    List<org.apache.airavata.model.status.TaskStatus> taskStatuses)
   {
     this();
     this.taskId = taskId;
@@ -221,7 +237,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
     setCreationTimeIsSet(true);
     this.lastUpdateTime = lastUpdateTime;
     setLastUpdateTimeIsSet(true);
-    this.taskStatuses = taskStatus;
+    this.taskStatuses = taskStatuses;
   }
 
   /**
@@ -240,12 +256,12 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
     }
     this.creationTime = other.creationTime;
     this.lastUpdateTime = other.lastUpdateTime;
-    if (other.isSetTaskStatus()) {
-      List<org.apache.airavata.model.status.TaskStatus> __this__taskStatus = new ArrayList<org.apache.airavata.model.status.TaskStatus>(other.taskStatuses.size());
+    if (other.isSetTaskStatuses()) {
+      List<org.apache.airavata.model.status.TaskStatus> __this__taskStatuses = new ArrayList<org.apache.airavata.model.status.TaskStatus>(other.taskStatuses.size());
       for (org.apache.airavata.model.status.TaskStatus other_element : other.taskStatuses) {
-        __this__taskStatus.add(new org.apache.airavata.model.status.TaskStatus(other_element));
+        __this__taskStatuses.add(new org.apache.airavata.model.status.TaskStatus(other_element));
       }
-      this.taskStatuses = __this__taskStatus;
+      this.taskStatuses = __this__taskStatuses;
     }
     if (other.isSetTaskDetail()) {
       this.taskDetail = other.taskDetail;
@@ -253,12 +269,12 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
     if (other.isSetSubTaskModel()) {
       this.subTaskModel = org.apache.thrift.TBaseHelper.copyBinary(other.subTaskModel);
     }
-    if (other.isSetTaskError()) {
-      List<org.apache.airavata.model.commons.ErrorModel> __this__taskError = new ArrayList<org.apache.airavata.model.commons.ErrorModel>(other.taskErrors.size());
+    if (other.isSetTaskErrors()) {
+      List<org.apache.airavata.model.commons.ErrorModel> __this__taskErrors = new ArrayList<org.apache.airavata.model.commons.ErrorModel>(other.taskErrors.size());
       for (org.apache.airavata.model.commons.ErrorModel other_element : other.taskErrors) {
-        __this__taskError.add(new org.apache.airavata.model.commons.ErrorModel(other_element));
+        __this__taskErrors.add(new org.apache.airavata.model.commons.ErrorModel(other_element));
       }
-      this.taskErrors = __this__taskError;
+      this.taskErrors = __this__taskErrors;
     }
     if (other.isSetJobs()) {
       List<org.apache.airavata.model.job.JobModel> __this__jobs = new ArrayList<org.apache.airavata.model.job.JobModel>(other.jobs.size());
@@ -411,15 +427,15 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTUPDATETIME_ISSET_ID, value);
   }
 
-  public int getTaskStatusSize() {
+  public int getTaskStatusesSize() {
     return (this.taskStatuses == null) ? 0 : this.taskStatuses.size();
   }
 
-  public java.util.Iterator<org.apache.airavata.model.status.TaskStatus> getTaskStatusIterator() {
+  public java.util.Iterator<org.apache.airavata.model.status.TaskStatus> getTaskStatusesIterator() {
     return (this.taskStatuses == null) ? null : this.taskStatuses.iterator();
   }
 
-  public void addToTaskStatus(org.apache.airavata.model.status.TaskStatus elem) {
+  public void addToTaskStatuses(org.apache.airavata.model.status.TaskStatus elem) {
     if (this.taskStatuses == null) {
       this.taskStatuses = new ArrayList<org.apache.airavata.model.status.TaskStatus>();
     }
@@ -434,16 +450,16 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
     this.taskStatuses = taskStatuses;
   }
 
-  public void unsetTaskStatus() {
+  public void unsetTaskStatuses() {
     this.taskStatuses = null;
   }
 
   /** Returns true if field taskStatuses is set (has been assigned a value) and false otherwise */
-  public boolean isSetTaskStatus() {
+  public boolean isSetTaskStatuses() {
     return this.taskStatuses != null;
   }
 
-  public void setTaskStatusIsSet(boolean value) {
+  public void setTaskStatusesIsSet(boolean value) {
     if (!value) {
       this.taskStatuses = null;
     }
@@ -504,15 +520,15 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
     }
   }
 
-  public int getTaskErrorSize() {
+  public int getTaskErrorsSize() {
     return (this.taskErrors == null) ? 0 : this.taskErrors.size();
   }
 
-  public java.util.Iterator<org.apache.airavata.model.commons.ErrorModel> getTaskErrorIterator() {
+  public java.util.Iterator<org.apache.airavata.model.commons.ErrorModel> getTaskErrorsIterator() {
     return (this.taskErrors == null) ? null : this.taskErrors.iterator();
   }
 
-  public void addToTaskError(org.apache.airavata.model.commons.ErrorModel elem) {
+  public void addToTaskErrors(org.apache.airavata.model.commons.ErrorModel elem) {
     if (this.taskErrors == null) {
       this.taskErrors = new ArrayList<org.apache.airavata.model.commons.ErrorModel>();
     }
@@ -527,16 +543,16 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
     this.taskErrors = taskErrors;
   }
 
-  public void unsetTaskError() {
+  public void unsetTaskErrors() {
     this.taskErrors = null;
   }
 
   /** Returns true if field taskErrors is set (has been assigned a value) and false otherwise */
-  public boolean isSetTaskError() {
+  public boolean isSetTaskErrors() {
     return this.taskErrors != null;
   }
 
-  public void setTaskErrorIsSet(boolean value) {
+  public void setTaskErrorsIsSet(boolean value) {
     if (!value) {
       this.taskErrors = null;
     }
@@ -622,11 +638,11 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
       }
       break;
 
-    case TASK_STATUS:
+    case TASK_STATUSES:
       if (value == null) {
-        unsetTaskStatus();
+        unsetTaskStatuses();
       } else {
-        setTaskStatuses((List<org.apache.airavata.model.status.TaskStatus>) value);
+        setTaskStatuses((List<org.apache.airavata.model.status.TaskStatus>)value);
       }
       break;
 
@@ -646,11 +662,11 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
       }
       break;
 
-    case TASK_ERROR:
+    case TASK_ERRORS:
       if (value == null) {
-        unsetTaskError();
+        unsetTaskErrors();
       } else {
-        setTaskErrors((List<org.apache.airavata.model.commons.ErrorModel>) value);
+        setTaskErrors((List<org.apache.airavata.model.commons.ErrorModel>)value);
       }
       break;
 
@@ -682,7 +698,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
     case LAST_UPDATE_TIME:
       return getLastUpdateTime();
 
-    case TASK_STATUS:
+    case TASK_STATUSES:
       return getTaskStatuses();
 
     case TASK_DETAIL:
@@ -691,7 +707,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
     case SUB_TASK_MODEL:
       return getSubTaskModel();
 
-    case TASK_ERROR:
+    case TASK_ERRORS:
       return getTaskErrors();
 
     case JOBS:
@@ -718,14 +734,14 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
       return isSetCreationTime();
     case LAST_UPDATE_TIME:
       return isSetLastUpdateTime();
-    case TASK_STATUS:
-      return isSetTaskStatus();
+    case TASK_STATUSES:
+      return isSetTaskStatuses();
     case TASK_DETAIL:
       return isSetTaskDetail();
     case SUB_TASK_MODEL:
       return isSetSubTaskModel();
-    case TASK_ERROR:
-      return isSetTaskError();
+    case TASK_ERRORS:
+      return isSetTaskErrors();
     case JOBS:
       return isSetJobs();
     }
@@ -790,10 +806,10 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
         return false;
     }
 
-    boolean this_present_taskStatus = true && this.isSetTaskStatus();
-    boolean that_present_taskStatus = true && that.isSetTaskStatus();
-    if (this_present_taskStatus || that_present_taskStatus) {
-      if (!(this_present_taskStatus && that_present_taskStatus))
+    boolean this_present_taskStatuses = true && this.isSetTaskStatuses();
+    boolean that_present_taskStatuses = true && that.isSetTaskStatuses();
+    if (this_present_taskStatuses || that_present_taskStatuses) {
+      if (!(this_present_taskStatuses && that_present_taskStatuses))
         return false;
       if (!this.taskStatuses.equals(that.taskStatuses))
         return false;
@@ -817,10 +833,10 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
         return false;
     }
 
-    boolean this_present_taskError = true && this.isSetTaskError();
-    boolean that_present_taskError = true && that.isSetTaskError();
-    if (this_present_taskError || that_present_taskError) {
-      if (!(this_present_taskError && that_present_taskError))
+    boolean this_present_taskErrors = true && this.isSetTaskErrors();
+    boolean that_present_taskErrors = true && that.isSetTaskErrors();
+    if (this_present_taskErrors || that_present_taskErrors) {
+      if (!(this_present_taskErrors && that_present_taskErrors))
         return false;
       if (!this.taskErrors.equals(that.taskErrors))
         return false;
@@ -867,9 +883,9 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
     if (present_lastUpdateTime)
       list.add(lastUpdateTime);
 
-    boolean present_taskStatus = true && (isSetTaskStatus());
-    list.add(present_taskStatus);
-    if (present_taskStatus)
+    boolean present_taskStatuses = true && (isSetTaskStatuses());
+    list.add(present_taskStatuses);
+    if (present_taskStatuses)
       list.add(taskStatuses);
 
     boolean present_taskDetail = true && (isSetTaskDetail());
@@ -882,9 +898,9 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
     if (present_subTaskModel)
       list.add(subTaskModel);
 
-    boolean present_taskError = true && (isSetTaskError());
-    list.add(present_taskError);
-    if (present_taskError)
+    boolean present_taskErrors = true && (isSetTaskErrors());
+    list.add(present_taskErrors);
+    if (present_taskErrors)
       list.add(taskErrors);
 
     boolean present_jobs = true && (isSetJobs());
@@ -953,11 +969,11 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetTaskStatus()).compareTo(other.isSetTaskStatus());
+    lastComparison = Boolean.valueOf(isSetTaskStatuses()).compareTo(other.isSetTaskStatuses());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetTaskStatus()) {
+    if (isSetTaskStatuses()) {
       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskStatuses, other.taskStatuses);
       if (lastComparison != 0) {
         return lastComparison;
@@ -983,11 +999,11 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetTaskError()).compareTo(other.isSetTaskError());
+    lastComparison = Boolean.valueOf(isSetTaskErrors()).compareTo(other.isSetTaskErrors());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetTaskError()) {
+    if (isSetTaskErrors()) {
       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskErrors, other.taskErrors);
       if (lastComparison != 0) {
         return lastComparison;
@@ -1082,7 +1098,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
       }
       first = false;
     }
-    if (isSetTaskError()) {
+    if (isSetTaskErrors()) {
       if (!first) sb.append(", ");
       sb.append("taskErrors:");
       if (this.taskErrors == null) {
@@ -1128,7 +1144,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'lastUpdateTime' is unset! Struct:" + toString());
     }
 
-    if (!isSetTaskStatus()) {
+    if (!isSetTaskStatuses()) {
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskStatuses' is unset! Struct:" + toString());
     }
 
@@ -1211,7 +1227,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 6: // TASK_STATUS
+          case 6: // TASK_STATUSES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
                 org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
@@ -1225,7 +1241,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
                 }
                 iprot.readListEnd();
               }
-              struct.setTaskStatusIsSet(true);
+              struct.setTaskStatusesIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -1246,7 +1262,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 9: // TASK_ERROR
+          case 9: // TASK_ERRORS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
                 org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
@@ -1260,7 +1276,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
                 }
                 iprot.readListEnd();
               }
-              struct.setTaskErrorIsSet(true);
+              struct.setTaskErrorsIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -1319,7 +1335,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
       oprot.writeI64(struct.lastUpdateTime);
       oprot.writeFieldEnd();
       if (struct.taskStatuses != null) {
-        oprot.writeFieldBegin(TASK_STATUS_FIELD_DESC);
+        oprot.writeFieldBegin(TASK_STATUSES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.taskStatuses.size()));
           for (org.apache.airavata.model.status.TaskStatus _iter9 : struct.taskStatuses)
@@ -1345,8 +1361,8 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
         }
       }
       if (struct.taskErrors != null) {
-        if (struct.isSetTaskError()) {
-          oprot.writeFieldBegin(TASK_ERROR_FIELD_DESC);
+        if (struct.isSetTaskErrors()) {
+          oprot.writeFieldBegin(TASK_ERRORS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.taskErrors.size()));
             for (org.apache.airavata.model.commons.ErrorModel _iter10 : struct.taskErrors)
@@ -1408,7 +1424,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
       if (struct.isSetSubTaskModel()) {
         optionals.set(1);
       }
-      if (struct.isSetTaskError()) {
+      if (struct.isSetTaskErrors()) {
         optionals.set(2);
       }
       if (struct.isSetJobs()) {
@@ -1421,7 +1437,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
       if (struct.isSetSubTaskModel()) {
         oprot.writeBinary(struct.subTaskModel);
       }
-      if (struct.isSetTaskError()) {
+      if (struct.isSetTaskErrors()) {
         {
           oprot.writeI32(struct.taskErrors.size());
           for (org.apache.airavata.model.commons.ErrorModel _iter13 : struct.taskErrors)
@@ -1465,7 +1481,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
           struct.taskStatuses.add(_elem16);
         }
       }
-      struct.setTaskStatusIsSet(true);
+      struct.setTaskStatusesIsSet(true);
       BitSet incoming = iprot.readBitSet(4);
       if (incoming.get(0)) {
         struct.taskDetail = iprot.readString();
@@ -1487,7 +1503,7 @@ public class TaskModel implements org.apache.thrift.TBase<TaskModel, TaskModel._
             struct.taskErrors.add(_elem19);
           }
         }
-        struct.setTaskErrorIsSet(true);
+        struct.setTaskErrorsIsSet(true);
       }
       if (incoming.get(3)) {
         {

http://git-wip-us.apache.org/repos/asf/airavata/blob/81c6ea84/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/AppCatalogImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/AppCatalogImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/AppCatalogImpl.java
index c6203bb..0eb34f3 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/AppCatalogImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/AppCatalogImpl.java
@@ -56,4 +56,9 @@ public class AppCatalogImpl implements AppCatalog {
     public WorkflowCatalog getWorkflowCatalog() throws AppCatalogException {
         return new WorkflowCatalogImpl();
     }
+
+    @Override
+    public UsrResourceProfile getUserResourceProfile() throws AppCatalogException {
+        return new UsrResourceProfileImpl();
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/81c6ea84/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/UsrResourceProfileImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/UsrResourceProfileImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/UsrResourceProfileImpl.java
new file mode 100644
index 0000000..a3b0f9b
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/UsrResourceProfileImpl.java
@@ -0,0 +1,356 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.registry.core.app.catalog.impl;
+
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.model.appcatalog.userresourceprofile.UserComputeResourcePreference;
+import org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile;
+import org.apache.airavata.model.appcatalog.userresourceprofile.UserStoragePreference;
+import org.apache.airavata.registry.core.app.catalog.resources.*;
+import org.apache.airavata.registry.core.app.catalog.util.AppCatalogThriftConversion;
+import org.apache.airavata.registry.cpi.AppCatalogException;
+import org.apache.airavata.registry.cpi.UsrResourceProfile;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class UsrResourceProfileImpl implements UsrResourceProfile {
+    private final static Logger logger = LoggerFactory.getLogger(UsrResourceProfileImpl.class);
+
+    @Override
+    public String addUserResourceProfile(org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile userResourceProfile) throws AppCatalogException {
+        try {
+            UserResourceProfileResource profileResource = new UserResourceProfileResource();
+            if (!userResourceProfile.getGatewayID().equals("")){
+                profileResource.setGatewayID(userResourceProfile.getGatewayID());
+            }
+            if (userResourceProfile.getCredentialStoreToken()!= null){
+                profileResource.setCredentialStoreToken(userResourceProfile.getCredentialStoreToken());
+            }
+            if (userResourceProfile.getIdentityServerTenant() != null){
+                profileResource.setIdentityServerTenant(userResourceProfile.getIdentityServerTenant());
+            }
+            if (userResourceProfile.getIdentityServerPwdCredToken() != null){
+                profileResource.setIdentityServerPwdCredToken(userResourceProfile.getIdentityServerPwdCredToken());
+            }
+            profileResource.setGatewayID(userResourceProfile.getGatewayID());
+            profileResource.save();
+            List<UserComputeResourcePreference> userComputeResourcePreferences = userResourceProfile.getUserComputeResourcePreferences();
+            if (userComputeResourcePreferences != null && !userComputeResourcePreferences.isEmpty()){
+                for (UserComputeResourcePreference preference : userComputeResourcePreferences ){
+                    UserComputeHostPreferenceResource resource = new UserComputeHostPreferenceResource();
+                    resource.setUserResourceProfileResource(profileResource);
+                    resource.setResourceId(preference.getComputeResourceId());
+                    ComputeResourceResource computeHostResource = new ComputeResourceResource();
+                    resource.setComputeHostResource((ComputeResourceResource)computeHostResource.get(preference.getComputeResourceId()));
+                    resource.setGatewayId(profileResource.getGatewayID());
+                    resource.setUserId(profileResource.getUserId());
+                    resource.setLoginUserName(preference.getLoginUserName());
+                    resource.setResourceCSToken(preference.getResourceSpecificCredentialStoreToken());
+                    resource.setBatchQueue(preference.getPreferredBatchQueue());
+                    resource.setProjectNumber(preference.getAllocationProjectNumber());
+                    resource.setScratchLocation(preference.getScratchLocation());
+                    resource.setQualityOfService(preference.getQualityOfService());
+                    resource.setReservation(preference.getReservation());
+                    if(preference.getReservationStartTime() > 0){
+                        resource.setReservationStartTime(AiravataUtils.getTime(preference.getReservationStartTime()));
+                    }
+
+                    if (preference.getReservationEndTime() > 0) {
+                        resource.setReservationEndTime(AiravataUtils.getTime(preference.getReservationEndTime()));
+                    }
+                    resource.save();
+                }
+            }
+            List<UserStoragePreference> dataStoragePreferences = userResourceProfile.getUserStoragePreferences();
+            if (dataStoragePreferences != null && !dataStoragePreferences.isEmpty()){
+                for (UserStoragePreference storagePreference : dataStoragePreferences){
+                    UserStoragePreferenceResource resource = new UserStoragePreferenceResource();
+                    resource.setStorageResourceId(storagePreference.getStorageResourceId());
+                    resource.setGatewayId(profileResource.getGatewayID());
+                    resource.setFsRootLocation(storagePreference.getFileSystemRootLocation());
+                    resource.setLoginUserName(storagePreference.getLoginUserName());
+                    resource.setResourceCSToken(storagePreference.getResourceSpecificCredentialStoreToken());
+                    resource.setUserResourceProfileResource(profileResource);
+                    resource.save();
+                }
+            }
+            return profileResource.getGatewayID();
+        }catch (Exception e) {
+            logger.error("Error while saving gateway profile...", e);
+            throw new AppCatalogException(e);
+        }
+    }
+
+    @Override
+    public void updateUserResourceProfile(String userId, String gatewayId, org.apache.airavata.model.appcatalog.userresourceprofile.UserResourceProfile updatedProfile) throws AppCatalogException {
+        try {
+            UserResourceProfileResource profileResource = new UserResourceProfileResource();
+            UserResourceProfileResource existingUP = (UserResourceProfileResource)profileResource.get(userId);
+            existingUP.setCredentialStoreToken(updatedProfile.getCredentialStoreToken());
+            existingUP.setIdentityServerTenant(updatedProfile.getIdentityServerTenant());
+            existingUP.setIdentityServerPwdCredToken(updatedProfile.getIdentityServerPwdCredToken());
+            existingUP.save();
+
+            List<UserComputeResourcePreference> userComputeResourcePreferences = updatedProfile.getUserComputeResourcePreferences();
+            if (userComputeResourcePreferences != null && !userComputeResourcePreferences.isEmpty()){
+                for (UserComputeResourcePreference preference : userComputeResourcePreferences ){
+                    UserComputeHostPreferenceResource resource = new UserComputeHostPreferenceResource();
+                    resource.setUserResourceProfileResource(existingUP);
+                    resource.setResourceId(preference.getComputeResourceId());
+                    ComputeResourceResource computeHostResource = new ComputeResourceResource();
+                    resource.setComputeHostResource((ComputeResourceResource)computeHostResource.get(preference.getComputeResourceId()));
+                    resource.setUserId(userId);
+                    resource.setGatewayId(gatewayId);
+                    resource.setLoginUserName(preference.getLoginUserName());
+                    resource.setBatchQueue(preference.getPreferredBatchQueue());
+                    resource.setProjectNumber(preference.getAllocationProjectNumber());
+                    resource.setScratchLocation(preference.getScratchLocation());
+                    resource.setResourceCSToken(preference.getResourceSpecificCredentialStoreToken());
+                    resource.setQualityOfService(preference.getQualityOfService());
+                    resource.setReservation(preference.getReservation());
+                    if(preference.getReservationStartTime() > 0){
+                        resource.setReservationStartTime(AiravataUtils.getTime(preference.getReservationStartTime()));
+                    }
+
+                    if (preference.getReservationEndTime() > 0) {
+                        resource.setReservationEndTime(AiravataUtils.getTime(preference.getReservationEndTime()));
+                    }
+                    resource.save();
+                }
+            }
+            List<UserStoragePreference> dataStoragePreferences = updatedProfile.getUserStoragePreferences();
+            if (dataStoragePreferences != null && !dataStoragePreferences.isEmpty()){
+                for (UserStoragePreference storagePreference : dataStoragePreferences){
+                    UserStoragePreferenceResource resource = new UserStoragePreferenceResource();
+                    resource.setStorageResourceId(storagePreference.getStorageResourceId());
+                    resource.setGatewayId(existingUP.getGatewayID());
+                    resource.setUserId(existingUP.getUserId());
+                    resource.setFsRootLocation(storagePreference.getFileSystemRootLocation());
+                    resource.setLoginUserName(storagePreference.getLoginUserName());
+                    resource.setResourceCSToken(storagePreference.getResourceSpecificCredentialStoreToken());
+                    resource.setUserResourceProfileResource(existingUP);
+                    resource.save();
+                }
+            }
+        }catch (Exception e) {
+            logger.error("Error while updating User Resource profile...", e);
+            throw new AppCatalogException(e);
+        }
+    }
+
+    @Override
+    public UserResourceProfile getUserResourceProfile(String userId, String gatewayId) throws AppCatalogException {
+        try {
+            UserResourceProfileResource resource = new UserResourceProfileResource();
+            UserResourceProfileResource uResource = (UserResourceProfileResource)resource.get(userId);
+            UserComputeHostPreferenceResource prefResource = new UserComputeHostPreferenceResource();
+            List<AppCatalogResource> usercomputePrefList = prefResource.get(AppCatAbstractResource.UserComputeResourcePreferenceConstants.USER_ID, userId);
+            List<UserComputeResourcePreference> userComputeResourcePreferences = AppCatalogThriftConversion.getUserComputeResourcePreferences(usercomputePrefList);
+            List<UserStoragePreference> dataStoragePreferences = getAllStoragePreferences(gatewayId);
+            return AppCatalogThriftConversion.getUserResourceProfile(uResource, userComputeResourcePreferences, dataStoragePreferences);
+        }catch (Exception e) {
+            logger.error("Error while retrieving gateway profile...", e);
+            throw new AppCatalogException(e);
+        }
+    }
+
+    @Override
+    public boolean removeUserResourceProfile(String userId, String gatewayId) throws AppCatalogException {
+       try {
+           UserResourceProfileResource resource = new UserResourceProfileResource();
+           resource.remove(userId);
+           return true;
+       }catch (Exception e) {
+           logger.error("Error while deleting user resource profile...", e);
+           throw new AppCatalogException(e);
+       }
+    }
+
+    @Override
+    public boolean removeUserComputeResourcePreferenceFromGateway(String userId, String gatewayId, String preferenceId) throws AppCatalogException {
+        try {
+            UserComputeHostPreferenceResource resource = new UserComputeHostPreferenceResource();
+            Map<String, String> ids = new HashMap<String, String>();
+            ids.put(AppCatAbstractResource.UserComputeResourcePreferenceConstants.USER_ID, userId);
+            ids.put(AppCatAbstractResource.UserComputeResourcePreferenceConstants.RESOURCE_ID, preferenceId);
+            resource.remove(ids);
+            return true;
+        }catch (Exception e) {
+            logger.error("Error while deleting user resource profile...", e);
+            throw new AppCatalogException(e);
+        }
+    }
+
+    @Override
+    public boolean removeUserDataStoragePreferenceFromGateway(String userId, String gatewayId, String preferenceId) throws AppCatalogException {
+        try {
+            UserStoragePreferenceResource resource = new UserStoragePreferenceResource();
+            Map<String, String> ids = new HashMap<String, String>();
+            ids.put(AppCatAbstractResource.UserStoragePreferenceConstants.USER_ID, userId);
+            ids.put(AppCatAbstractResource.UserStoragePreferenceConstants.STORAGE_ID, preferenceId);
+            resource.remove(ids);
+            return true;
+        }catch (Exception e) {
+            logger.error("Error while deleting user resource profile...", e);
+            throw new AppCatalogException(e);
+        }
+    }
+
+    @Override
+    public boolean isUserResourceProfileExists(String userId, String gatewayId) throws AppCatalogException {
+        try {
+            UserResourceProfileResource resource = new UserResourceProfileResource();
+            return resource.isExists(userId);
+        }catch (Exception e) {
+            logger.error("Error while retrieving user resource profile...", e);
+            throw new AppCatalogException(e);
+        }
+    }
+
+    /**
+     * @param gatewayId
+     * @param hostId
+     * @return ComputeResourcePreference
+     */
+    @Override
+    public UserComputeResourcePreference getUserComputeResourcePreference(String userId, String gatewayId, String hostId) throws AppCatalogException {
+        try {
+            UserComputeHostPreferenceResource prefResource = new UserComputeHostPreferenceResource();
+            List<AppCatalogResource> computePrefList = prefResource.get(AppCatAbstractResource.UserComputeResourcePreferenceConstants.USER_ID, userId);
+            for (AppCatalogResource resource : computePrefList){
+                UserComputeHostPreferenceResource cmP = (UserComputeHostPreferenceResource) resource;
+                if (cmP.getResourceId() != null && !cmP.getResourceId().equals("")){
+                    if (cmP.getResourceId().equals(hostId)){
+                        return AppCatalogThriftConversion.getUserComputeResourcePreference(cmP);
+                    }
+                }
+            }
+        }catch (Exception e) {
+            logger.error("Error while retrieving user compute resource preference...", e);
+            throw new AppCatalogException(e);
+        }
+        return null;
+    }
+
+    @Override
+    public UserStoragePreference getUserStoragePreference(String userId, String gatewayId, String storageId) throws AppCatalogException {
+        try {
+            UserStoragePreferenceResource prefResource = new UserStoragePreferenceResource();
+            List<AppCatalogResource> computePrefList = prefResource.get(AppCatAbstractResource.UserComputeResourcePreferenceConstants.USER_ID, userId);
+            for (AppCatalogResource resource : computePrefList){
+                UserStoragePreferenceResource dsP = (UserStoragePreferenceResource) resource;
+                if (dsP.getStorageResourceId() != null && !dsP.getStorageResourceId().equals("")){
+                    if (dsP.getStorageResourceId().equals(storageId)){
+                        return AppCatalogThriftConversion.getUserDataStoragePreference(dsP);
+                    }
+                }
+            }
+        }catch (Exception e) {
+            logger.error("Error while retrieving user data storage preference...", e);
+            throw new AppCatalogException(e);
+        }
+        return null;
+    }
+
+    /**
+     * @param userId
+     * @return
+     */
+
+    public List<UserComputeResourcePreference> getAllUserComputeResourcePreferences(String userId) throws AppCatalogException {
+        try {
+            ComputeHostPreferenceResource prefResource = new ComputeHostPreferenceResource();
+            List<AppCatalogResource> computePrefList = prefResource.get(AppCatAbstractResource.UserComputeResourcePreferenceConstants.USER_ID, userId);
+            return AppCatalogThriftConversion.getUserComputeResourcePreferences(computePrefList);
+        }catch (Exception e) {
+            logger.error("Error while retrieving compute resource preference...", e);
+            throw new AppCatalogException(e);
+        }
+    }
+
+
+    public List<UserStoragePreference> getAllStoragePreferences(String userId) throws AppCatalogException {
+        try {
+            UserStoragePreferenceResource prefResource = new UserStoragePreferenceResource();
+            List<AppCatalogResource> dataStoragePrefList = prefResource.get(AppCatAbstractResource.UserStoragePreferenceConstants.USER_ID, userId);
+            return AppCatalogThriftConversion.getUserDataStoragePreferences(dataStoragePrefList);
+        }catch (Exception e) {
+            logger.error("Error while retrieving data storage preference...", e);
+            throw new AppCatalogException(e);
+        }
+    }
+
+    @Override
+    public List<String> getGatewayProfileIds(String gatewayName) throws AppCatalogException {
+        try {
+            UserResourceProfileResource profileResource = new UserResourceProfileResource();
+            List<AppCatalogResource> resourceList = profileResource.get(AppCatAbstractResource.UserResourceProfileConstants.GATEWAY_ID, gatewayName);
+            List<String> gatewayIds = new ArrayList<String>();
+            if (resourceList != null && !resourceList.isEmpty()){
+                for (AppCatalogResource resource : resourceList){
+                    gatewayIds.add(((UserResourceProfileResource)resource).getGatewayID());
+                }
+            }
+            return gatewayIds;
+        }catch (Exception e) {
+            logger.error("Error while retrieving gateway ids...", e);
+            throw new AppCatalogException(e);
+        }
+    }
+
+    @Override
+    public String getUserNamefromID(String userId, String gatewayID) throws AppCatalogException {
+//        This method implementation is critical
+        return null;
+    }
+
+    @Override
+    public List<UserResourceProfile> getAllUserResourceProfiles() throws AppCatalogException {
+        try {
+            List<UserResourceProfile> gatewayResourceProfileList = new ArrayList<UserResourceProfile>();
+            UserResourceProfileResource profileResource = new UserResourceProfileResource();
+            List<AppCatalogResource> resourceList = profileResource.getAll();
+            if (resourceList != null && !resourceList.isEmpty()){
+                for (AppCatalogResource resource : resourceList){
+                    UserResourceProfileResource userProfileResource = (UserResourceProfileResource)resource;
+                    List<UserComputeResourcePreference> computeResourcePreferences = getAllUserComputeResourcePreferences(userProfileResource.getUserId());
+                    List<UserStoragePreference> dataStoragePreferences = getAllStoragePreferences(userProfileResource.getUserId());
+                    UserResourceProfile gatewayResourceProfile = AppCatalogThriftConversion.getUserResourceProfile(userProfileResource, computeResourcePreferences, dataStoragePreferences);
+                    gatewayResourceProfileList.add(gatewayResourceProfile);
+                }
+            }
+            return gatewayResourceProfileList;
+        }catch (Exception e) {
+            logger.error("Error while retrieving gateway ids...", e);
+            throw new AppCatalogException(e);
+        }
+    }
+
+    public static Logger getLogger() {
+        return logger;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/81c6ea84/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserComputeResourcePreference.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserComputeResourcePreference.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserComputeResourcePreference.java
new file mode 100644
index 0000000..cda901c
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserComputeResourcePreference.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.registry.core.app.catalog.model;
+
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+
+@Entity
+@Table(name = "USER_COMPUTE_RESOURCE_PREFERENCE")
+@IdClass(ComputeResourcePreferencePK.class)
+public class UserComputeResourcePreference {
+    @Id
+    @Column(name = "GATEWAY_ID")
+    private String gatewayId;
+    @Id
+    @Column(name = "USER_ID")
+    private String userId;
+    @Id
+    @Column(name = "RESOURCE_ID")
+    private String resourceId;
+    @Column(name = "PREFERED_BATCH_QUEUE")
+    private String batchQueue;
+    @Column(name = "SCRATCH_LOCATION")
+    private String scratchLocation;
+    @Column(name = "ALLOCATION_PROJECT_NUMBER")
+    private String projectNumber;
+    @Column(name = "LOGIN_USERNAME")
+    private String loginUserName;
+    @Column(name = "RESOURCE_CS_TOKEN")
+    private String computeResourceCSToken;
+    @Column(name = "QUALITY_OF_SERVICE")
+    private String qualityOfService;
+    @Column(name = "RESERVATION")
+    private String reservation;
+    @Column(name = "RESERVATION_START_TIME")
+    private Timestamp reservationStartTime;
+    @Column(name = "RESERVATION_END_TIME")
+    private Timestamp reservationEndTime;
+
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "RESOURCE_ID")
+    private ComputeResource computeHostResource;
+
+
+    @ManyToOne(cascade= CascadeType.MERGE)
+    @JoinColumn(name = "GATEWAY_ID")
+    private UserResourceProfile userResouceProfile;
+
+    /*User Id should be linked to user profile table once it is finalized and created*/
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
+
+    public String getResourceId() {
+        return resourceId;
+    }
+
+    public void setResourceId(String resourceId) {
+        this.resourceId = resourceId;
+    }
+
+
+    public String getBatchQueue() {
+        return batchQueue;
+    }
+
+    public void setBatchQueue(String batchQueue) {
+        this.batchQueue = batchQueue;
+    }
+
+    public String getScratchLocation() {
+        return scratchLocation;
+    }
+
+    public void setScratchLocation(String scratchLocation) {
+        this.scratchLocation = scratchLocation;
+    }
+
+    public String getProjectNumber() {
+        return projectNumber;
+    }
+
+    public void setProjectNumber(String projectNumber) {
+        this.projectNumber = projectNumber;
+    }
+
+    public ComputeResource getComputeHostResource() {
+        return computeHostResource;
+    }
+
+    public void setComputeHostResource(ComputeResource computeHostResource) {
+        this.computeHostResource = computeHostResource;
+    }
+
+    public UserResourceProfile getUserResouceProfile() {
+        return userResouceProfile;
+    }
+
+    public void setUserResouceProfile(UserResourceProfile userResouceProfile) {
+        this.userResouceProfile = userResouceProfile;
+    }
+
+
+    public String getLoginUserName() {
+        return loginUserName;
+    }
+
+    public void setLoginUserName(String loginUserName) {
+        this.loginUserName = loginUserName;
+    }
+
+    public String getComputeResourceCSToken() {
+        return computeResourceCSToken;
+    }
+
+    public void setComputeResourceCSToken(String computeResourceCSToken) {
+        this.computeResourceCSToken = computeResourceCSToken;
+    }
+
+
+    public String getQualityOfService() {
+        return qualityOfService;
+    }
+
+    public void setQualityOfService(String qualityOfService) {
+        this.qualityOfService = qualityOfService;
+    }
+
+    public String getReservation() {
+        return reservation;
+    }
+
+    public void setReservation(String reservation) {
+        this.reservation = reservation;
+    }
+
+    public Timestamp getReservationStartTime() {
+        return reservationStartTime;
+    }
+
+    public void setReservationStartTime(Timestamp reservationStratTime) {
+        this.reservationStartTime = reservationStratTime;
+    }
+
+    public Timestamp getReservationEndTime() {
+        return reservationEndTime;
+    }
+
+    public void setReservationEndTime(Timestamp reservationEndTime) {
+        this.reservationEndTime = reservationEndTime;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/81c6ea84/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserComputeResourcePreferencePK.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserComputeResourcePreferencePK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserComputeResourcePreferencePK.java
new file mode 100644
index 0000000..d454852
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserComputeResourcePreferencePK.java
@@ -0,0 +1,73 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.registry.core.app.catalog.model;
+
+import java.io.Serializable;
+
+public class UserComputeResourcePreferencePK implements Serializable {
+    private String gatewayId;
+    private String resourceId;
+    private String userId;
+
+    public UserComputeResourcePreferencePK(String userId, String gatewayId, String resourceId) {
+        this.userId = userId;
+        this.gatewayId = gatewayId;
+        this.resourceId = resourceId;
+    }
+
+    public UserComputeResourcePreferencePK() {
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return 1;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
+
+    public String getResourceId() {
+        return resourceId;
+    }
+
+    public void setResourceId(String resourceId) {
+        this.resourceId = resourceId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/81c6ea84/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserResourceProfile.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserResourceProfile.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserResourceProfile.java
new file mode 100644
index 0000000..6d570de
--- /dev/null
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/UserResourceProfile.java
@@ -0,0 +1,109 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.registry.core.app.catalog.model;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+import java.sql.Timestamp;
+
+@Entity
+@Table(name = "USER_RESOURCE_PROFILE")
+public class UserResourceProfile implements Serializable {
+    @Id
+    @Column(name = "USER_ID")
+    private String userId;
+
+    @Id
+    @Column(name = "GATEWAY_ID")
+    private String gatewayID;
+
+    @Column(name = "CREATION_TIME")
+    private Timestamp creationTime;
+
+    @Column(name = "UPDATE_TIME")
+    private Timestamp updateTime;
+
+    @Column(name = "CS_TOKEN")
+    private String credentialStoreToken;
+
+    @Column(name = "IDENTITY_SERVER_TENANT")
+    private String identityServerTenant;
+
+    @Column(name = "IDENTITY_SERVER_PWD_CRED_TOKEN")
+    private String identityServerPwdCredToken;
+
+    public Timestamp getCreationTime() {
+        return creationTime;
+    }
+
+    public void setCreationTime(Timestamp creationTime) {
+        this.creationTime = creationTime;
+    }
+
+    public Timestamp getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Timestamp updateTime) {
+        this.updateTime = updateTime;
+    }
+
+
+    public String getGatewayID() {
+        return gatewayID;
+    }
+
+    public String getUserID() {
+        return gatewayID;
+    }
+
+    public void setGatewayID(String gatewayID) {
+        this.gatewayID = gatewayID;
+    }
+
+    public String getCredentialStoreToken() {
+        return credentialStoreToken;
+    }
+
+    public void setCredentialStoreToken(String credentialStoreToken) {
+        this.credentialStoreToken = credentialStoreToken;
+    }
+
+    public String getIdentityServerTenant() {
+        return identityServerTenant;
+    }
+
+    public void setIdentityServerTenant(String identityServerTenant) {
+        this.identityServerTenant = identityServerTenant;
+    }
+
+    public String getIdentityServerPwdCredToken() {
+        return identityServerPwdCredToken;
+    }
+
+    public void setIdentityServerPwdCredToken(String identityServerPwdCredToken) {
+        this.identityServerPwdCredToken = identityServerPwdCredToken;
+    }
+}


Mime
View raw message