airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject airavata git commit: adding new field useUserCRPref to UserConfigurationData model
Date Thu, 03 Nov 2016 16:34:38 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop 7937d1c39 -> d7d058b11


adding new field useUserCRPref to UserConfigurationData model


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

Branch: refs/heads/develop
Commit: d7d058b112327e88733fc7dc2e06ea084db58b25
Parents: 7937d1c
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Thu Nov 3 12:34:34 2016 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Thu Nov 3 12:34:34 2016 -0400

----------------------------------------------------------------------
 .../lib/airavata/experiment_model_types.cpp     |  22 ++++
 .../lib/airavata/experiment_model_types.h       |  12 ++-
 .../lib/Airavata/Model/Experiment/Types.php     |  23 ++++
 .../apache/airavata/model/experiment/ttypes.py  |  15 ++-
 .../experiment/UserConfigurationDataModel.java  | 107 ++++++++++++++++++-
 .../catalog/impl/ExperimentRegistry.java        |   2 +
 .../catalog/model/UserConfigurationData.java    |   9 ++
 .../UserConfigurationDataResource.java          |  10 ++
 .../experiment/catalog/resources/Utils.java     |   1 +
 .../utils/ThriftDataModelConversion.java        |   1 +
 .../src/main/resources/expcatalog-derby.sql     |   1 +
 .../src/main/resources/expcatalog-mysql.sql     |   1 +
 .../experiment_model.thrift                     |   1 +
 13 files changed, 198 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/d7d058b1/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.cpp
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.cpp
index 1980b28..698c6ee 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.cpp
@@ -118,6 +118,11 @@ void UserConfigurationDataModel::__set_experimentDataDir(const std::string&
val)
 __isset.experimentDataDir = true;
 }
 
+void UserConfigurationDataModel::__set_useUserCRPref(const bool val) {
+  this->useUserCRPref = val;
+__isset.useUserCRPref = true;
+}
+
 uint32_t UserConfigurationDataModel::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -213,6 +218,14 @@ uint32_t UserConfigurationDataModel::read(::apache::thrift::protocol::TProtocol*
           xfer += iprot->skip(ftype);
         }
         break;
+      case 10:
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->useUserCRPref);
+          this->__isset.useUserCRPref = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -277,6 +290,11 @@ uint32_t UserConfigurationDataModel::write(::apache::thrift::protocol::TProtocol
     xfer += oprot->writeString(this->experimentDataDir);
     xfer += oprot->writeFieldEnd();
   }
+  if (this->__isset.useUserCRPref) {
+    xfer += oprot->writeFieldBegin("useUserCRPref", ::apache::thrift::protocol::T_BOOL,
10);
+    xfer += oprot->writeBool(this->useUserCRPref);
+    xfer += oprot->writeFieldEnd();
+  }
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -293,6 +311,7 @@ void swap(UserConfigurationDataModel &a, UserConfigurationDataModel
&b) {
   swap(a.generateCert, b.generateCert);
   swap(a.storageId, b.storageId);
   swap(a.experimentDataDir, b.experimentDataDir);
+  swap(a.useUserCRPref, b.useUserCRPref);
   swap(a.__isset, b.__isset);
 }
 
