airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [07/16] airavata git commit: adding working directory archive flag
Date Fri, 11 Mar 2016 06:57:23 GMT
adding working directory archive flag


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

Branch: refs/heads/master
Commit: 7fbc6241f6ccf76c4829ed2ca745913d95a680ff
Parents: 75fb3b3
Author: Suresh Marru <smarru@apache.org>
Authored: Mon Mar 7 13:25:13 2016 -0500
Committer: Suresh Marru <smarru@apache.org>
Committed: Mon Mar 7 13:25:13 2016 -0500

----------------------------------------------------------------------
 .../application_interface_model_types.cpp       |  22 ++++
 .../application_interface_model_types.h         |  12 +-
 .../Model/AppCatalog/AppInterface/Types.php     |  23 ++++
 .../model/appcatalog/appinterface/ttypes.py     |  15 ++-
 .../ApplicationInterfaceDescription.java        | 113 ++++++++++++++++++-
 .../main/resources/airavata-server.properties   |   3 +-
 .../catalog/impl/ApplicationInterfaceImpl.java  |   2 +
 .../app/catalog/model/ApplicationInterface.java |  11 +-
 .../catalog/resources/AppInterfaceResource.java |  11 ++
 .../util/AppCatalogThriftConversion.java        |   1 +
 .../src/main/resources/appcatalog-derby.sql     |   1 +
 .../src/main/resources/appcatalog-mysql.sql     |   6 +-
 .../application_interface_model.thrift          |   3 +-
 13 files changed, 211 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/7fbc6241/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_interface_model_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_interface_model_types.cpp
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_interface_model_types.cpp
index 69df9f2..068f8f1 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_interface_model_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_interface_model_types.cpp
@@ -63,6 +63,11 @@ void ApplicationInterfaceDescription::__set_applicationOutputs(const std::vector
 __isset.applicationOutputs = true;
 }
 
+void ApplicationInterfaceDescription::__set_archiveWorkingDirectory(const bool val) {
+  this->archiveWorkingDirectory = val;
+__isset.archiveWorkingDirectory = true;
+}
+
 uint32_t ApplicationInterfaceDescription::read(::apache::thrift::protocol::TProtocol* iprot)
{
 
   apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -170,6 +175,14 @@ uint32_t ApplicationInterfaceDescription::read(::apache::thrift::protocol::TProt
           xfer += iprot->skip(ftype);
         }
         break;
+      case 7:
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->archiveWorkingDirectory);
+          this->__isset.archiveWorkingDirectory = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -243,6 +256,11 @@ uint32_t ApplicationInterfaceDescription::write(::apache::thrift::protocol::TPro
     }
     xfer += oprot->writeFieldEnd();
   }
+  if (this->__isset.archiveWorkingDirectory) {
+    xfer += oprot->writeFieldBegin("archiveWorkingDirectory", ::apache::thrift::protocol::T_BOOL,
7);
+    xfer += oprot->writeBool(this->archiveWorkingDirectory);
+    xfer += oprot->writeFieldEnd();
+  }
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -256,6 +274,7 @@ void swap(ApplicationInterfaceDescription &a, ApplicationInterfaceDescription
&b
   swap(a.applicationModules, b.applicationModules);
   swap(a.applicationInputs, b.applicationInputs);
   swap(a.applicationOutputs, b.applicationOutputs);
+  swap(a.archiveWorkingDirectory, b.archiveWorkingDirectory);
   swap(a.__isset, b.__isset);
 }
 
