airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [06/13] airavata git commit: Adding searchExperiments methods to the Airavata API
Date Sun, 31 May 2015 21:23:17 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/7e67ca09/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata.py
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata.py
b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata.py
index a556289..8f6142c 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/Airavata.py
@@ -506,6 +506,31 @@ class Iface:
     """
     pass
 
+  def searchExperiments(self, gatewayId, userName, filters, limit, offset):
+    """
+    Search Experiments by using multiple filter criteria with pagination. Results will be
sorted
+    based on creation time DESC
+
+    @param gatewayId
+          Identifier of the requested gateway
+    @param userName
+          Username of the requested user
+    @param filters
+          map of multiple filter criteria. keys has to be camel case field values eg. experimentName
+    @param limit
+          Amount of results to be fetched
+    @param offset
+          The starting point of the results to be fetched
+
+    Parameters:
+     - gatewayId
+     - userName
+     - filters
+     - limit
+     - offset
+    """
+    pass
+
   def getAllExperimentsInProject(self, projectId):
     """
     Get all Experiments within a Project
@@ -3529,6 +3554,64 @@ class Client(Iface):
       raise result.ase
     raise TApplicationException(TApplicationException.MISSING_RESULT, "searchExperimentsByCreationTimeWithPagination
failed: unknown result");
 
+  def searchExperiments(self, gatewayId, userName, filters, limit, offset):
+    """
+    Search Experiments by using multiple filter criteria with pagination. Results will be
sorted
+    based on creation time DESC
+
+    @param gatewayId
+          Identifier of the requested gateway
+    @param userName
+          Username of the requested user
+    @param filters
+          map of multiple filter criteria. keys has to be camel case field values eg. experimentName
+    @param limit
+          Amount of results to be fetched
+    @param offset
+          The starting point of the results to be fetched
+
+    Parameters:
+     - gatewayId
+     - userName
+     - filters
+     - limit
+     - offset
+    """
+    self.send_searchExperiments(gatewayId, userName, filters, limit, offset)
+    return self.recv_searchExperiments()
+
+  def send_searchExperiments(self, gatewayId, userName, filters, limit, offset):
+    self._oprot.writeMessageBegin('searchExperiments', TMessageType.CALL, self._seqid)
+    args = searchExperiments_args()
+    args.gatewayId = gatewayId
+    args.userName = userName
+    args.filters = filters
+    args.limit = limit
+    args.offset = offset
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_searchExperiments(self):
+    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(self._iprot)
+      self._iprot.readMessageEnd()
+      raise x
+    result = searchExperiments_result()
+    result.read(self._iprot)
+    self._iprot.readMessageEnd()
+    if result.success is not None:
+      return result.success
+    if result.ire is not None:
+      raise result.ire
+    if result.ace is not None:
+      raise result.ace
+    if result.ase is not None:
+      raise result.ase
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "searchExperiments
failed: unknown result");
+
   def getAllExperimentsInProject(self, projectId):
     """
     Get all Experiments within a Project
@@ -8014,6 +8097,7 @@ class Processor(Iface, TProcessor):
     self._processMap["searchExperimentsByStatusWithPagination"] = Processor.process_searchExperimentsByStatusWithPagination
     self._processMap["searchExperimentsByCreationTime"] = Processor.process_searchExperimentsByCreationTime
     self._processMap["searchExperimentsByCreationTimeWithPagination"] = Processor.process_searchExperimentsByCreationTimeWithPagination
+    self._processMap["searchExperiments"] = Processor.process_searchExperiments
     self._processMap["getAllExperimentsInProject"] = Processor.process_getAllExperimentsInProject
     self._processMap["getAllExperimentsInProjectWithPagination"] = Processor.process_getAllExperimentsInProjectWithPagination
     self._processMap["getAllUserExperiments"] = Processor.process_getAllUserExperiments
@@ -8672,6 +8756,24 @@ class Processor(Iface, TProcessor):
     oprot.writeMessageEnd()
     oprot.trans.flush()
 
+  def process_searchExperiments(self, seqid, iprot, oprot):
+    args = searchExperiments_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = searchExperiments_result()
+    try:
+      result.success = self._handler.searchExperiments(args.gatewayId, args.userName, args.filters,
args.limit, args.offset)
+    except apache.airavata.api.error.ttypes.InvalidRequestException, ire:
+      result.ire = ire
+    except apache.airavata.api.error.ttypes.AiravataClientException, ace:
+      result.ace = ace
+    except apache.airavata.api.error.ttypes.AiravataSystemException, ase:
+      result.ase = ase
+    oprot.writeMessageBegin("searchExperiments", TMessageType.REPLY, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
   def process_getAllExperimentsInProject(self, seqid, iprot, oprot):
     args = getAllExperimentsInProject_args()
     args.read(iprot)
@@ -16093,6 +16195,239 @@ class searchExperimentsByCreationTimeWithPagination_result:
   def __ne__(self, other):
     return not (self == other)
 
+class searchExperiments_args:
+  """
+  Attributes:
+   - gatewayId
+   - userName
+   - filters
+   - limit
+   - offset
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRING, 'gatewayId', None, None, ), # 1
+    (2, TType.STRING, 'userName', None, None, ), # 2
+    (3, TType.MAP, 'filters', (TType.STRING,None,TType.STRING,None), None, ), # 3
+    (4, TType.I32, 'limit', None, None, ), # 4
+    (5, TType.I32, 'offset', None, None, ), # 5
+  )
+
+  def __init__(self, gatewayId=None, userName=None, filters=None, limit=None, offset=None,):
+    self.gatewayId = gatewayId
+    self.userName = userName
+    self.filters = filters
+    self.limit = limit
+    self.offset = offset
+
+  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:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRING:
+          self.gatewayId = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.STRING:
+          self.userName = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 3:
+        if ftype == TType.MAP:
+          self.filters = {}
+          (_ktype129, _vtype130, _size128 ) = iprot.readMapBegin()
+          for _i132 in xrange(_size128):
+            _key133 = iprot.readString();
+            _val134 = iprot.readString();
+            self.filters[_key133] = _val134
+          iprot.readMapEnd()
+        else:
+          iprot.skip(ftype)
+      elif fid == 4:
+        if ftype == TType.I32:
+          self.limit = iprot.readI32();
+        else:
+          iprot.skip(ftype)
+      elif fid == 5:
+        if ftype == TType.I32:
+          self.offset = iprot.readI32();
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec
is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('searchExperiments_args')
+    if self.gatewayId is not None:
+      oprot.writeFieldBegin('gatewayId', TType.STRING, 1)
+      oprot.writeString(self.gatewayId)
+      oprot.writeFieldEnd()
+    if self.userName is not None:
+      oprot.writeFieldBegin('userName', TType.STRING, 2)
+      oprot.writeString(self.userName)
+      oprot.writeFieldEnd()
+    if self.filters is not None:
+      oprot.writeFieldBegin('filters', TType.MAP, 3)
+      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.filters))
+      for kiter135,viter136 in self.filters.items():
+        oprot.writeString(kiter135)
+        oprot.writeString(viter136)
+      oprot.writeMapEnd()
+      oprot.writeFieldEnd()
+    if self.limit is not None:
+      oprot.writeFieldBegin('limit', TType.I32, 4)
+      oprot.writeI32(self.limit)
+      oprot.writeFieldEnd()
+    if self.offset is not None:
+      oprot.writeFieldBegin('offset', TType.I32, 5)
+      oprot.writeI32(self.offset)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    if self.gatewayId is None:
+      raise TProtocol.TProtocolException(message='Required field gatewayId is unset!')
+    if self.userName is None:
+      raise TProtocol.TProtocolException(message='Required field userName is unset!')
+    if self.limit is None:
+      raise TProtocol.TProtocolException(message='Required field limit is unset!')
+    if self.offset is None:
+      raise TProtocol.TProtocolException(message='Required field offset is unset!')
+    return
+
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class searchExperiments_result:
+  """
+  Attributes:
+   - success
+   - ire
+   - ace
+   - ase
+  """
+
+  thrift_spec = (
+    (0, TType.LIST, 'success', (TType.STRUCT,(apache.airavata.model.workspace.experiment.ttypes.ExperimentSummary,
apache.airavata.model.workspace.experiment.ttypes.ExperimentSummary.thrift_spec)), None, ),
# 0
+    (1, TType.STRUCT, 'ire', (apache.airavata.api.error.ttypes.InvalidRequestException, apache.airavata.api.error.ttypes.InvalidRequestException.thrift_spec),
None, ), # 1
+    (2, TType.STRUCT, 'ace', (apache.airavata.api.error.ttypes.AiravataClientException, apache.airavata.api.error.ttypes.AiravataClientException.thrift_spec),
None, ), # 2
+    (3, TType.STRUCT, 'ase', (apache.airavata.api.error.ttypes.AiravataSystemException, apache.airavata.api.error.ttypes.AiravataSystemException.thrift_spec),
None, ), # 3
+  )
+
+  def __init__(self, success=None, ire=None, ace=None, ase=None,):
+    self.success = success
+    self.ire = ire
+    self.ace = ace
+    self.ase = ase
+
+  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:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.LIST:
+          self.success = []
+          (_etype140, _size137) = iprot.readListBegin()
+          for _i141 in xrange(_size137):
+            _elem142 = apache.airavata.model.workspace.experiment.ttypes.ExperimentSummary()
+            _elem142.read(iprot)
+            self.success.append(_elem142)
+          iprot.readListEnd()
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.ire = apache.airavata.api.error.ttypes.InvalidRequestException()
+          self.ire.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.STRUCT:
+          self.ace = apache.airavata.api.error.ttypes.AiravataClientException()
+          self.ace.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 3:
+        if ftype == TType.STRUCT:
+          self.ase = apache.airavata.api.error.ttypes.AiravataSystemException()
+          self.ase.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec
is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('searchExperiments_result')
+    if self.success is not None:
+      oprot.writeFieldBegin('success', TType.LIST, 0)
+      oprot.writeListBegin(TType.STRUCT, len(self.success))
+      for iter143 in self.success:
+        iter143.write(oprot)
+      oprot.writeListEnd()
+      oprot.writeFieldEnd()
+    if self.ire is not None:
+      oprot.writeFieldBegin('ire', TType.STRUCT, 1)
+      self.ire.write(oprot)
+      oprot.writeFieldEnd()
+    if self.ace is not None:
+      oprot.writeFieldBegin('ace', TType.STRUCT, 2)
+      self.ace.write(oprot)
+      oprot.writeFieldEnd()
+    if self.ase is not None:
+      oprot.writeFieldBegin('ase', TType.STRUCT, 3)
+      self.ase.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
 class getAllExperimentsInProject_args:
   """
   Attributes:
@@ -16192,11 +16527,11 @@ class getAllExperimentsInProject_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype131, _size128) = iprot.readListBegin()
-          for _i132 in xrange(_size128):
-            _elem133 = apache.airavata.model.workspace.experiment.ttypes.Experiment()
-            _elem133.read(iprot)
-            self.success.append(_elem133)
+          (_etype147, _size144) = iprot.readListBegin()
+          for _i148 in xrange(_size144):
+            _elem149 = apache.airavata.model.workspace.experiment.ttypes.Experiment()
+            _elem149.read(iprot)
+            self.success.append(_elem149)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -16237,8 +16572,8 @@ class getAllExperimentsInProject_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter134 in self.success:
-        iter134.write(oprot)
+      for iter150 in self.success:
+        iter150.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -16402,11 +16737,11 @@ class getAllExperimentsInProjectWithPagination_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype138, _size135) = iprot.readListBegin()
-          for _i139 in xrange(_size135):
-            _elem140 = apache.airavata.model.workspace.experiment.ttypes.Experiment()
-            _elem140.read(iprot)
-            self.success.append(_elem140)
+          (_etype154, _size151) = iprot.readListBegin()
+          for _i155 in xrange(_size151):
+            _elem156 = apache.airavata.model.workspace.experiment.ttypes.Experiment()
+            _elem156.read(iprot)
+            self.success.append(_elem156)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -16447,8 +16782,8 @@ class getAllExperimentsInProjectWithPagination_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter141 in self.success:
-        iter141.write(oprot)
+      for iter157 in self.success:
+        iter157.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -16595,11 +16930,11 @@ class getAllUserExperiments_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype145, _size142) = iprot.readListBegin()
-          for _i146 in xrange(_size142):
-            _elem147 = apache.airavata.model.workspace.experiment.ttypes.Experiment()
-            _elem147.read(iprot)
-            self.success.append(_elem147)
+          (_etype161, _size158) = iprot.readListBegin()
+          for _i162 in xrange(_size158):
+            _elem163 = apache.airavata.model.workspace.experiment.ttypes.Experiment()
+            _elem163.read(iprot)
+            self.success.append(_elem163)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -16634,8 +16969,8 @@ class getAllUserExperiments_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter148 in self.success:
-        iter148.write(oprot)
+      for iter164 in self.success:
+        iter164.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -16806,11 +17141,11 @@ class getAllUserExperimentsWithPagination_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype152, _size149) = iprot.readListBegin()
-          for _i153 in xrange(_size149):
-            _elem154 = apache.airavata.model.workspace.experiment.ttypes.Experiment()
-            _elem154.read(iprot)
-            self.success.append(_elem154)
+          (_etype168, _size165) = iprot.readListBegin()
+          for _i169 in xrange(_size165):
+            _elem170 = apache.airavata.model.workspace.experiment.ttypes.Experiment()
+            _elem170.read(iprot)
+            self.success.append(_elem170)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -16845,8 +17180,8 @@ class getAllUserExperimentsWithPagination_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter155 in self.success:
-        iter155.write(oprot)
+      for iter171 in self.success:
+        iter171.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -18278,11 +18613,11 @@ class getExperimentOutputs_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype159, _size156) = iprot.readListBegin()
-          for _i160 in xrange(_size156):
-            _elem161 = apache.airavata.model.appcatalog.appinterface.ttypes.OutputDataObjectType()
-            _elem161.read(iprot)
-            self.success.append(_elem161)
+          (_etype175, _size172) = iprot.readListBegin()
+          for _i176 in xrange(_size172):
+            _elem177 = apache.airavata.model.appcatalog.appinterface.ttypes.OutputDataObjectType()
+            _elem177.read(iprot)
+            self.success.append(_elem177)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -18323,8 +18658,8 @@ class getExperimentOutputs_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter162 in self.success:
-        iter162.write(oprot)
+      for iter178 in self.success:
+        iter178.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -18460,11 +18795,11 @@ class getIntermediateOutputs_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype166, _size163) = iprot.readListBegin()
-          for _i167 in xrange(_size163):
-            _elem168 = apache.airavata.model.appcatalog.appinterface.ttypes.OutputDataObjectType()
-            _elem168.read(iprot)
-            self.success.append(_elem168)
+          (_etype182, _size179) = iprot.readListBegin()
+          for _i183 in xrange(_size179):
+            _elem184 = apache.airavata.model.appcatalog.appinterface.ttypes.OutputDataObjectType()
+            _elem184.read(iprot)
+            self.success.append(_elem184)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -18505,8 +18840,8 @@ class getIntermediateOutputs_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter169 in self.success:
-        iter169.write(oprot)
+      for iter185 in self.success:
+        iter185.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -18642,12 +18977,12 @@ class getJobStatuses_result:
       if fid == 0:
         if ftype == TType.MAP:
           self.success = {}
-          (_ktype171, _vtype172, _size170 ) = iprot.readMapBegin()
-          for _i174 in xrange(_size170):
-            _key175 = iprot.readString();
-            _val176 = apache.airavata.model.workspace.experiment.ttypes.JobStatus()
-            _val176.read(iprot)
-            self.success[_key175] = _val176
+          (_ktype187, _vtype188, _size186 ) = iprot.readMapBegin()
+          for _i190 in xrange(_size186):
+            _key191 = iprot.readString();
+            _val192 = apache.airavata.model.workspace.experiment.ttypes.JobStatus()
+            _val192.read(iprot)
+            self.success[_key191] = _val192
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -18688,9 +19023,9 @@ class getJobStatuses_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.MAP, 0)
       oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success))
-      for kiter177,viter178 in self.success.items():
-        oprot.writeString(kiter177)
-        viter178.write(oprot)
+      for kiter193,viter194 in self.success.items():
+        oprot.writeString(kiter193)
+        viter194.write(oprot)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -18826,11 +19161,11 @@ class getJobDetails_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype182, _size179) = iprot.readListBegin()
-          for _i183 in xrange(_size179):
-            _elem184 = apache.airavata.model.workspace.experiment.ttypes.JobDetails()
-            _elem184.read(iprot)
-            self.success.append(_elem184)
+          (_etype198, _size195) = iprot.readListBegin()
+          for _i199 in xrange(_size195):
+            _elem200 = apache.airavata.model.workspace.experiment.ttypes.JobDetails()
+            _elem200.read(iprot)
+            self.success.append(_elem200)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -18871,8 +19206,8 @@ class getJobDetails_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter185 in self.success:
-        iter185.write(oprot)
+      for iter201 in self.success:
+        iter201.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -19008,11 +19343,11 @@ class getDataTransferDetails_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype189, _size186) = iprot.readListBegin()
-          for _i190 in xrange(_size186):
-            _elem191 = apache.airavata.model.workspace.experiment.ttypes.DataTransferDetails()
-            _elem191.read(iprot)
-            self.success.append(_elem191)
+          (_etype205, _size202) = iprot.readListBegin()
+          for _i206 in xrange(_size202):
+            _elem207 = apache.airavata.model.workspace.experiment.ttypes.DataTransferDetails()
+            _elem207.read(iprot)
+            self.success.append(_elem207)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -19053,8 +19388,8 @@ class getDataTransferDetails_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter192 in self.success:
-        iter192.write(oprot)
+      for iter208 in self.success:
+        iter208.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -20053,11 +20388,11 @@ class getAllAppModules_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype196, _size193) = iprot.readListBegin()
-          for _i197 in xrange(_size193):
-            _elem198 = apache.airavata.model.appcatalog.appdeployment.ttypes.ApplicationModule()
-            _elem198.read(iprot)
-            self.success.append(_elem198)
+          (_etype212, _size209) = iprot.readListBegin()
+          for _i213 in xrange(_size209):
+            _elem214 = apache.airavata.model.appcatalog.appdeployment.ttypes.ApplicationModule()
+            _elem214.read(iprot)
+            self.success.append(_elem214)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -20092,8 +20427,8 @@ class getAllAppModules_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter199 in self.success:
-        iter199.write(oprot)
+      for iter215 in self.success:
+        iter215.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -21053,11 +21388,11 @@ class getAllApplicationDeployments_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype203, _size200) = iprot.readListBegin()
-          for _i204 in xrange(_size200):
-            _elem205 = apache.airavata.model.appcatalog.appdeployment.ttypes.ApplicationDeploymentDescription()
-            _elem205.read(iprot)
-            self.success.append(_elem205)
+          (_etype219, _size216) = iprot.readListBegin()
+          for _i220 in xrange(_size216):
+            _elem221 = apache.airavata.model.appcatalog.appdeployment.ttypes.ApplicationDeploymentDescription()
+            _elem221.read(iprot)
+            self.success.append(_elem221)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -21092,8 +21427,8 @@ class getAllApplicationDeployments_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter206 in self.success:
-        iter206.write(oprot)
+      for iter222 in self.success:
+        iter222.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -21222,10 +21557,10 @@ class getAppModuleDeployedResources_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype210, _size207) = iprot.readListBegin()
-          for _i211 in xrange(_size207):
-            _elem212 = iprot.readString();
-            self.success.append(_elem212)
+          (_etype226, _size223) = iprot.readListBegin()
+          for _i227 in xrange(_size223):
+            _elem228 = iprot.readString();
+            self.success.append(_elem228)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -21260,8 +21595,8 @@ class getAppModuleDeployedResources_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter213 in self.success:
-        oprot.writeString(iter213)
+      for iter229 in self.success:
+        oprot.writeString(iter229)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -22061,11 +22396,11 @@ class getAllApplicationInterfaceNames_result:
       if fid == 0:
         if ftype == TType.MAP:
           self.success = {}
-          (_ktype215, _vtype216, _size214 ) = iprot.readMapBegin()
-          for _i218 in xrange(_size214):
-            _key219 = iprot.readString();
-            _val220 = iprot.readString();
-            self.success[_key219] = _val220
+          (_ktype231, _vtype232, _size230 ) = iprot.readMapBegin()
+          for _i234 in xrange(_size230):
+            _key235 = iprot.readString();
+            _val236 = iprot.readString();
+            self.success[_key235] = _val236
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -22100,9 +22435,9 @@ class getAllApplicationInterfaceNames_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.MAP, 0)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
-      for kiter221,viter222 in self.success.items():
-        oprot.writeString(kiter221)
-        oprot.writeString(viter222)
+      for kiter237,viter238 in self.success.items():
+        oprot.writeString(kiter237)
+        oprot.writeString(viter238)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -22231,11 +22566,11 @@ class getAllApplicationInterfaces_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype226, _size223) = iprot.readListBegin()
-          for _i227 in xrange(_size223):
-            _elem228 = apache.airavata.model.appcatalog.appinterface.ttypes.ApplicationInterfaceDescription()
-            _elem228.read(iprot)
-            self.success.append(_elem228)
+          (_etype242, _size239) = iprot.readListBegin()
+          for _i243 in xrange(_size239):
+            _elem244 = apache.airavata.model.appcatalog.appinterface.ttypes.ApplicationInterfaceDescription()
+            _elem244.read(iprot)
+            self.success.append(_elem244)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -22270,8 +22605,8 @@ class getAllApplicationInterfaces_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter229 in self.success:
-        iter229.write(oprot)
+      for iter245 in self.success:
+        iter245.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -22400,11 +22735,11 @@ class getApplicationInputs_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype233, _size230) = iprot.readListBegin()
-          for _i234 in xrange(_size230):
-            _elem235 = apache.airavata.model.appcatalog.appinterface.ttypes.InputDataObjectType()
-            _elem235.read(iprot)
-            self.success.append(_elem235)
+          (_etype249, _size246) = iprot.readListBegin()
+          for _i250 in xrange(_size246):
+            _elem251 = apache.airavata.model.appcatalog.appinterface.ttypes.InputDataObjectType()
+            _elem251.read(iprot)
+            self.success.append(_elem251)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -22439,8 +22774,8 @@ class getApplicationInputs_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter236 in self.success:
-        iter236.write(oprot)
+      for iter252 in self.success:
+        iter252.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -22569,11 +22904,11 @@ class getApplicationOutputs_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype240, _size237) = iprot.readListBegin()
-          for _i241 in xrange(_size237):
-            _elem242 = apache.airavata.model.appcatalog.appinterface.ttypes.OutputDataObjectType()
-            _elem242.read(iprot)
-            self.success.append(_elem242)
+          (_etype256, _size253) = iprot.readListBegin()
+          for _i257 in xrange(_size253):
+            _elem258 = apache.airavata.model.appcatalog.appinterface.ttypes.OutputDataObjectType()
+            _elem258.read(iprot)
+            self.success.append(_elem258)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -22608,8 +22943,8 @@ class getApplicationOutputs_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter243 in self.success:
-        iter243.write(oprot)
+      for iter259 in self.success:
+        iter259.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -22738,11 +23073,11 @@ class getAvailableAppInterfaceComputeResources_result:
       if fid == 0:
         if ftype == TType.MAP:
           self.success = {}
-          (_ktype245, _vtype246, _size244 ) = iprot.readMapBegin()
-          for _i248 in xrange(_size244):
-            _key249 = iprot.readString();
-            _val250 = iprot.readString();
-            self.success[_key249] = _val250
+          (_ktype261, _vtype262, _size260 ) = iprot.readMapBegin()
+          for _i264 in xrange(_size260):
+            _key265 = iprot.readString();
+            _val266 = iprot.readString();
+            self.success[_key265] = _val266
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -22777,9 +23112,9 @@ class getAvailableAppInterfaceComputeResources_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.MAP, 0)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
-      for kiter251,viter252 in self.success.items():
-        oprot.writeString(kiter251)
-        oprot.writeString(viter252)
+      for kiter267,viter268 in self.success.items():
+        oprot.writeString(kiter267)
+        oprot.writeString(viter268)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -23210,11 +23545,11 @@ class getAllComputeResourceNames_result:
       if fid == 0:
         if ftype == TType.MAP:
           self.success = {}
-          (_ktype254, _vtype255, _size253 ) = iprot.readMapBegin()
-          for _i257 in xrange(_size253):
-            _key258 = iprot.readString();
-            _val259 = iprot.readString();
-            self.success[_key258] = _val259
+          (_ktype270, _vtype271, _size269 ) = iprot.readMapBegin()
+          for _i273 in xrange(_size269):
+            _key274 = iprot.readString();
+            _val275 = iprot.readString();
+            self.success[_key274] = _val275
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -23249,9 +23584,9 @@ class getAllComputeResourceNames_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.MAP, 0)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
-      for kiter260,viter261 in self.success.items():
-        oprot.writeString(kiter260)
-        oprot.writeString(viter261)
+      for kiter276,viter277 in self.success.items():
+        oprot.writeString(kiter276)
+        oprot.writeString(viter277)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -28193,11 +28528,11 @@ class changeJobSubmissionPriorities_args:
       if fid == 1:
         if ftype == TType.MAP:
           self.jobSubmissionPriorityMap = {}
-          (_ktype263, _vtype264, _size262 ) = iprot.readMapBegin()
-          for _i266 in xrange(_size262):
-            _key267 = iprot.readString();
-            _val268 = iprot.readI32();
-            self.jobSubmissionPriorityMap[_key267] = _val268
+          (_ktype279, _vtype280, _size278 ) = iprot.readMapBegin()
+          for _i282 in xrange(_size278):
+            _key283 = iprot.readString();
+            _val284 = iprot.readI32();
+            self.jobSubmissionPriorityMap[_key283] = _val284
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -28214,9 +28549,9 @@ class changeJobSubmissionPriorities_args:
     if self.jobSubmissionPriorityMap is not None:
       oprot.writeFieldBegin('jobSubmissionPriorityMap', TType.MAP, 1)
       oprot.writeMapBegin(TType.STRING, TType.I32, len(self.jobSubmissionPriorityMap))
-      for kiter269,viter270 in self.jobSubmissionPriorityMap.items():
-        oprot.writeString(kiter269)
-        oprot.writeI32(viter270)
+      for kiter285,viter286 in self.jobSubmissionPriorityMap.items():
+        oprot.writeString(kiter285)
+        oprot.writeI32(viter286)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -28363,11 +28698,11 @@ class changeDataMovementPriorities_args:
       if fid == 1:
         if ftype == TType.MAP:
           self.dataMovementPriorityMap = {}
-          (_ktype272, _vtype273, _size271 ) = iprot.readMapBegin()
-          for _i275 in xrange(_size271):
-            _key276 = iprot.readString();
-            _val277 = iprot.readI32();
-            self.dataMovementPriorityMap[_key276] = _val277
+          (_ktype288, _vtype289, _size287 ) = iprot.readMapBegin()
+          for _i291 in xrange(_size287):
+            _key292 = iprot.readString();
+            _val293 = iprot.readI32();
+            self.dataMovementPriorityMap[_key292] = _val293
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -28384,9 +28719,9 @@ class changeDataMovementPriorities_args:
     if self.dataMovementPriorityMap is not None:
       oprot.writeFieldBegin('dataMovementPriorityMap', TType.MAP, 1)
       oprot.writeMapBegin(TType.STRING, TType.I32, len(self.dataMovementPriorityMap))
-      for kiter278,viter279 in self.dataMovementPriorityMap.items():
-        oprot.writeString(kiter278)
-        oprot.writeI32(viter279)
+      for kiter294,viter295 in self.dataMovementPriorityMap.items():
+        oprot.writeString(kiter294)
+        oprot.writeI32(viter295)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -30803,11 +31138,11 @@ class getAllGatewayComputeResourcePreferences_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype283, _size280) = iprot.readListBegin()
-          for _i284 in xrange(_size280):
-            _elem285 = apache.airavata.model.appcatalog.gatewayprofile.ttypes.ComputeResourcePreference()
-            _elem285.read(iprot)
-            self.success.append(_elem285)
+          (_etype299, _size296) = iprot.readListBegin()
+          for _i300 in xrange(_size296):
+            _elem301 = apache.airavata.model.appcatalog.gatewayprofile.ttypes.ComputeResourcePreference()
+            _elem301.read(iprot)
+            self.success.append(_elem301)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -30842,8 +31177,8 @@ class getAllGatewayComputeResourcePreferences_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter286 in self.success:
-        iter286.write(oprot)
+      for iter302 in self.success:
+        iter302.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -30952,11 +31287,11 @@ class getAllGatewayComputeResources_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype290, _size287) = iprot.readListBegin()
-          for _i291 in xrange(_size287):
-            _elem292 = apache.airavata.model.appcatalog.gatewayprofile.ttypes.GatewayResourceProfile()
-            _elem292.read(iprot)
-            self.success.append(_elem292)
+          (_etype306, _size303) = iprot.readListBegin()
+          for _i307 in xrange(_size303):
+            _elem308 = apache.airavata.model.appcatalog.gatewayprofile.ttypes.GatewayResourceProfile()
+            _elem308.read(iprot)
+            self.success.append(_elem308)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -30991,8 +31326,8 @@ class getAllGatewayComputeResources_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter293 in self.success:
-        iter293.write(oprot)
+      for iter309 in self.success:
+        iter309.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:
@@ -31484,10 +31819,10 @@ class getAllWorkflows_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype297, _size294) = iprot.readListBegin()
-          for _i298 in xrange(_size294):
-            _elem299 = iprot.readString();
-            self.success.append(_elem299)
+          (_etype313, _size310) = iprot.readListBegin()
+          for _i314 in xrange(_size310):
+            _elem315 = iprot.readString();
+            self.success.append(_elem315)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -31522,8 +31857,8 @@ class getAllWorkflows_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter300 in self.success:
-        oprot.writeString(iter300)
+      for iter316 in self.success:
+        oprot.writeString(iter316)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ire is not None:

http://git-wip-us.apache.org/repos/asf/airavata/blob/7e67ca09/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
index 7f027f5..97506b6 100644
--- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
@@ -501,6 +501,28 @@ service Airavata {
                         2: airavataErrors.AiravataClientException ace,
                         3: airavataErrors.AiravataSystemException ase)
 
+  /**
+   * Search Experiments by using multiple filter criteria with pagination. Results will be
sorted
+   * based on creation time DESC
+   *
+   * @param gatewayId
+   *       Identifier of the requested gateway
+   * @param userName
+   *       Username of the requested user
+   * @param filters
+   *       map of multiple filter criteria. keys has to be camel case field values eg. experimentName
+   * @param limit
+   *       Amount of results to be fetched
+   * @param offset
+   *       The starting point of the results to be fetched
+   */
+    list<experimentModel.ExperimentSummary> searchExperiments(1: required string gatewayId,
+                            2: required string userName, 3: map<string, string> filters,
+                            4: required i32 limit, 5: required i32 offset)
+                throws (1: airavataErrors.InvalidRequestException ire,
+                        2: airavataErrors.AiravataClientException ace,
+                        3: airavataErrors.AiravataSystemException ase)
+
    /**
     * Get all Experiments within a Project
     *


Mime
View raw message