Repository: airavata-php-gateway
Updated Branches:
  refs/heads/master 0ca3714c2 -> e97273be9


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/e97273be/app/libraries/Airavata/Model/Workspace/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/Workspace/Types.php 
b/app/libraries/Airavata/Model/Workspace/Types.php
index 458f6ea..4523e3d 100644
--- a/app/libraries/Airavata/Model/Workspace/Types.php
+++ b/app/libraries/Airavata/Model/Workspace/Types.php
@@ -121,7 +121,7 @@ class Project {
   /**
    * @var string
    */
-  public $projectID = null;
+  public $projectID = "DO_NOT_SET_AT_CLIENTS";
   /**
    * @var string
    */

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/e97273be/app/libraries/Airavata/Model/job/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/job/Types.php 
b/app/libraries/Airavata/Model/job/Types.php
new file mode 100644
index 0000000..8869cdb
--- /dev/null
+++ b/app/libraries/Airavata/Model/job/Types.php
@@ -0,0 +1,261 @@
+<?php
+namespace Airavata\Model\job;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.2)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+class JobModel {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $jobId = null;
+  /**
+   * @var string
+   */
+  public $taskId = null;
+  /**
+   * @var string
+   */
+  public $jobDescription = null;
+  /**
+   * @var int
+   */
+  public $creationTime = null;
+  /**
+   * @var \Airavata\Model\Status\JobStatus
+   */
+  public $jobStatus = null;
+  /**
+   * @var string
+   */
+  public $computeResourceConsumed = null;
+  /**
+   * @var string
+   */
+  public $jobName = null;
+  /**
+   * @var string
+   */
+  public $workingDir = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'jobId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'taskId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'jobDescription',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'creationTime',
+          'type' => TType::I64,
+          ),
+        5 => array(
+          'var' => 'jobStatus',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Status\JobStatus',
+          ),
+        6 => array(
+          'var' => 'computeResourceConsumed',
+          'type' => TType::STRING,
+          ),
+        7 => array(
+          'var' => 'jobName',
+          'type' => TType::STRING,
+          ),
+        8 => array(
+          'var' => 'workingDir',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['jobId'])) {
+        $this->jobId = $vals['jobId'];
+      }
+      if (isset($vals['taskId'])) {
+        $this->taskId = $vals['taskId'];
+      }
+      if (isset($vals['jobDescription'])) {
+        $this->jobDescription = $vals['jobDescription'];
+      }
+      if (isset($vals['creationTime'])) {
+        $this->creationTime = $vals['creationTime'];
+      }
+      if (isset($vals['jobStatus'])) {
+        $this->jobStatus = $vals['jobStatus'];
+      }
+      if (isset($vals['computeResourceConsumed'])) {
+        $this->computeResourceConsumed = $vals['computeResourceConsumed'];
+      }
+      if (isset($vals['jobName'])) {
+        $this->jobName = $vals['jobName'];
+      }
+      if (isset($vals['workingDir'])) {
+        $this->workingDir = $vals['workingDir'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'JobModel';
+  }
+
+  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->jobId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->taskId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->jobDescription);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->creationTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRUCT) {
+            $this->jobStatus = new \Airavata\Model\Status\JobStatus();
+            $xfer += $this->jobStatus->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->computeResourceConsumed);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->jobName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->workingDir);
+          } 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('JobModel');
+    if ($this->jobId !== null) {
+      $xfer += $output->writeFieldBegin('jobId', TType::STRING, 1);
+      $xfer += $output->writeString($this->jobId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->taskId !== null) {
+      $xfer += $output->writeFieldBegin('taskId', TType::STRING, 2);
+      $xfer += $output->writeString($this->taskId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->jobDescription !== null) {
+      $xfer += $output->writeFieldBegin('jobDescription', TType::STRING, 3);
+      $xfer += $output->writeString($this->jobDescription);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->creationTime !== null) {
+      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 4);
+      $xfer += $output->writeI64($this->creationTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->jobStatus !== null) {
+      if (!is_object($this->jobStatus)) {
+        throw new TProtocolException('Bad type in structure.', 
TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('jobStatus', TType::STRUCT, 5);
+      $xfer += $this->jobStatus->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->computeResourceConsumed !== null) {
+      $xfer += $output->writeFieldBegin('computeResourceConsumed', 
TType::STRING, 6);
+      $xfer += $output->writeString($this->computeResourceConsumed);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->jobName !== null) {
+      $xfer += $output->writeFieldBegin('jobName', TType::STRING, 7);
+      $xfer += $output->writeString($this->jobName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->workingDir !== null) {
+      $xfer += $output->writeFieldBegin('workingDir', TType::STRING, 8);
+      $xfer += $output->writeString($this->workingDir);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/e97273be/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php 
b/app/libraries/ExperimentUtilities.php
index ea3def9..003bc20 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -5,14 +5,13 @@ use Airavata\API\Error\AiravataSystemException;
 use Airavata\API\Error\ExperimentNotFoundException;
 use Airavata\API\Error\InvalidRequestException;
 use Airavata\Facades\Airavata;
-use Airavata\Model\AppCatalog\AppInterface\DataType;
-use Airavata\Model\AppCatalog\AppInterface\InputDataObjectType;
-use Airavata\Model\Workspace\Experiment\AdvancedOutputDataHandling;
-use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
-use Airavata\Model\Workspace\Experiment\Experiment;
-use Airavata\Model\Workspace\Experiment\ExperimentState;
-use Airavata\Model\Workspace\Experiment\JobState;
-use Airavata\Model\Workspace\Experiment\UserConfigurationData;
+use Airavata\Model\Application\Io\DataType;
+use Airavata\Model\Application\Io\InputDataObjectType;
+use Airavata\Model\Scheduling\ComputationalResourceSchedulingModel;
+use Airavata\Model\Experiment\ExperimentModel;
+use Airavata\Model\Status\ExperimentState;
+use Airavata\Model\Status\JobState;
+use Airavata\Model\Experiment\UserConfigurationDataModel;
 
 class ExperimentUtilities
 {
@@ -139,7 +138,7 @@ class ExperimentUtilities
     {
         $experimentInputs = array();
 
-        $scheduling = new ComputationalResourceScheduling();
+        $scheduling = new ComputationalResourceSchedulingModel();
         $scheduling->totalCPUCount = $_POST['cpu-count'];
         $scheduling->nodeCount = $_POST['node-count'];
         $scheduling->queueName = $_POST['queue-name'];
@@ -147,7 +146,7 @@ class ExperimentUtilities
         $scheduling->totalPhysicalMemory = $_POST['total-physical-memory'];
         $scheduling->resourceHostId = $_POST['compute-resource'];
 
-        $userConfigData = new UserConfigurationData();
+        $userConfigData = new UserConfigurationDataModel();
         $userConfigData->computationalResourceScheduling = $scheduling;
         if (isset($_POST["userDN"])) {
             $userConfigData->generateCert = 1;
@@ -719,28 +718,28 @@ class ExperimentUtilities
             $filters = array();
             if(!empty($inputs["status-type"])){
                 if ($inputs["status-type"] != "ALL") {
-                    
$filters[\Airavata\Model\Workspace\Experiment\ExperimentSearchFields::STATUS] = 
$inputs["status-type"];
+                    
$filters[\Airavata\Model\Experiment\ExperimentSearchFields::STATUS] = 
$inputs["status-type"];
                 }
             }
             if(!empty($inputs["search-key"])){
                 switch ($inputs["search-key"]) {
                     case 'experiment-name':
-                        
$filters[\Airavata\Model\Workspace\Experiment\ExperimentSearchFields::EXPERIMENT_NAME]
 = $inputs["search-value"];
+                        
$filters[\Airavata\Model\Experiment\ExperimentSearchFields::EXPERIMENT_NAME] = 
$inputs["search-value"];
                         break;
                     case 'experiment-description':
-                        
$filters[\Airavata\Model\Workspace\Experiment\ExperimentSearchFields::EXPERIMENT_DESC]
 = $inputs["search-value"];
+                        
$filters[\Airavata\Model\Experiment\ExperimentSearchFields::EXPERIMENT_DESC] = 
$inputs["search-value"];
                         break;
                     case 'application':
-                        
$filters[\Airavata\Model\Workspace\Experiment\ExperimentSearchFields::APPLICATION_ID]
 = $inputs["search-value"];
+                        
$filters[\Airavata\Model\Experiment\ExperimentSearchFields::APPLICATION_ID] = 
$inputs["search-value"];
                         break;
                     case 'creation-time':
-                        
$filters[\Airavata\Model\Workspace\Experiment\ExperimentSearchFields::FROM_DATE]
 = strtotime($inputs["from-date"]) * 1000;
-                        
$filters[\Airavata\Model\Workspace\Experiment\ExperimentSearchFields::TO_DATE] 
= strtotime($inputs["to-date"]) * 1000;
+                        
$filters[\Airavata\Model\Experiment\ExperimentSearchFields::FROM_DATE] = 
strtotime($inputs["from-date"]) * 1000;
+                        
$filters[\Airavata\Model\Experiment\ExperimentSearchFields::TO_DATE] = 
strtotime($inputs["to-date"]) * 1000;
                         break;
                     case '':
                 }
             }else{
-                
$filters[\Airavata\Model\Workspace\Experiment\ExperimentSearchFields::EXPERIMENT_NAME]
 = "*";
+                
$filters[\Airavata\Model\Experiment\ExperimentSearchFields::EXPERIMENT_NAME] = 
"*";
             }
 
             $experiments = Airavata::searchExperiments(

Reply via email to