@@ -266,6 +285,7 @@ ApplicationInterfaceDescription::ApplicationInterfaceDescription(const
Applicati
   applicationModules = other18.applicationModules;
   applicationInputs = other18.applicationInputs;
   applicationOutputs = other18.applicationOutputs;
+  archiveWorkingDirectory = other18.archiveWorkingDirectory;
   __isset = other18.__isset;
 }
 ApplicationInterfaceDescription& ApplicationInterfaceDescription::operator=(const ApplicationInterfaceDescription&
other19) {
@@ -275,6 +295,7 @@ ApplicationInterfaceDescription& ApplicationInterfaceDescription::operator=(cons
   applicationModules = other19.applicationModules;
   applicationInputs = other19.applicationInputs;
   applicationOutputs = other19.applicationOutputs;
+  archiveWorkingDirectory = other19.archiveWorkingDirectory;
   __isset = other19.__isset;
   return *this;
 }
@@ -287,6 +308,7 @@ void ApplicationInterfaceDescription::printTo(std::ostream& out) const
{
   out << ", " << "applicationModules="; (__isset.applicationModules ? (out <<
to_string(applicationModules)) : (out << "<null>"));
   out << ", " << "applicationInputs="; (__isset.applicationInputs ? (out <<
to_string(applicationInputs)) : (out << "<null>"));
   out << ", " << "applicationOutputs="; (__isset.applicationOutputs ? (out <<
to_string(applicationOutputs)) : (out << "<null>"));
+  out << ", " << "archiveWorkingDirectory="; (__isset.archiveWorkingDirectory
? (out << to_string(archiveWorkingDirectory)) : (out << "<null>"));
   out << ")";
 }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/7fbc6241/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_interface_model_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_interface_model_types.h
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_interface_model_types.h
index adafa82..cec4016 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_interface_model_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_interface_model_types.h
@@ -41,11 +41,12 @@ namespace apache { namespace airavata { namespace model { namespace appcatalog
{
 class ApplicationInterfaceDescription;
 
 typedef struct _ApplicationInterfaceDescription__isset {
-  _ApplicationInterfaceDescription__isset() : applicationDescription(false), applicationModules(false),
applicationInputs(false), applicationOutputs(false) {}
+  _ApplicationInterfaceDescription__isset() : applicationDescription(false), applicationModules(false),
applicationInputs(false), applicationOutputs(false), archiveWorkingDirectory(true) {}
   bool applicationDescription :1;
   bool applicationModules :1;
   bool applicationInputs :1;
   bool applicationOutputs :1;
+  bool archiveWorkingDirectory :1;
 } _ApplicationInterfaceDescription__isset;
 
 class ApplicationInterfaceDescription {
@@ -53,7 +54,7 @@ class ApplicationInterfaceDescription {
 
   ApplicationInterfaceDescription(const ApplicationInterfaceDescription&);
   ApplicationInterfaceDescription& operator=(const ApplicationInterfaceDescription&);
-  ApplicationInterfaceDescription() : applicationInterfaceId("DO_NOT_SET_AT_CLIENTS"), applicationName(),
applicationDescription() {
+  ApplicationInterfaceDescription() : applicationInterfaceId("DO_NOT_SET_AT_CLIENTS"), applicationName(),
applicationDescription(), archiveWorkingDirectory(false) {
   }
 
   virtual ~ApplicationInterfaceDescription() throw();
@@ -63,6 +64,7 @@ class ApplicationInterfaceDescription {
   std::vector<std::string>  applicationModules;
   std::vector< ::apache::airavata::model::application::io::InputDataObjectType>  applicationInputs;
   std::vector< ::apache::airavata::model::application::io::OutputDataObjectType>  applicationOutputs;
+  bool archiveWorkingDirectory;
 
   _ApplicationInterfaceDescription__isset __isset;
 
@@ -78,6 +80,8 @@ class ApplicationInterfaceDescription {
 
   void __set_applicationOutputs(const std::vector< ::apache::airavata::model::application::io::OutputDataObjectType>
& val);
 
+  void __set_archiveWorkingDirectory(const bool val);
+
   bool operator == (const ApplicationInterfaceDescription & rhs) const
   {
     if (!(applicationInterfaceId == rhs.applicationInterfaceId))
@@ -100,6 +104,10 @@ class ApplicationInterfaceDescription {
       return false;
     else if (__isset.applicationOutputs && !(applicationOutputs == rhs.applicationOutputs))
       return false;
+    if (__isset.archiveWorkingDirectory != rhs.__isset.archiveWorkingDirectory)
+      return false;
+    else if (__isset.archiveWorkingDirectory && !(archiveWorkingDirectory == rhs.archiveWorkingDirectory))
+      return false;
     return true;
   }
   bool operator != (const ApplicationInterfaceDescription &rhs) const {

http://git-wip-us.apache.org/repos/asf/airavata/blob/7fbc6241/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppInterface/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppInterface/Types.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppInterface/Types.php
index 1d09112..e2143f0 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppInterface/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppInterface/Types.php
@@ -57,6 +57,10 @@ class ApplicationInterfaceDescription {
    * @var \Airavata\Model\Application\Io\OutputDataObjectType[]
    */
   public $applicationOutputs = null;
+  /**
+   * @var bool
+   */
+  public $archiveWorkingDirectory = false;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -99,6 +103,10 @@ class ApplicationInterfaceDescription {
             'class' => '\Airavata\Model\Application\Io\OutputDataObjectType',
             ),
           ),
+        7 => array(
+          'var' => 'archiveWorkingDirectory',
+          'type' => TType::BOOL,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -120,6 +128,9 @@ class ApplicationInterfaceDescription {
       if (isset($vals['applicationOutputs'])) {
         $this->applicationOutputs = $vals['applicationOutputs'];
       }
+      if (isset($vals['archiveWorkingDirectory'])) {
+        $this->archiveWorkingDirectory = $vals['archiveWorkingDirectory'];
+      }
     }
   }
 
@@ -216,6 +227,13 @@ class ApplicationInterfaceDescription {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 7:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->archiveWorkingDirectory);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -295,6 +313,11 @@ class ApplicationInterfaceDescription {
       }
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->archiveWorkingDirectory !== null) {
+      $xfer += $output->writeFieldBegin('archiveWorkingDirectory', TType::BOOL, 7);
+      $xfer += $output->writeBool($this->archiveWorkingDirectory);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata/blob/7fbc6241/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/appinterface/ttypes.py
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/appinterface/ttypes.py
b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/appinterface/ttypes.py
index 7e0ca14..4cadd1e 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/appinterface/ttypes.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/appinterface/ttypes.py
@@ -41,6 +41,7 @@ class ApplicationInterfaceDescription:
    - applicationModules
    - applicationInputs
    - applicationOutputs
+   - archiveWorkingDirectory
   """
 
   thrift_spec = (
@@ -51,15 +52,17 @@ class ApplicationInterfaceDescription:
     (4, TType.LIST, 'applicationModules', (TType.STRING,None), None, ), # 4
     (5, TType.LIST, 'applicationInputs', (TType.STRUCT,(apache.airavata.model.application.io.ttypes.InputDataObjectType,
apache.airavata.model.application.io.ttypes.InputDataObjectType.thrift_spec)), None, ), #
5
     (6, TType.LIST, 'applicationOutputs', (TType.STRUCT,(apache.airavata.model.application.io.ttypes.OutputDataObjectType,
apache.airavata.model.application.io.ttypes.OutputDataObjectType.thrift_spec)), None, ), #
6
+    (7, TType.BOOL, 'archiveWorkingDirectory', None, False, ), # 7
   )
 
-  def __init__(self, applicationInterfaceId=thrift_spec[1][4], applicationName=None, applicationDescription=None,
applicationModules=None, applicationInputs=None, applicationOutputs=None,):
+  def __init__(self, applicationInterfaceId=thrift_spec[1][4], applicationName=None, applicationDescription=None,
applicationModules=None, applicationInputs=None, applicationOutputs=None, archiveWorkingDirectory=thrift_spec[7][4],):
     self.applicationInterfaceId = applicationInterfaceId
     self.applicationName = applicationName
     self.applicationDescription = applicationDescription
     self.applicationModules = applicationModules
     self.applicationInputs = applicationInputs
     self.applicationOutputs = applicationOutputs
+    self.archiveWorkingDirectory = archiveWorkingDirectory
 
   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:
@@ -117,6 +120,11 @@ class ApplicationInterfaceDescription:
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
+      elif fid == 7:
+        if ftype == TType.BOOL:
+          self.archiveWorkingDirectory = iprot.readBool()
+        else:
+          iprot.skip(ftype)
       else:
         iprot.skip(ftype)
       iprot.readFieldEnd()
@@ -160,6 +168,10 @@ class ApplicationInterfaceDescription:
         iter20.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
+    if self.archiveWorkingDirectory is not None:
+      oprot.writeFieldBegin('archiveWorkingDirectory', TType.BOOL, 7)
+      oprot.writeBool(self.archiveWorkingDirectory)
+      oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
 
@@ -179,6 +191,7 @@ class ApplicationInterfaceDescription:
     value = (value * 31) ^ hash(self.applicationModules)
     value = (value * 31) ^ hash(self.applicationInputs)
     value = (value * 31) ^ hash(self.applicationOutputs)
+    value = (value * 31) ^ hash(self.archiveWorkingDirectory)
     return value
 
   def __repr__(self):

http://git-wip-us.apache.org/repos/asf/airavata/blob/7fbc6241/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appinterface/ApplicationInterfaceDescription.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appinterface/ApplicationInterfaceDescription.java
b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appinterface/ApplicationInterfaceDescription.java
index 973c179..77daa76 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appinterface/ApplicationInterfaceDescription.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appinterface/ApplicationInterfaceDescription.java
@@ -74,6 +74,7 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
   private static final org.apache.thrift.protocol.TField APPLICATION_MODULES_FIELD_DESC =
new org.apache.thrift.protocol.TField("applicationModules", org.apache.thrift.protocol.TType.LIST,
(short)4);
   private static final org.apache.thrift.protocol.TField APPLICATION_INPUTS_FIELD_DESC =
new org.apache.thrift.protocol.TField("applicationInputs", org.apache.thrift.protocol.TType.LIST,
(short)5);
   private static final org.apache.thrift.protocol.TField APPLICATION_OUTPUTS_FIELD_DESC =
new org.apache.thrift.protocol.TField("applicationOutputs", org.apache.thrift.protocol.TType.LIST,
(short)6);
+  private static final org.apache.thrift.protocol.TField ARCHIVE_WORKING_DIRECTORY_FIELD_DESC
= new org.apache.thrift.protocol.TField("archiveWorkingDirectory", org.apache.thrift.protocol.TType.BOOL,
(short)7);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -87,6 +88,7 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
   private List<String> applicationModules; // optional
   private List<org.apache.airavata.model.application.io.InputDataObjectType> applicationInputs;
// optional
   private List<org.apache.airavata.model.application.io.OutputDataObjectType> applicationOutputs;
// optional
+  private boolean archiveWorkingDirectory; // 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 {
@@ -95,7 +97,8 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
     APPLICATION_DESCRIPTION((short)3, "applicationDescription"),
     APPLICATION_MODULES((short)4, "applicationModules"),
     APPLICATION_INPUTS((short)5, "applicationInputs"),
-    APPLICATION_OUTPUTS((short)6, "applicationOutputs");
+    APPLICATION_OUTPUTS((short)6, "applicationOutputs"),
+    ARCHIVE_WORKING_DIRECTORY((short)7, "archiveWorkingDirectory");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -122,6 +125,8 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
           return APPLICATION_INPUTS;
         case 6: // APPLICATION_OUTPUTS
           return APPLICATION_OUTPUTS;
+        case 7: // ARCHIVE_WORKING_DIRECTORY
+          return ARCHIVE_WORKING_DIRECTORY;
         default:
           return null;
       }
@@ -162,7 +167,9 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
   }
 
   // isset id assignments
-  private static final _Fields optionals[] = {_Fields.APPLICATION_DESCRIPTION,_Fields.APPLICATION_MODULES,_Fields.APPLICATION_INPUTS,_Fields.APPLICATION_OUTPUTS};
+  private static final int __ARCHIVEWORKINGDIRECTORY_ISSET_ID = 0;
+  private byte __isset_bitfield = 0;
+  private static final _Fields optionals[] = {_Fields.APPLICATION_DESCRIPTION,_Fields.APPLICATION_MODULES,_Fields.APPLICATION_INPUTS,_Fields.APPLICATION_OUTPUTS,_Fields.ARCHIVE_WORKING_DIRECTORY};
   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);
@@ -181,6 +188,8 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
     tmpMap.put(_Fields.APPLICATION_OUTPUTS, new org.apache.thrift.meta_data.FieldMetaData("applicationOutputs",
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.application.io.OutputDataObjectType.class))));
+    tmpMap.put(_Fields.ARCHIVE_WORKING_DIRECTORY, new org.apache.thrift.meta_data.FieldMetaData("archiveWorkingDirectory",
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(ApplicationInterfaceDescription.class,
metaDataMap);
   }
@@ -188,6 +197,8 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
   public ApplicationInterfaceDescription() {
     this.applicationInterfaceId = "DO_NOT_SET_AT_CLIENTS";
 
+    this.archiveWorkingDirectory = false;
+
   }
 
   public ApplicationInterfaceDescription(
@@ -203,6 +214,7 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
    * Performs a deep copy on <i>other</i>.
    */
   public ApplicationInterfaceDescription(ApplicationInterfaceDescription other) {
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetApplicationInterfaceId()) {
       this.applicationInterfaceId = other.applicationInterfaceId;
     }
@@ -230,6 +242,7 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
       }
       this.applicationOutputs = __this__applicationOutputs;
     }
+    this.archiveWorkingDirectory = other.archiveWorkingDirectory;
   }
 
   public ApplicationInterfaceDescription deepCopy() {
@@ -245,6 +258,8 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
     this.applicationModules = null;
     this.applicationInputs = null;
     this.applicationOutputs = null;
+    this.archiveWorkingDirectory = false;
+
   }
 
   public String getApplicationInterfaceId() {
@@ -430,6 +445,28 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
     }
   }
 
+  public boolean isArchiveWorkingDirectory() {
+    return this.archiveWorkingDirectory;
+  }
+
+  public void setArchiveWorkingDirectory(boolean archiveWorkingDirectory) {
+    this.archiveWorkingDirectory = archiveWorkingDirectory;
+    setArchiveWorkingDirectoryIsSet(true);
+  }
+
+  public void unsetArchiveWorkingDirectory() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ARCHIVEWORKINGDIRECTORY_ISSET_ID);
+  }
+
+  /** Returns true if field archiveWorkingDirectory is set (has been assigned a value) and
false otherwise */
+  public boolean isSetArchiveWorkingDirectory() {
+    return EncodingUtils.testBit(__isset_bitfield, __ARCHIVEWORKINGDIRECTORY_ISSET_ID);
+  }
+
+  public void setArchiveWorkingDirectoryIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ARCHIVEWORKINGDIRECTORY_ISSET_ID,
value);
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case APPLICATION_INTERFACE_ID:
@@ -480,6 +517,14 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
       }
       break;
 
+    case ARCHIVE_WORKING_DIRECTORY:
+      if (value == null) {
+        unsetArchiveWorkingDirectory();
+      } else {
+        setArchiveWorkingDirectory((Boolean)value);
+      }
+      break;
+
     }
   }
 
@@ -503,6 +548,9 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
     case APPLICATION_OUTPUTS:
       return getApplicationOutputs();
 
+    case ARCHIVE_WORKING_DIRECTORY:
+      return isArchiveWorkingDirectory();
+
     }
     throw new IllegalStateException();
   }
@@ -526,6 +574,8 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
       return isSetApplicationInputs();
     case APPLICATION_OUTPUTS:
       return isSetApplicationOutputs();
+    case ARCHIVE_WORKING_DIRECTORY:
+      return isSetArchiveWorkingDirectory();
     }
     throw new IllegalStateException();
   }
@@ -597,6 +647,15 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
         return false;
     }
 
+    boolean this_present_archiveWorkingDirectory = true && this.isSetArchiveWorkingDirectory();
+    boolean that_present_archiveWorkingDirectory = true && that.isSetArchiveWorkingDirectory();
+    if (this_present_archiveWorkingDirectory || that_present_archiveWorkingDirectory) {
+      if (!(this_present_archiveWorkingDirectory && that_present_archiveWorkingDirectory))
+        return false;
+      if (this.archiveWorkingDirectory != that.archiveWorkingDirectory)
+        return false;
+    }
+
     return true;
   }
 
@@ -634,6 +693,11 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
     if (present_applicationOutputs)
       list.add(applicationOutputs);
 
+    boolean present_archiveWorkingDirectory = true && (isSetArchiveWorkingDirectory());
+    list.add(present_archiveWorkingDirectory);
+    if (present_archiveWorkingDirectory)
+      list.add(archiveWorkingDirectory);
+
     return list.hashCode();
   }
 
@@ -705,6 +769,16 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetArchiveWorkingDirectory()).compareTo(other.isSetArchiveWorkingDirectory());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetArchiveWorkingDirectory()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.archiveWorkingDirectory,
other.archiveWorkingDirectory);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -780,6 +854,12 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
       }
       first = false;
     }
+    if (isSetArchiveWorkingDirectory()) {
+      if (!first) sb.append(", ");
+      sb.append("archiveWorkingDirectory:");
+      sb.append(this.archiveWorkingDirectory);
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -807,6 +887,8 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
 
   private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
     try {
+      // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
+      __isset_bitfield = 0;
       read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
@@ -911,6 +993,14 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 7: // ARCHIVE_WORKING_DIRECTORY
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.archiveWorkingDirectory = iprot.readBool();
+              struct.setArchiveWorkingDirectoryIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -983,6 +1073,11 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
           oprot.writeFieldEnd();
         }
       }
+      if (struct.isSetArchiveWorkingDirectory()) {
+        oprot.writeFieldBegin(ARCHIVE_WORKING_DIRECTORY_FIELD_DESC);
+        oprot.writeBool(struct.archiveWorkingDirectory);
+        oprot.writeFieldEnd();
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -1015,7 +1110,10 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
       if (struct.isSetApplicationOutputs()) {
         optionals.set(3);
       }
-      oprot.writeBitSet(optionals, 4);
+      if (struct.isSetArchiveWorkingDirectory()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
       if (struct.isSetApplicationDescription()) {
         oprot.writeString(struct.applicationDescription);
       }
@@ -1046,6 +1144,9 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
           }
         }
       }
+      if (struct.isSetArchiveWorkingDirectory()) {
+        oprot.writeBool(struct.archiveWorkingDirectory);
+      }
     }
 
     @Override
@@ -1055,7 +1156,7 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
       struct.setApplicationInterfaceIdIsSet(true);
       struct.applicationName = iprot.readString();
       struct.setApplicationNameIsSet(true);
-      BitSet incoming = iprot.readBitSet(4);
+      BitSet incoming = iprot.readBitSet(5);
       if (incoming.get(0)) {
         struct.applicationDescription = iprot.readString();
         struct.setApplicationDescriptionIsSet(true);
@@ -1101,6 +1202,10 @@ public class ApplicationInterfaceDescription implements org.apache.thrift.TBase<
         }
         struct.setApplicationOutputsIsSet(true);
       }
+      if (incoming.get(4)) {
+        struct.archiveWorkingDirectory = iprot.readBool();
+        struct.setArchiveWorkingDirectoryIsSet(true);
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/7fbc6241/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/airavata-server.properties b/modules/configuration/server/src/main/resources/airavata-server.properties
index 0b7be61..000e183 100644
--- a/modules/configuration/server/src/main/resources/airavata-server.properties
+++ b/modules/configuration/server/src/main/resources/airavata-server.properties
@@ -37,6 +37,7 @@ registry.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;use
 #registry.jdbc.url=jdbc:mysql://localhost:3306/experiment_catalog
 registry.jdbc.user=airavata
 registry.jdbc.password=airavata
+#FIXME: Probably the following property should be removed.
 start.derby.server.mode=true
 validationQuery=SELECT 1 from CONFIGURATION
 cache.enable=true
@@ -167,7 +168,7 @@ job.notification.flags=abe
 credential.store.keystore.url=/Users/chathuri/dev/airavata/credential-store/oa4mp/airavata_sym.jks
 credential.store.keystore.alias=airavata
 credential.store.keystore.password=airavata
-credential.store.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
+credential.store.jdbc.url=jdbc:derby://localhost:1527/credential-store;create=true;user=airavata;password=airavata
 credential.store.jdbc.user=airavata
 credential.store.jdbc.password=airavata
 credential.store.jdbc.driver=org.apache.derby.jdbc.ClientDriver

http://git-wip-us.apache.org/repos/asf/airavata/blob/7fbc6241/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ApplicationInterfaceImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ApplicationInterfaceImpl.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ApplicationInterfaceImpl.java
index 0a5806a..e6af5bb 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ApplicationInterfaceImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ApplicationInterfaceImpl.java
@@ -76,6 +76,7 @@ public class ApplicationInterfaceImpl implements ApplicationInterface {
             }
             resource.setAppDescription(applicationInterfaceDescription.getApplicationDescription());
             resource.setGatewayId(gatewayId);
+            resource.setArchiveWorkingDirectory(applicationInterfaceDescription.isArchiveWorkingDirectory());
             resource.save();
             applicationInterfaceDescription.setApplicationInterfaceId(resource.getInterfaceId());
 
@@ -177,6 +178,7 @@ public class ApplicationInterfaceImpl implements ApplicationInterface
{
             AppInterfaceResource existingInterface = (AppInterfaceResource) resource.get(interfaceId);
             existingInterface.setAppName(updatedInterface.getApplicationName());
             existingInterface.setAppDescription(updatedInterface.getApplicationDescription());
+            existingInterface.setArchiveWorkingDirectory(updatedInterface.isArchiveWorkingDirectory());
             existingInterface.save();
 
             // remove existing modules before adding

http://git-wip-us.apache.org/repos/asf/airavata/blob/7fbc6241/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationInterface.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationInterface.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationInterface.java
index 7beb05c..30cc95f 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationInterface.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/ApplicationInterface.java
@@ -42,7 +42,8 @@ public class ApplicationInterface implements Serializable {
     private Timestamp creationTime;
     @Column(name = "GATEWAY_ID")
     private String gatewayId;
-
+    @Column(name = "ARCHIVE_WORKING_DIRECTORY")
+    private boolean archiveWorkingDirectory;
     @Column(name = "UPDATE_TIME")
     private Timestamp updateTime;
 
@@ -54,6 +55,14 @@ public class ApplicationInterface implements Serializable {
         this.gatewayId = gatewayId;
     }
 
+    public boolean isArchiveWorkingDirectory() {
+        return archiveWorkingDirectory;
+    }
+
+    public void setArchiveWorkingDirectory(boolean archiveWorkingDirectory) {
+        this.archiveWorkingDirectory = archiveWorkingDirectory;
+    }
+
     public Timestamp getCreationTime() {
         return creationTime;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/7fbc6241/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/AppInterfaceResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/AppInterfaceResource.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/AppInterfaceResource.java
index 967ebf4..72be684 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/AppInterfaceResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/AppInterfaceResource.java
@@ -45,6 +45,7 @@ public class AppInterfaceResource extends AppCatAbstractResource {
     private Timestamp createdTime;
     private Timestamp updatedTime;
     private String gatewayId;
+    private boolean archiveWorkingDirectory;
 
     public String getGatewayId() {
         return gatewayId;
@@ -54,6 +55,14 @@ public class AppInterfaceResource extends AppCatAbstractResource {
         this.gatewayId = gatewayId;
     }
 
+    public boolean isArchiveWorkingDirectory() {
+        return archiveWorkingDirectory;
+    }
+
+    public void setArchiveWorkingDirectory(boolean archiveWorkingDirectory) {
+        this.archiveWorkingDirectory = archiveWorkingDirectory;
+    }
+
     public Timestamp getCreatedTime() {
         return createdTime;
     }
@@ -360,6 +369,7 @@ public class AppInterfaceResource extends AppCatAbstractResource {
                 existigAppInterface.setAppDescription(appDescription);
                 existigAppInterface.setUpdateTime(AiravataUtils.getCurrentTimestamp());
                 existigAppInterface.setGatewayId(gatewayId);
+                existigAppInterface.setArchiveWorkingDirectory(archiveWorkingDirectory);
                 em.merge(existigAppInterface);
             }else {
                 ApplicationInterface applicationInterface = new ApplicationInterface();
@@ -368,6 +378,7 @@ public class AppInterfaceResource extends AppCatAbstractResource {
                 applicationInterface.setAppDescription(appDescription);
                 applicationInterface.setCreationTime(AiravataUtils.getCurrentTimestamp());
                 applicationInterface.setGatewayId(gatewayId);
+                applicationInterface.setArchiveWorkingDirectory(archiveWorkingDirectory);
                 em.persist(applicationInterface);
             }
             em.getTransaction().commit();

http://git-wip-us.apache.org/repos/asf/airavata/blob/7fbc6241/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
index aa98a21..9151e23 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
@@ -609,6 +609,7 @@ public class AppCatalogThriftConversion {
         description.setApplicationInterfaceId(resource.getInterfaceId());
         description.setApplicationName(resource.getAppName());
         description.setApplicationDescription(resource.getAppDescription());
+        description.setArchiveWorkingDirectory(resource.isArchiveWorkingDirectory());
 
         AppModuleMappingAppCatalogResourceAppCat appModuleMappingResource = new AppModuleMappingAppCatalogResourceAppCat();
         List<AppCatalogResource> appModules = appModuleMappingResource.get(AppCatAbstractResource.AppModuleMappingConstants.INTERFACE_ID,
resource.getInterfaceId());

http://git-wip-us.apache.org/repos/asf/airavata/blob/7fbc6241/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
index 09cb6b2..0026834 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
@@ -268,6 +268,7 @@ CREATE TABLE APPLICATION_INTERFACE
          APPLICATION_NAME VARCHAR(255),
          APPLICATION_DESCRIPTION VARCHAR(500),
          GATEWAY_ID VARCHAR(255),
+         ARCHIVE_WORKING_DIRECTORY SMALLINT,
          CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
          UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
          PRIMARY KEY(INTERFACE_ID)

http://git-wip-us.apache.org/repos/asf/airavata/blob/7fbc6241/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
index b091c16..8a042e2 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
@@ -266,8 +266,10 @@ CREATE TABLE APPLICATION_INTERFACE
          INTERFACE_ID VARCHAR(255),
          APPLICATION_NAME VARCHAR(255),
          APPLICATION_DESCRIPTION VARCHAR(500),
-	     CREATION_TIME TIMESTAMP DEFAULT NOW(),
-         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ,
+         GATEWAY_ID VARCHAR(255),
+         ARCHIVE_WORKING_DIRECTORY SMALLINT,
+	       CREATION_TIME TIMESTAMP DEFAULT NOW(),
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
          PRIMARY KEY(INTERFACE_ID)
 );
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/7fbc6241/thrift-interface-descriptions/data-models/app-catalog-models/application_interface_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/app-catalog-models/application_interface_model.thrift
b/thrift-interface-descriptions/data-models/app-catalog-models/application_interface_model.thrift
index 690e454..1598399 100644
--- a/thrift-interface-descriptions/data-models/app-catalog-models/application_interface_model.thrift
+++ b/thrift-interface-descriptions/data-models/app-catalog-models/application_interface_model.thrift
@@ -52,5 +52,6 @@ struct ApplicationInterfaceDescription {
     3: optional string applicationDescription,
     4: optional list<string> applicationModules,
     5: optional list<application_io_models.InputDataObjectType> applicationInputs,
-    6: optional list<application_io_models.OutputDataObjectType> applicationOutputs
+    6: optional list<application_io_models.OutputDataObjectType> applicationOutputs,
+    7: optional bool archiveWorkingDirectory = 0
 }
\ No newline at end of file


Mime
View raw message