updated library

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

Branch: refs/heads/master
Commit: d8bd3d1a74e55a052530e63f377628807cece880
Parents: 277b467
Author: raminder <[email protected]>
Authored: Wed May 28 14:29:32 2014 -0400
Committer: raminder <[email protected]>
Committed: Wed May 28 14:29:32 2014 -0400

----------------------------------------------------------------------
 lib/Airavata/API/Airavata.php                   | 408 +++++++++++++++++--
 .../Model/Workspace/Experiment/Types.php        |  28 +-
 2 files changed, 388 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/d8bd3d1a/lib/Airavata/API/Airavata.php
----------------------------------------------------------------------
diff --git a/lib/Airavata/API/Airavata.php b/lib/Airavata/API/Airavata.php
index 0dbe0b8..ead58ec 100644
--- a/lib/Airavata/API/Airavata.php
+++ b/lib/Airavata/API/Airavata.php
@@ -26,6 +26,7 @@ interface AiravataIf {
   public function searchProjectsByProjectDesc($userName, $description);
   public function searchExperimentsByName($userName, $expName);
   public function searchExperimentsByDesc($userName, $description);
+  public function searchExperimentsByApplication($userName, $applicationId);
   public function getAllExperimentsInProject($projectId);
   public function getAllUserExperiments($userName);
   public function 
createExperiment(\Airavata\Model\Workspace\Experiment\Experiment $experiment);
@@ -594,6 +595,67 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("searchExperimentsByDesc failed: unknown result");
   }
 