@@ -306,6 +325,7 @@ UserConfigurationDataModel::UserConfigurationDataModel(const UserConfigurationDa
   generateCert = other0.generateCert;
   storageId = other0.storageId;
   experimentDataDir = other0.experimentDataDir;
+  useUserCRPref = other0.useUserCRPref;
   __isset = other0.__isset;
 }
 UserConfigurationDataModel& UserConfigurationDataModel::operator=(const UserConfigurationDataModel&
other1) {
@@ -318,6 +338,7 @@ UserConfigurationDataModel& UserConfigurationDataModel::operator=(const
UserConf
   generateCert = other1.generateCert;
   storageId = other1.storageId;
   experimentDataDir = other1.experimentDataDir;
+  useUserCRPref = other1.useUserCRPref;
   __isset = other1.__isset;
   return *this;
 }
@@ -333,6 +354,7 @@ void UserConfigurationDataModel::printTo(std::ostream& out) const
{
   out << ", " << "generateCert="; (__isset.generateCert ? (out << to_string(generateCert))
: (out << "<null>"));
   out << ", " << "storageId="; (__isset.storageId ? (out << to_string(storageId))
: (out << "<null>"));
   out << ", " << "experimentDataDir="; (__isset.experimentDataDir ? (out <<
to_string(experimentDataDir)) : (out << "<null>"));
+  out << ", " << "useUserCRPref="; (__isset.useUserCRPref ? (out << to_string(useUserCRPref))
: (out << "<null>"));
   out << ")";
 }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d7d058b1/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.h
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.h
index c6368e3..1047708 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/experiment_model_types.h
@@ -82,7 +82,7 @@ class ExperimentSummaryModel;
 class ExperimentStatistics;
 
 typedef struct _UserConfigurationDataModel__isset {
-  _UserConfigurationDataModel__isset() : shareExperimentPublicly(true), computationalResourceScheduling(false),
throttleResources(true), userDN(false), generateCert(true), storageId(false), experimentDataDir(false)
{}
+  _UserConfigurationDataModel__isset() : shareExperimentPublicly(true), computationalResourceScheduling(false),
throttleResources(true), userDN(false), generateCert(true), storageId(false), experimentDataDir(false),
useUserCRPref(false) {}
   bool shareExperimentPublicly :1;
   bool computationalResourceScheduling :1;
   bool throttleResources :1;
@@ -90,6 +90,7 @@ typedef struct _UserConfigurationDataModel__isset {
   bool generateCert :1;
   bool storageId :1;
   bool experimentDataDir :1;
+  bool useUserCRPref :1;
 } _UserConfigurationDataModel__isset;
 
 class UserConfigurationDataModel {
@@ -97,7 +98,7 @@ class UserConfigurationDataModel {
 
   UserConfigurationDataModel(const UserConfigurationDataModel&);
   UserConfigurationDataModel& operator=(const UserConfigurationDataModel&);
-  UserConfigurationDataModel() : airavataAutoSchedule(false), overrideManualScheduledParams(false),
shareExperimentPublicly(false), throttleResources(false), userDN(), generateCert(false), storageId(),
experimentDataDir() {
+  UserConfigurationDataModel() : airavataAutoSchedule(false), overrideManualScheduledParams(false),
shareExperimentPublicly(false), throttleResources(false), userDN(), generateCert(false), storageId(),
experimentDataDir(), useUserCRPref(0) {
   }
 
   virtual ~UserConfigurationDataModel() throw();
@@ -110,6 +111,7 @@ class UserConfigurationDataModel {
   bool generateCert;
   std::string storageId;
   std::string experimentDataDir;
+  bool useUserCRPref;
 
   _UserConfigurationDataModel__isset __isset;
 
@@ -131,6 +133,8 @@ class UserConfigurationDataModel {
 
   void __set_experimentDataDir(const std::string& val);
 
+  void __set_useUserCRPref(const bool val);
+
   bool operator == (const UserConfigurationDataModel & rhs) const
   {
     if (!(airavataAutoSchedule == rhs.airavataAutoSchedule))
@@ -165,6 +169,10 @@ class UserConfigurationDataModel {
       return false;
     else if (__isset.experimentDataDir && !(experimentDataDir == rhs.experimentDataDir))
       return false;
+    if (__isset.useUserCRPref != rhs.__isset.useUserCRPref)
+      return false;
+    else if (__isset.useUserCRPref && !(useUserCRPref == rhs.useUserCRPref))
+      return false;
     return true;
   }
   bool operator != (const UserConfigurationDataModel &rhs) const {

http://git-wip-us.apache.org/repos/asf/airavata/blob/d7d058b1/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Experiment/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Experiment/Types.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Experiment/Types.php
index 3e1dc12..f015ff4 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Experiment/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Experiment/Types.php
@@ -98,6 +98,10 @@ class UserConfigurationDataModel {
    * @var string
    */
   public $experimentDataDir = null;
+  /**
+   * @var bool
+   */
+  public $useUserCRPref = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -139,6 +143,10 @@ class UserConfigurationDataModel {
           'var' => 'experimentDataDir',
           'type' => TType::STRING,
           ),
+        10 => array(
+          'var' => 'useUserCRPref',
+          'type' => TType::BOOL,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -169,6 +177,9 @@ class UserConfigurationDataModel {
       if (isset($vals['experimentDataDir'])) {
         $this->experimentDataDir = $vals['experimentDataDir'];
       }
+      if (isset($vals['useUserCRPref'])) {
+        $this->useUserCRPref = $vals['useUserCRPref'];
+      }
     }
   }
 
@@ -255,6 +266,13 @@ class UserConfigurationDataModel {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 10:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->useUserCRPref);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -316,6 +334,11 @@ class UserConfigurationDataModel {
       $xfer += $output->writeString($this->experimentDataDir);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->useUserCRPref !== null) {
+      $xfer += $output->writeFieldBegin('useUserCRPref', TType::BOOL, 10);
+      $xfer += $output->writeBool($this->useUserCRPref);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata/blob/d7d058b1/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/experiment/ttypes.py
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/experiment/ttypes.py
b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/experiment/ttypes.py
index 80ff4b1..9144a24 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/experiment/ttypes.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/experiment/ttypes.py
@@ -96,6 +96,7 @@ class UserConfigurationDataModel:
    - generateCert
    - storageId
    - experimentDataDir
+   - useUserCRPref
   """
 
   thrift_spec = (
@@ -109,9 +110,10 @@ class UserConfigurationDataModel:
     (7, TType.BOOL, 'generateCert', None, False, ), # 7
     (8, TType.STRING, 'storageId', None, None, ), # 8
     (9, TType.STRING, 'experimentDataDir', None, None, ), # 9
+    (10, TType.BOOL, 'useUserCRPref', None, None, ), # 10
   )
 
-  def __init__(self, airavataAutoSchedule=thrift_spec[1][4], overrideManualScheduledParams=thrift_spec[2][4],
shareExperimentPublicly=thrift_spec[3][4], computationalResourceScheduling=None, throttleResources=thrift_spec[5][4],
userDN=None, generateCert=thrift_spec[7][4], storageId=None, experimentDataDir=None,):
+  def __init__(self, airavataAutoSchedule=thrift_spec[1][4], overrideManualScheduledParams=thrift_spec[2][4],
shareExperimentPublicly=thrift_spec[3][4], computationalResourceScheduling=None, throttleResources=thrift_spec[5][4],
userDN=None, generateCert=thrift_spec[7][4], storageId=None, experimentDataDir=None, useUserCRPref=None,):
     self.airavataAutoSchedule = airavataAutoSchedule
     self.overrideManualScheduledParams = overrideManualScheduledParams
     self.shareExperimentPublicly = shareExperimentPublicly
@@ -121,6 +123,7 @@ class UserConfigurationDataModel:
     self.generateCert = generateCert
     self.storageId = storageId
     self.experimentDataDir = experimentDataDir
+    self.useUserCRPref = useUserCRPref
 
   def read(self, iprot):
     if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -177,6 +180,11 @@ class UserConfigurationDataModel:
           self.experimentDataDir = iprot.readString()
         else:
           iprot.skip(ftype)
+      elif fid == 10:
+        if ftype == TType.BOOL:
+          self.useUserCRPref = iprot.readBool()
+        else:
+          iprot.skip(ftype)
       else:
         iprot.skip(ftype)
       iprot.readFieldEnd()
@@ -223,6 +231,10 @@ class UserConfigurationDataModel:
       oprot.writeFieldBegin('experimentDataDir', TType.STRING, 9)
       oprot.writeString(self.experimentDataDir)
       oprot.writeFieldEnd()
+    if self.useUserCRPref is not None:
+      oprot.writeFieldBegin('useUserCRPref', TType.BOOL, 10)
+      oprot.writeBool(self.useUserCRPref)
+      oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
 
@@ -245,6 +257,7 @@ class UserConfigurationDataModel:
     value = (value * 31) ^ hash(self.generateCert)
     value = (value * 31) ^ hash(self.storageId)
     value = (value * 31) ^ hash(self.experimentDataDir)
+    value = (value * 31) ^ hash(self.useUserCRPref)
     return value
 
   def __repr__(self):

http://git-wip-us.apache.org/repos/asf/airavata/blob/d7d058b1/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationDataModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationDataModel.java
b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationDataModel.java
index 0ef0963..664c922 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationDataModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationDataModel.java
@@ -69,6 +69,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
   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)7);
   private static final org.apache.thrift.protocol.TField STORAGE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("storageId",
org.apache.thrift.protocol.TType.STRING, (short)8);
   private static final org.apache.thrift.protocol.TField EXPERIMENT_DATA_DIR_FIELD_DESC =
new org.apache.thrift.protocol.TField("experimentDataDir", org.apache.thrift.protocol.TType.STRING,
(short)9);
+  private static final org.apache.thrift.protocol.TField USE_USER_CRPREF_FIELD_DESC = new
org.apache.thrift.protocol.TField("useUserCRPref", org.apache.thrift.protocol.TType.BOOL,
(short)10);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -85,6 +86,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
   private boolean generateCert; // optional
   private String storageId; // optional
   private String experimentDataDir; // optional
+  private boolean useUserCRPref; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -96,7 +98,8 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
     USER_DN((short)6, "userDN"),
     GENERATE_CERT((short)7, "generateCert"),
     STORAGE_ID((short)8, "storageId"),
-    EXPERIMENT_DATA_DIR((short)9, "experimentDataDir");
+    EXPERIMENT_DATA_DIR((short)9, "experimentDataDir"),
+    USE_USER_CRPREF((short)10, "useUserCRPref");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -129,6 +132,8 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
           return STORAGE_ID;
         case 9: // EXPERIMENT_DATA_DIR
           return EXPERIMENT_DATA_DIR;
+        case 10: // USE_USER_CRPREF
+          return USE_USER_CRPREF;
         default:
           return null;
       }
@@ -174,8 +179,9 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
   private static final int __SHAREEXPERIMENTPUBLICLY_ISSET_ID = 2;
   private static final int __THROTTLERESOURCES_ISSET_ID = 3;
   private static final int __GENERATECERT_ISSET_ID = 4;
+  private static final int __USEUSERCRPREF_ISSET_ID = 5;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.SHARE_EXPERIMENT_PUBLICLY,_Fields.COMPUTATIONAL_RESOURCE_SCHEDULING,_Fields.THROTTLE_RESOURCES,_Fields.USER_DN,_Fields.GENERATE_CERT,_Fields.STORAGE_ID,_Fields.EXPERIMENT_DATA_DIR};
+  private static final _Fields optionals[] = {_Fields.SHARE_EXPERIMENT_PUBLICLY,_Fields.COMPUTATIONAL_RESOURCE_SCHEDULING,_Fields.THROTTLE_RESOURCES,_Fields.USER_DN,_Fields.GENERATE_CERT,_Fields.STORAGE_ID,_Fields.EXPERIMENT_DATA_DIR,_Fields.USE_USER_CRPREF};
   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);
@@ -197,6 +203,8 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.EXPERIMENT_DATA_DIR, new org.apache.thrift.meta_data.FieldMetaData("experimentDataDir",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.USE_USER_CRPREF, new org.apache.thrift.meta_data.FieldMetaData("useUserCRPref",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserConfigurationDataModel.class,
metaDataMap);
   }
@@ -247,6 +255,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
     if (other.isSetExperimentDataDir()) {
       this.experimentDataDir = other.experimentDataDir;
     }
+    this.useUserCRPref = other.useUserCRPref;
   }
 
   public UserConfigurationDataModel deepCopy() {
@@ -269,6 +278,8 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
 
     this.storageId = null;
     this.experimentDataDir = null;
+    setUseUserCRPrefIsSet(false);
+    this.useUserCRPref = false;
   }
 
   public boolean isAiravataAutoSchedule() {
@@ -473,6 +484,28 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
     }
   }
 
+  public boolean isUseUserCRPref() {
+    return this.useUserCRPref;
+  }
+
+  public void setUseUserCRPref(boolean useUserCRPref) {
+    this.useUserCRPref = useUserCRPref;
+    setUseUserCRPrefIsSet(true);
+  }
+
+  public void unsetUseUserCRPref() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USEUSERCRPREF_ISSET_ID);
+  }
+
+  /** Returns true if field useUserCRPref is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetUseUserCRPref() {
+    return EncodingUtils.testBit(__isset_bitfield, __USEUSERCRPREF_ISSET_ID);
+  }
+
+  public void setUseUserCRPrefIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USEUSERCRPREF_ISSET_ID, value);
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case AIRAVATA_AUTO_SCHEDULE:
@@ -547,6 +580,14 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
       }
       break;
 
+    case USE_USER_CRPREF:
+      if (value == null) {
+        unsetUseUserCRPref();
+      } else {
+        setUseUserCRPref((Boolean)value);
+      }
+      break;
+
     }
   }
 
@@ -579,6 +620,9 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
     case EXPERIMENT_DATA_DIR:
       return getExperimentDataDir();
 
+    case USE_USER_CRPREF:
+      return isUseUserCRPref();
+
     }
     throw new IllegalStateException();
   }
@@ -608,6 +652,8 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
       return isSetStorageId();
     case EXPERIMENT_DATA_DIR:
       return isSetExperimentDataDir();
+    case USE_USER_CRPREF:
+      return isSetUseUserCRPref();
     }
     throw new IllegalStateException();
   }
@@ -706,6 +752,15 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
         return false;
     }
 
+    boolean this_present_useUserCRPref = true && this.isSetUseUserCRPref();
+    boolean that_present_useUserCRPref = true && that.isSetUseUserCRPref();
+    if (this_present_useUserCRPref || that_present_useUserCRPref) {
+      if (!(this_present_useUserCRPref && that_present_useUserCRPref))
+        return false;
+      if (this.useUserCRPref != that.useUserCRPref)
+        return false;
+    }
+
     return true;
   }
 
@@ -758,6 +813,11 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
     if (present_experimentDataDir)
       list.add(experimentDataDir);
 
+    boolean present_useUserCRPref = true && (isSetUseUserCRPref());
+    list.add(present_useUserCRPref);
+    if (present_useUserCRPref)
+      list.add(useUserCRPref);
+
     return list.hashCode();
   }
 
@@ -859,6 +919,16 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetUseUserCRPref()).compareTo(other.isSetUseUserCRPref());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetUseUserCRPref()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.useUserCRPref, other.useUserCRPref);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -944,6 +1014,12 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
       }
       first = false;
     }
+    if (isSetUseUserCRPref()) {
+      if (!first) sb.append(", ");
+      sb.append("useUserCRPref:");
+      sb.append(this.useUserCRPref);
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -1073,6 +1149,14 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 10: // USE_USER_CRPREF
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.useUserCRPref = iprot.readBool();
+              struct.setUseUserCRPrefIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -1135,6 +1219,11 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
           oprot.writeFieldEnd();
         }
       }
+      if (struct.isSetUseUserCRPref()) {
+        oprot.writeFieldBegin(USE_USER_CRPREF_FIELD_DESC);
+        oprot.writeBool(struct.useUserCRPref);
+        oprot.writeFieldEnd();
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -1176,7 +1265,10 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
       if (struct.isSetExperimentDataDir()) {
         optionals.set(6);
       }
-      oprot.writeBitSet(optionals, 7);
+      if (struct.isSetUseUserCRPref()) {
+        optionals.set(7);
+      }
+      oprot.writeBitSet(optionals, 8);
       if (struct.isSetShareExperimentPublicly()) {
         oprot.writeBool(struct.shareExperimentPublicly);
       }
@@ -1198,6 +1290,9 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
       if (struct.isSetExperimentDataDir()) {
         oprot.writeString(struct.experimentDataDir);
       }
+      if (struct.isSetUseUserCRPref()) {
+        oprot.writeBool(struct.useUserCRPref);
+      }
     }
 
     @Override
@@ -1207,7 +1302,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
       struct.setAiravataAutoScheduleIsSet(true);
       struct.overrideManualScheduledParams = iprot.readBool();
       struct.setOverrideManualScheduledParamsIsSet(true);
-      BitSet incoming = iprot.readBitSet(7);
+      BitSet incoming = iprot.readBitSet(8);
       if (incoming.get(0)) {
         struct.shareExperimentPublicly = iprot.readBool();
         struct.setShareExperimentPubliclyIsSet(true);
@@ -1237,6 +1332,10 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
         struct.experimentDataDir = iprot.readString();
         struct.setExperimentDataDirIsSet(true);
       }
+      if (incoming.get(7)) {
+        struct.useUserCRPref = iprot.readBool();
+        struct.setUseUserCRPrefIsSet(true);
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d7d058b1/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
index 02c1904..8fdf299 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
@@ -147,6 +147,7 @@ public class ExperimentRegistry {
             configDataResource.setStaticWorkingDir(configurationData.getComputationalResourceScheduling().getStaticWorkingDir());
             configDataResource.setStorageId(configurationData.getStorageId());
             configDataResource.setExperimentDataDir(configurationData.getExperimentDataDir());
+            configDataResource.setUseUserCRPref(configurationData.isUseUserCRPref());
             configDataResource.save();
         } catch (Exception e) {
             logger.error("Unable to save user config data", e);
@@ -720,6 +721,7 @@ public class ExperimentRegistry {
             configDataResource.setTotalPhysicalMemory(configurationData.getComputationalResourceScheduling().getTotalPhysicalMemory());
             configDataResource.setStaticWorkingDir(configurationData.getComputationalResourceScheduling().getStaticWorkingDir());
             configDataResource.setExperimentDataDir(configurationData.getExperimentDataDir());
+            configDataResource.setUseUserCRPref(configurationData.isUseUserCRPref());
             configDataResource.save();
         } catch (Exception e) {
             logger.error("Unable to save user config data", e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/d7d058b1/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
index efad5ce..5ad5224 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
@@ -50,6 +50,7 @@ public class UserConfigurationData {
     private String overrideAllocationProjectNumber;
     private String storageId;
     private String experimentDataDir;
+    private boolean useUserCRPref;
 
     @Id
     @Column(name = "EXPERIMENT_ID")
@@ -232,6 +233,14 @@ public class UserConfigurationData {
         this.experimentDataDir = experimentDataDir;
     }
 
+    @Column(name = "IS_USE_USER_CR_PREF")
+    public boolean isUseUserCRPref() {
+        return useUserCRPref;
+    }
+
+    public void setUseUserCRPref(boolean useUserCRPref) {
+        this.useUserCRPref = useUserCRPref;
+    }
 
     //    @Override
 //    public boolean equals(Object o) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/d7d058b1/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/UserConfigurationDataResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/UserConfigurationDataResource.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/UserConfigurationDataResource.java
index c6516c4..163bf74 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/UserConfigurationDataResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/UserConfigurationDataResource.java
@@ -54,6 +54,7 @@ public class UserConfigurationDataResource extends AbstractExpCatResource
{
     private String overrideAllocationProjectNumber;
     private String storageId;
     private String experimentDataDir;
+    private boolean useUserCRPref;
 
     public String getExperimentId() {
         return experimentId;
@@ -215,6 +216,14 @@ public class UserConfigurationDataResource extends AbstractExpCatResource
{
         this.experimentDataDir = experimentDataDir;
     }
 
+    public boolean getUseUserCRPref() {
+        return useUserCRPref;
+    }
+
+    public void setUseUserCRPref(boolean useUserCRPref) {
+        this.useUserCRPref = useUserCRPref;
+    }
+
     public ExperimentCatResource create(ResourceType type) throws RegistryException {
         logger.error("Unsupported resource type for process resource scheduling data resource.",
new UnsupportedOperationException());
         throw new UnsupportedOperationException();
@@ -282,6 +291,7 @@ public class UserConfigurationDataResource extends AbstractExpCatResource
{
             userConfigurationData.setTotalPhysicalMemory(totalPhysicalMemory);
             userConfigurationData.setStorageId(storageId);
             userConfigurationData.setExperimentDataDir(experimentDataDir);
+            userConfigurationData.setUseUserCRPref(useUserCRPref);
             if (existingConf == null) {
                 em.persist(userConfigurationData);
             } else {

http://git-wip-us.apache.org/repos/asf/airavata/blob/d7d058b1/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
index 4852467..2c36442 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
@@ -557,6 +557,7 @@ public class Utils {
             configurationDataResource.setOverrideAllocationProjectNumber(o.getOverrideAllocationProjectNumber());
             configurationDataResource.setStorageId(o.getStorageId());
             configurationDataResource.setExperimentDataDir(o.getExperimentDataDir());
+            configurationDataResource.setUseUserCRPref(o.isUseUserCRPref());
         }
         return configurationDataResource;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/d7d058b1/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
index 8740737..a498de5 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
@@ -534,6 +534,7 @@ public class ThriftDataModelConversion {
             data.setGenerateCert(resource.getGenerateCert());
             data.setStorageId(resource.getStorageId());
             data.setExperimentDataDir(resource.getExperimentDataDir());
+            data.setUseUserCRPref(resource.getUseUserCRPref());
 
             ComputationalResourceSchedulingModel resourceSchedulingModel = new ComputationalResourceSchedulingModel();
             resourceSchedulingModel.setResourceHostId(resource.getResourceHostId());

http://git-wip-us.apache.org/repos/asf/airavata/blob/d7d058b1/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
index 3388dea..5fd86e7 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
@@ -194,6 +194,7 @@ CREATE TABLE USER_CONFIGURATION_DATA (
   OVERRIDE_ALLOCATION_PROJECT_NUMBER varchar(255),
   STORAGE_RESOURCE_ID varchar(255),
   EXPERIMENT_DATA_DIR VARCHAR (512),
+  IS_USE_USER_CR_PREF BOOLEAN,
   PRIMARY KEY (EXPERIMENT_ID),
   FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
 );

http://git-wip-us.apache.org/repos/asf/airavata/blob/d7d058b1/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
index 2c776af..78bdb99 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
@@ -195,6 +195,7 @@ CREATE TABLE USER_CONFIGURATION_DATA (
   OVERRIDE_ALLOCATION_PROJECT_NUMBER varchar(255),
   STORAGE_RESOURCE_ID varchar(255),
   EXPERIMENT_DATA_DIR VARCHAR (512),
+  IS_USE_USER_CR_PREF TINYINT(1),
   PRIMARY KEY (EXPERIMENT_ID),
   FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
 );

http://git-wip-us.apache.org/repos/asf/airavata/blob/d7d058b1/thrift-interface-descriptions/data-models/experiment-catalog-models/experiment_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/experiment-catalog-models/experiment_model.thrift
b/thrift-interface-descriptions/data-models/experiment-catalog-models/experiment_model.thrift
index 5e54bf1..dd1d98b 100644
--- a/thrift-interface-descriptions/data-models/experiment-catalog-models/experiment_model.thrift
+++ b/thrift-interface-descriptions/data-models/experiment-catalog-models/experiment_model.thrift
@@ -64,6 +64,7 @@ struct UserConfigurationDataModel {
     7: optional bool generateCert = 0,
     8: optional string storageId;
     9: optional string experimentDataDir;
+    10: optional bool useUserCRPref;
 }
 
 /**


Mime
View raw message