+  public function searchExperimentsByApplication($userName, $applicationId)
+  {
+    $this->send_searchExperimentsByApplication($userName, $applicationId);
+    return $this->recv_searchExperimentsByApplication();
+  }
+
+  public function send_searchExperimentsByApplication($userName, 
$applicationId)
+  {
+    $args = new \Airavata\API\Airavata_searchExperimentsByApplication_args();
+    $args->userName = $userName;
+    $args->applicationId = $applicationId;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && 
function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 
'searchExperimentsByApplication', TMessageType::CALL, $args, $this->seqid_, 
$this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('searchExperimentsByApplication', 
TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_searchExperimentsByApplication()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && 
function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 
'\Airavata\API\Airavata_searchExperimentsByApplication_result', 
$this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new 
\Airavata\API\Airavata_searchExperimentsByApplication_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("searchExperimentsByApplication failed: unknown 
result");
+  }
+
   public function getAllExperimentsInProject($projectId)
   {
     $this->send_getAllExperimentsInProject($projectId);
@@ -3519,6 +3581,264 @@ class Airavata_searchExperimentsByDesc_result {
 
 }
 
+class Airavata_searchExperimentsByApplication_args {
+  static $_TSPEC;
+
+  public $userName = null;
+  public $applicationId = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'userName',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'applicationId',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['userName'])) {
+        $this->userName = $vals['userName'];
+      }
+      if (isset($vals['applicationId'])) {
+        $this->applicationId = $vals['applicationId'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_searchExperimentsByApplication_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->userName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->applicationId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += 
$output->writeStructBegin('Airavata_searchExperimentsByApplication_args');
+    if ($this->userName !== null) {
+      $xfer += $output->writeFieldBegin('userName', TType::STRING, 1);
+      $xfer += $output->writeString($this->userName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->applicationId !== null) {
+      $xfer += $output->writeFieldBegin('applicationId', TType::STRING, 2);
+      $xfer += $output->writeString($this->applicationId);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_searchExperimentsByApplication_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $ire = null;
+  public $ace = null;
+  public $ase = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => 
'\Airavata\Model\Workspace\Experiment\ExperimentSummary',
+            ),
+          ),
+        1 => array(
+          'var' => 'ire',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\InvalidRequestException',
+          ),
+        2 => array(
+          'var' => 'ace',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataClientException',
+          ),
+        3 => array(
+          'var' => 'ase',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AiravataSystemException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_searchExperimentsByApplication_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::LST) {
+            $this->success = array();
+            $_size35 = 0;
+            $_etype38 = 0;
+            $xfer += $input->readListBegin($_etype38, $_size35);
+            for ($_i39 = 0; $_i39 < $_size35; ++$_i39)
+            {
+              $elem40 = null;
+              $elem40 = new 
\Airavata\Model\Workspace\Experiment\ExperimentSummary();
+              $xfer += $elem40->read($input);
+              $this->success []= $elem40;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->ire = new \Airavata\API\Error\InvalidRequestException();
+            $xfer += $this->ire->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->ace = new \Airavata\API\Error\AiravataClientException();
+            $xfer += $this->ace->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->ase = new \Airavata\API\Error\AiravataSystemException();
+            $xfer += $this->ase->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += 
$output->writeStructBegin('Airavata_searchExperimentsByApplication_result');
+    if ($this->success !== null) {
+      if (!is_array($this->success)) {
+        throw new TProtocolException('Bad type in structure.', 
TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->success));
+        {
+          foreach ($this->success as $iter41)
+          {
+            $xfer += $iter41->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ire !== null) {
+      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
+      $xfer += $this->ire->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ace !== null) {
+      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
+      $xfer += $this->ace->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ase !== null) {
+      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
+      $xfer += $this->ase->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
 class Airavata_getAllExperimentsInProject_args {
   static $_TSPEC;
 
@@ -3666,15 +3986,15 @@ class Airavata_getAllExperimentsInProject_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size35 = 0;
-            $_etype38 = 0;
-            $xfer += $input->readListBegin($_etype38, $_size35);
-            for ($_i39 = 0; $_i39 < $_size35; ++$_i39)
+            $_size42 = 0;
+            $_etype45 = 0;
+            $xfer += $input->readListBegin($_etype45, $_size42);
+            for ($_i46 = 0; $_i46 < $_size42; ++$_i46)
             {
-              $elem40 = null;
-              $elem40 = new \Airavata\Model\Workspace\Experiment\Experiment();
-              $xfer += $elem40->read($input);
-              $this->success []= $elem40;
+              $elem47 = null;
+              $elem47 = new \Airavata\Model\Workspace\Experiment\Experiment();
+              $xfer += $elem47->read($input);
+              $this->success []= $elem47;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -3726,9 +4046,9 @@ class Airavata_getAllExperimentsInProject_result {
       {
         $output->writeListBegin(TType::STRUCT, count($this->success));
         {
-          foreach ($this->success as $iter41)
+          foreach ($this->success as $iter48)
           {
-            $xfer += $iter41->write($output);
+            $xfer += $iter48->write($output);
           }
         }
         $output->writeListEnd();
@@ -3904,15 +4224,15 @@ class Airavata_getAllUserExperiments_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size42 = 0;
-            $_etype45 = 0;
-            $xfer += $input->readListBegin($_etype45, $_size42);
-            for ($_i46 = 0; $_i46 < $_size42; ++$_i46)
+            $_size49 = 0;
+            $_etype52 = 0;
+            $xfer += $input->readListBegin($_etype52, $_size49);
+            for ($_i53 = 0; $_i53 < $_size49; ++$_i53)
             {
-              $elem47 = null;
-              $elem47 = new \Airavata\Model\Workspace\Experiment\Experiment();
-              $xfer += $elem47->read($input);
-              $this->success []= $elem47;
+              $elem54 = null;
+              $elem54 = new \Airavata\Model\Workspace\Experiment\Experiment();
+              $xfer += $elem54->read($input);
+              $this->success []= $elem54;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -3964,9 +4284,9 @@ class Airavata_getAllUserExperiments_result {
       {
         $output->writeListBegin(TType::STRUCT, count($this->success));
         {
-          foreach ($this->success as $iter48)
+          foreach ($this->success as $iter55)
           {
-            $xfer += $iter48->write($output);
+            $xfer += $iter55->write($output);
           }
         }
         $output->writeListEnd();
@@ -5821,15 +6141,15 @@ class Airavata_getExperimentOutputs_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size49 = 0;
-            $_etype52 = 0;
-            $xfer += $input->readListBegin($_etype52, $_size49);
-            for ($_i53 = 0; $_i53 < $_size49; ++$_i53)
+            $_size56 = 0;
+            $_etype59 = 0;
+            $xfer += $input->readListBegin($_etype59, $_size56);
+            for ($_i60 = 0; $_i60 < $_size56; ++$_i60)
             {
-              $elem54 = null;
-              $elem54 = new 
\Airavata\Model\Workspace\Experiment\DataObjectType();
-              $xfer += $elem54->read($input);
-              $this->success []= $elem54;
+              $elem61 = null;
+              $elem61 = new 
\Airavata\Model\Workspace\Experiment\DataObjectType();
+              $xfer += $elem61->read($input);
+              $this->success []= $elem61;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -5857,9 +6177,9 @@ class Airavata_getExperimentOutputs_result {
       {
         $output->writeListBegin(TType::STRUCT, count($this->success));
         {
-          foreach ($this->success as $iter55)
+          foreach ($this->success as $iter62)
           {
-            $xfer += $iter55->write($output);
+            $xfer += $iter62->write($output);
           }
         }
         $output->writeListEnd();
@@ -5997,18 +6317,18 @@ class Airavata_getJobStatuses_result {
         case 0:
           if ($ftype == TType::MAP) {
             $this->success = array();
-            $_size56 = 0;
-            $_ktype57 = 0;
-            $_vtype58 = 0;
-            $xfer += $input->readMapBegin($_ktype57, $_vtype58, $_size56);
-            for ($_i60 = 0; $_i60 < $_size56; ++$_i60)
+            $_size63 = 0;
+            $_ktype64 = 0;
+            $_vtype65 = 0;
+            $xfer += $input->readMapBegin($_ktype64, $_vtype65, $_size63);
+            for ($_i67 = 0; $_i67 < $_size63; ++$_i67)
             {
-              $key61 = '';
-              $val62 = new \Airavata\Model\Workspace\Experiment\JobStatus();
-              $xfer += $input->readString($key61);
-              $val62 = new \Airavata\Model\Workspace\Experiment\JobStatus();
-              $xfer += $val62->read($input);
-              $this->success[$key61] = $val62;
+              $key68 = '';
+              $val69 = new \Airavata\Model\Workspace\Experiment\JobStatus();
+              $xfer += $input->readString($key68);
+              $val69 = new \Airavata\Model\Workspace\Experiment\JobStatus();
+              $xfer += $val69->read($input);
+              $this->success[$key68] = $val69;
             }
             $xfer += $input->readMapEnd();
           } else {
@@ -6036,10 +6356,10 @@ class Airavata_getJobStatuses_result {
       {
         $output->writeMapBegin(TType::STRING, TType::STRUCT, 
count($this->success));
         {
-          foreach ($this->success as $kiter63 => $viter64)
+          foreach ($this->success as $kiter70 => $viter71)
           {
-            $xfer += $output->writeString($kiter63);
-            $xfer += $viter64->write($output);
+            $xfer += $output->writeString($kiter70);
+            $xfer += $viter71->write($output);
           }
         }
         $output->writeMapEnd();

http://git-wip-us.apache.org/repos/asf/airavata/blob/d8bd3d1a/lib/Airavata/Model/Workspace/Experiment/Types.php
----------------------------------------------------------------------
diff --git a/lib/Airavata/Model/Workspace/Experiment/Types.php 
b/lib/Airavata/Model/Workspace/Experiment/Types.php
index 267939c..8554e04 100644
--- a/lib/Airavata/Model/Workspace/Experiment/Types.php
+++ b/lib/Airavata/Model/Workspace/Experiment/Types.php
@@ -3907,6 +3907,7 @@ class ExperimentSummary {
   public $userName = null;
   public $name = null;
   public $description = null;
+  public $applicationId = null;
   public $experimentStatus = null;
   public $errors = null;
 
@@ -3938,11 +3939,15 @@ class ExperimentSummary {
           'type' => TType::STRING,
           ),
         7 => array(
+          'var' => 'applicationId',
+          'type' => TType::STRING,
+          ),
+        8 => array(
           'var' => 'experimentStatus',
           'type' => TType::STRUCT,
           'class' => '\Airavata\Model\Workspace\Experiment\ExperimentStatus',
           ),
-        8 => array(
+        9 => array(
           'var' => 'errors',
           'type' => TType::LST,
           'etype' => TType::STRUCT,
@@ -3972,6 +3977,9 @@ class ExperimentSummary {
       if (isset($vals['description'])) {
         $this->description = $vals['description'];
       }
+      if (isset($vals['applicationId'])) {
+        $this->applicationId = $vals['applicationId'];
+      }
       if (isset($vals['experimentStatus'])) {
         $this->experimentStatus = $vals['experimentStatus'];
       }
@@ -4043,6 +4051,13 @@ class ExperimentSummary {
           }
           break;
         case 7:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->applicationId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
           if ($ftype == TType::STRUCT) {
             $this->experimentStatus = new 
\Airavata\Model\Workspace\Experiment\ExperimentStatus();
             $xfer += $this->experimentStatus->read($input);
@@ -4050,7 +4065,7 @@ class ExperimentSummary {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 8:
+        case 9:
           if ($ftype == TType::LST) {
             $this->errors = array();
             $_size119 = 0;
@@ -4111,11 +4126,16 @@ class ExperimentSummary {
       $xfer += $output->writeString($this->description);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->applicationId !== null) {
+      $xfer += $output->writeFieldBegin('applicationId', TType::STRING, 7);
+      $xfer += $output->writeString($this->applicationId);
+      $xfer += $output->writeFieldEnd();
+    }
     if ($this->experimentStatus !== null) {
       if (!is_object($this->experimentStatus)) {
         throw new TProtocolException('Bad type in structure.', 
TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('experimentStatus', TType::STRUCT, 7);
+      $xfer += $output->writeFieldBegin('experimentStatus', TType::STRUCT, 8);
       $xfer += $this->experimentStatus->write($output);
       $xfer += $output->writeFieldEnd();
     }
@@ -4123,7 +4143,7 @@ class ExperimentSummary {
       if (!is_array($this->errors)) {
         throw new TProtocolException('Bad type in structure.', 
TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('errors', TType::LST, 8);
+      $xfer += $output->writeFieldBegin('errors', TType::LST, 9);
       {
         $output->writeListBegin(TType::STRUCT, count($this->errors));
         {

Reply via email to