You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2016/04/28 19:44:40 UTC

[1/6] airavata-php-gateway git commit: Notification Icon UI

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/master ad2035277 -> 2fb0e4c29


Notification Icon UI


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

Branch: refs/heads/master
Commit: a14cd91ae4caac5dff18a7dd9cbd725a6c0635cd
Parents: ad20352
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Tue Apr 26 11:13:19 2016 -0400
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Tue Apr 26 11:13:19 2016 -0400

----------------------------------------------------------------------
 app/libraries/CommonUtilities.php |  4 ++++
 public/css/bootstrap.min.css      | 15 +++++++++++++++
 2 files changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a14cd91a/app/libraries/CommonUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CommonUtilities.php b/app/libraries/CommonUtilities.php
index 92a8d31..bfb1e5c 100644
--- a/app/libraries/CommonUtilities.php
+++ b/app/libraries/CommonUtilities.php
@@ -212,6 +212,10 @@ class CommonUtilities
                 if ("user-console" == Session::get("nav-active"))
                     $active = " active ";
             }
+            echo '<li style="color:#fff; relative">' .
+                    '<span class="glyphicon glyphicon-bell notif-bell"></span>' .
+                    '<span class="notif-num" style="">2</span>' .
+                '</li>';
             if (Session::has("admin") || Session::has("admin-read-only"))
                 echo '<li class="' . $active . '"><a href="' . URL::to("/") . '/admin/dashboard"><span class="glyphicon glyphicon-user"></span>Admin Dashboard</a></li>';
 //            else

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a14cd91a/public/css/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/public/css/bootstrap.min.css b/public/css/bootstrap.min.css
index 55f50ef..715c62e 100644
--- a/public/css/bootstrap.min.css
+++ b/public/css/bootstrap.min.css
@@ -62,4 +62,19 @@ body{
 
 .tab-content>.tab-pane {
     margin-top: 20px;
+ }
+
+ .notif-bell{
+ 	margin:15px; 
+ 	font-size:1.5em;
+ }
+
+ .notif-num{
+ 	background: red; 
+ 	border-radius: 20px; 
+ 	padding: 7px; 
+ 	position: absolute; 
+ 	top: 0px; 
+ 	left: 50%; 
+ 	font-size: 0.6em;
  }
\ No newline at end of file


[4/6] airavata-php-gateway git commit: updating thrift generated files

Posted by sm...@apache.org.
updating thrift generated files


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

Branch: refs/heads/master
Commit: 8b67709f320884d8d7d9cc7315c04247637c7a37
Parents: ad20352
Author: scnakandala <su...@gmail.com>
Authored: Tue Apr 26 12:04:48 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Tue Apr 26 12:04:48 2016 -0400

----------------------------------------------------------------------
 app/libraries/Airavata/API/Airavata.php         | 3062 ++++++++++++++----
 .../Airavata/Model/Data/Product/Types.php       |  879 +++++
 .../Airavata/Model/Data/Resource/Types.php      |  854 +++++
 app/libraries/Airavata/Model/Process/Types.php  |   23 +
 .../Airavata/Model/Scheduling/Types.php         |   69 +
 .../Airavata/Model/Workspace/Types.php          |  190 ++
 6 files changed, 4447 insertions(+), 630 deletions(-)
----------------------------------------------------------------------



[3/6] airavata-php-gateway git commit: updating thrift generated files

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/8b67709f/app/libraries/Airavata/API/Airavata.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/API/Airavata.php b/app/libraries/Airavata/API/Airavata.php
index c7065a4..2029203 100644
--- a/app/libraries/Airavata/API/Airavata.php
+++ b/app/libraries/Airavata/API/Airavata.php
@@ -168,6 +168,59 @@ interface AiravataIf {
    */
   public function isGatewayExist(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
   /**
+   *   * API methods to retrieve notifications
+   * *
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param \Airavata\Model\Workspace\Notification $notification
+   * @return string
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function createNotification(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Notification $notification);
+  /**
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param \Airavata\Model\Workspace\Notification $notification
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function updateNotification(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Notification $notification);
+  /**
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $gatewayId
+   * @param string $notificationId
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function deleteNotification(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $notificationId);
+  /**
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $gatewayId
+   * @param string $notificationId
+   * @return \Airavata\Model\Workspace\Notification
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function getNotification(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $notificationId);
+  /**
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $gatewayId
+   * @return \Airavata\Model\Workspace\Notification[]
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function getAllNotifications(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
+  /**
    * Generate and Register SSH Key Pair with Airavata Credential Store.
    * 
    * @param gatewayId
@@ -3996,6 +4049,322 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("isGatewayExist failed: unknown result");
   }
 
+  public function createNotification(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Notification $notification)
+  {
+    $this->send_createNotification($authzToken, $notification);
+    return $this->recv_createNotification();
+  }
+
+  public function send_createNotification(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Notification $notification)
+  {
+    $args = new \Airavata\API\Airavata_createNotification_args();
+    $args->authzToken = $authzToken;
+    $args->notification = $notification;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'createNotification', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('createNotification', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_createNotification()
+  {
+    $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_createNotification_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_createNotification_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;
+    }
+    if ($result->ae !== null) {
+      throw $result->ae;
+    }
+    throw new \Exception("createNotification failed: unknown result");
+  }
+
+  public function updateNotification(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Notification $notification)
+  {
+    $this->send_updateNotification($authzToken, $notification);
+    $this->recv_updateNotification();
+  }
+
+  public function send_updateNotification(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Workspace\Notification $notification)
+  {
+    $args = new \Airavata\API\Airavata_updateNotification_args();
+    $args->authzToken = $authzToken;
+    $args->notification = $notification;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'updateNotification', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('updateNotification', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_updateNotification()
+  {
+    $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_updateNotification_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_updateNotification_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    if ($result->ae !== null) {
+      throw $result->ae;
+    }
+    return;
+  }
+
+  public function deleteNotification(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $notificationId)
+  {
+    $this->send_deleteNotification($authzToken, $gatewayId, $notificationId);
+    $this->recv_deleteNotification();
+  }
+
+  public function send_deleteNotification(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $notificationId)
+  {
+    $args = new \Airavata\API\Airavata_deleteNotification_args();
+    $args->authzToken = $authzToken;
+    $args->gatewayId = $gatewayId;
+    $args->notificationId = $notificationId;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'deleteNotification', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('deleteNotification', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_deleteNotification()
+  {
+    $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_deleteNotification_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_deleteNotification_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    if ($result->ae !== null) {
+      throw $result->ae;
+    }
+    return;
+  }
+
+  public function getNotification(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $notificationId)
+  {
+    $this->send_getNotification($authzToken, $gatewayId, $notificationId);
+    return $this->recv_getNotification();
+  }
+
+  public function send_getNotification(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $notificationId)
+  {
+    $args = new \Airavata\API\Airavata_getNotification_args();
+    $args->authzToken = $authzToken;
+    $args->gatewayId = $gatewayId;
+    $args->notificationId = $notificationId;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'getNotification', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('getNotification', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_getNotification()
+  {
+    $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_getNotification_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_getNotification_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;
+    }
+    if ($result->ae !== null) {
+      throw $result->ae;
+    }
+    throw new \Exception("getNotification failed: unknown result");
+  }
+
+  public function getAllNotifications(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
+  {
+    $this->send_getAllNotifications($authzToken, $gatewayId);
+    return $this->recv_getAllNotifications();
+  }
+
+  public function send_getAllNotifications(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
+  {
+    $args = new \Airavata\API\Airavata_getAllNotifications_args();
+    $args->authzToken = $authzToken;
+    $args->gatewayId = $gatewayId;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'getAllNotifications', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('getAllNotifications', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_getAllNotifications()
+  {
+    $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_getAllNotifications_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_getAllNotifications_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;
+    }
+    if ($result->ae !== null) {
+      throw $result->ae;
+    }
+    throw new \Exception("getAllNotifications failed: unknown result");
+  }
+
   public function generateAndRegisterSSHKeys(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName)
   {
     $this->send_generateAndRegisterSSHKeys($authzToken, $gatewayId, $userName);
@@ -12744,21 +13113,1441 @@ class Airavata_getAPIVersion_result {
 
 }
 
-class Airavata_isUserExists_args {
+class Airavata_isUserExists_args {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\Model\Security\AuthzToken
+   */
+  public $authzToken = null;
+  /**
+   * @var string
+   */
+  public $gatewayId = null;
+  /**
+   * @var string
+   */
+  public $userName = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'authzToken',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Security\AuthzToken',
+          ),
+        2 => array(
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'userName',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['authzToken'])) {
+        $this->authzToken = $vals['authzToken'];
+      }
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
+      if (isset($vals['userName'])) {
+        $this->userName = $vals['userName'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_isUserExists_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::STRUCT) {
+            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
+            $xfer += $this->authzToken->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->userName);
+          } 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_isUserExists_args');
+    if ($this->authzToken !== null) {
+      if (!is_object($this->authzToken)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
+      $xfer += $this->authzToken->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->userName !== null) {
+      $xfer += $output->writeFieldBegin('userName', TType::STRING, 3);
+      $xfer += $output->writeString($this->userName);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_isUserExists_result {
+  static $_TSPEC;
+
+  /**
+   * @var bool
+   */
+  public $success = null;
+  /**
+   * @var \Airavata\API\Error\InvalidRequestException
+   */
+  public $ire = null;
+  /**
+   * @var \Airavata\API\Error\AiravataClientException
+   */
+  public $ace = null;
+  /**
+   * @var \Airavata\API\Error\AiravataSystemException
+   */
+  public $ase = null;
+  /**
+   * @var \Airavata\API\Error\AuthorizationException
+   */
+  public $ae = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::BOOL,
+          ),
+        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',
+          ),
+        4 => array(
+          'var' => 'ae',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AuthorizationException',
+          ),
+        );
+    }
+    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'];
+      }
+      if (isset($vals['ae'])) {
+        $this->ae = $vals['ae'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_isUserExists_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::BOOL) {
+            $xfer += $input->readBool($this->success);
+          } 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;
+        case 4:
+          if ($ftype == TType::STRUCT) {
+            $this->ae = new \Airavata\API\Error\AuthorizationException();
+            $xfer += $this->ae->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_isUserExists_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+      $xfer += $output->writeBool($this->success);
+      $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();
+    }
+    if ($this->ae !== null) {
+      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 4);
+      $xfer += $this->ae->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_addGateway_args {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\Model\Security\AuthzToken
+   */
+  public $authzToken = null;
+  /**
+   * @var \Airavata\Model\Workspace\Gateway
+   */
+  public $gateway = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'authzToken',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Security\AuthzToken',
+          ),
+        2 => array(
+          'var' => 'gateway',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Workspace\Gateway',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['authzToken'])) {
+        $this->authzToken = $vals['authzToken'];
+      }
+      if (isset($vals['gateway'])) {
+        $this->gateway = $vals['gateway'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_addGateway_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::STRUCT) {
+            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
+            $xfer += $this->authzToken->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->gateway = new \Airavata\Model\Workspace\Gateway();
+            $xfer += $this->gateway->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_addGateway_args');
+    if ($this->authzToken !== null) {
+      if (!is_object($this->authzToken)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
+      $xfer += $this->authzToken->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->gateway !== null) {
+      if (!is_object($this->gateway)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('gateway', TType::STRUCT, 2);
+      $xfer += $this->gateway->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_addGateway_result {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $success = null;
+  /**
+   * @var \Airavata\API\Error\InvalidRequestException
+   */
+  public $ire = null;
+  /**
+   * @var \Airavata\API\Error\AiravataClientException
+   */
+  public $ace = null;
+  /**
+   * @var \Airavata\API\Error\AiravataSystemException
+   */
+  public $ase = null;
+  /**
+   * @var \Airavata\API\Error\AuthorizationException
+   */
+  public $ae = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRING,
+          ),
+        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',
+          ),
+        4 => array(
+          'var' => 'ae',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AuthorizationException',
+          ),
+        );
+    }
+    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'];
+      }
+      if (isset($vals['ae'])) {
+        $this->ae = $vals['ae'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_addGateway_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::STRING) {
+            $xfer += $input->readString($this->success);
+          } 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;
+        case 4:
+          if ($ftype == TType::STRUCT) {
+            $this->ae = new \Airavata\API\Error\AuthorizationException();
+            $xfer += $this->ae->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_addGateway_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+      $xfer += $output->writeString($this->success);
+      $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();
+    }
+    if ($this->ae !== null) {
+      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 4);
+      $xfer += $this->ae->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_updateGateway_args {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\Model\Security\AuthzToken
+   */
+  public $authzToken = null;
+  /**
+   * @var string
+   */
+  public $gatewayId = null;
+  /**
+   * @var \Airavata\Model\Workspace\Gateway
+   */
+  public $updatedGateway = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'authzToken',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Security\AuthzToken',
+          ),
+        2 => array(
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'updatedGateway',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Workspace\Gateway',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['authzToken'])) {
+        $this->authzToken = $vals['authzToken'];
+      }
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
+      if (isset($vals['updatedGateway'])) {
+        $this->updatedGateway = $vals['updatedGateway'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_updateGateway_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::STRUCT) {
+            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
+            $xfer += $this->authzToken->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->updatedGateway = new \Airavata\Model\Workspace\Gateway();
+            $xfer += $this->updatedGateway->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_updateGateway_args');
+    if ($this->authzToken !== null) {
+      if (!is_object($this->authzToken)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
+      $xfer += $this->authzToken->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->updatedGateway !== null) {
+      if (!is_object($this->updatedGateway)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('updatedGateway', TType::STRUCT, 3);
+      $xfer += $this->updatedGateway->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_updateGateway_result {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\API\Error\InvalidRequestException
+   */
+  public $ire = null;
+  /**
+   * @var \Airavata\API\Error\AiravataClientException
+   */
+  public $ace = null;
+  /**
+   * @var \Airavata\API\Error\AiravataSystemException
+   */
+  public $ase = null;
+  /**
+   * @var \Airavata\API\Error\AuthorizationException
+   */
+  public $ae = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        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',
+          ),
+        4 => array(
+          'var' => 'ae',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AuthorizationException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['ire'])) {
+        $this->ire = $vals['ire'];
+      }
+      if (isset($vals['ace'])) {
+        $this->ace = $vals['ace'];
+      }
+      if (isset($vals['ase'])) {
+        $this->ase = $vals['ase'];
+      }
+      if (isset($vals['ae'])) {
+        $this->ae = $vals['ae'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_updateGateway_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 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;
+        case 4:
+          if ($ftype == TType::STRUCT) {
+            $this->ae = new \Airavata\API\Error\AuthorizationException();
+            $xfer += $this->ae->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_updateGateway_result');
+    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();
+    }
+    if ($this->ae !== null) {
+      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 4);
+      $xfer += $this->ae->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_getGateway_args {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\Model\Security\AuthzToken
+   */
+  public $authzToken = null;
+  /**
+   * @var string
+   */
+  public $gatewayId = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'authzToken',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Security\AuthzToken',
+          ),
+        2 => array(
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['authzToken'])) {
+        $this->authzToken = $vals['authzToken'];
+      }
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_getGateway_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::STRUCT) {
+            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
+            $xfer += $this->authzToken->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
+          } 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_getGateway_args');
+    if ($this->authzToken !== null) {
+      if (!is_object($this->authzToken)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
+      $xfer += $this->authzToken->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_getGateway_result {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\Model\Workspace\Gateway
+   */
+  public $success = null;
+  /**
+   * @var \Airavata\API\Error\InvalidRequestException
+   */
+  public $ire = null;
+  /**
+   * @var \Airavata\API\Error\AiravataClientException
+   */
+  public $ace = null;
+  /**
+   * @var \Airavata\API\Error\AiravataSystemException
+   */
+  public $ase = null;
+  /**
+   * @var \Airavata\API\Error\AuthorizationException
+   */
+  public $ae = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Workspace\Gateway',
+          ),
+        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',
+          ),
+        4 => array(
+          'var' => 'ae',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AuthorizationException',
+          ),
+        );
+    }
+    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'];
+      }
+      if (isset($vals['ae'])) {
+        $this->ae = $vals['ae'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_getGateway_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::STRUCT) {
+            $this->success = new \Airavata\Model\Workspace\Gateway();
+            $xfer += $this->success->read($input);
+          } 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;
+        case 4:
+          if ($ftype == TType::STRUCT) {
+            $this->ae = new \Airavata\API\Error\AuthorizationException();
+            $xfer += $this->ae->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_getGateway_result');
+    if ($this->success !== null) {
+      if (!is_object($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
+      $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();
+    }
+    if ($this->ae !== null) {
+      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 4);
+      $xfer += $this->ae->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_deleteGateway_args {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\Model\Security\AuthzToken
+   */
+  public $authzToken = null;
+  /**
+   * @var string
+   */
+  public $gatewayId = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'authzToken',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Security\AuthzToken',
+          ),
+        2 => array(
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['authzToken'])) {
+        $this->authzToken = $vals['authzToken'];
+      }
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_deleteGateway_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::STRUCT) {
+            $this->authzToken = new \Airavata\Model\Security\AuthzToken();
+            $xfer += $this->authzToken->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
+          } 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_deleteGateway_args');
+    if ($this->authzToken !== null) {
+      if (!is_object($this->authzToken)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('authzToken', TType::STRUCT, 1);
+      $xfer += $this->authzToken->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_deleteGateway_result {
+  static $_TSPEC;
+
+  /**
+   * @var bool
+   */
+  public $success = null;
+  /**
+   * @var \Airavata\API\Error\InvalidRequestException
+   */
+  public $ire = null;
+  /**
+   * @var \Airavata\API\Error\AiravataClientException
+   */
+  public $ace = null;
+  /**
+   * @var \Airavata\API\Error\AiravataSystemException
+   */
+  public $ase = null;
+  /**
+   * @var \Airavata\API\Error\AuthorizationException
+   */
+  public $ae = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::BOOL,
+          ),
+        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',
+          ),
+        4 => array(
+          'var' => 'ae',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\API\Error\AuthorizationException',
+          ),
+        );
+    }
+    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'];
+      }
+      if (isset($vals['ae'])) {
+        $this->ae = $vals['ae'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Airavata_deleteGateway_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::BOOL) {
+            $xfer += $input->readBool($this->success);
+          } 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;
+        case 4:
+          if ($ftype == TType::STRUCT) {
+            $this->ae = new \Airavata\API\Error\AuthorizationException();
+            $xfer += $this->ae->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_deleteGateway_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+      $xfer += $output->writeBool($this->success);
+      $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();
+    }
+    if ($this->ae !== null) {
+      $xfer += $output->writeFieldBegin('ae', TType::STRUCT, 4);
+      $xfer += $this->ae->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Airavata_getAllGateways_args {
   static $_TSPEC;
 
   /**
    * @var \Airavata\Model\Security\AuthzToken
    */
   public $authzToken = null;
-  /**
-   * @var string
-   */
-  public $gatewayId = null;
-  /**
-   * @var string
-   */
-  public $userName = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -12768,31 +14557,17 @@ class Airavata_isUserExists_args {
           'type' => TType::STRUCT,
           'class' => '\Airavata\Model\Security\AuthzToken',
           ),
-        2 => array(
-          'var' => 'gatewayId',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'userName',
-          'type' => TType::STRING,
-          ),
         );
     }
     if (is_array($vals)) {
       if (isset($vals['authzToken'])) {
         $this->authzToken = $vals['authzToken'];
       }
-      if (isset($vals['gatewayId'])) {
-        $this->gatewayId = $vals['gatewayId'];
-      }
-      if (isset($vals['userName'])) {
-        $this->userName = $vals['userName'];
-      }
     }
   }
 
   public function getName() {
-    return 'Airavata_isUserExists_args';
+    return 'Airavata_getAllGateways_args';
   }
 
   public function read($input)
@@ -12818,20 +14593,6 @@ class Airavata_isUserExists_args {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->gatewayId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->userName);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -12844,7 +14605,7 @@ class Airavata_isUserExists_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_isUserExists_args');
+    $xfer += $output->writeStructBegin('Airavata_getAllGateways_args');
     if ($this->authzToken !== null) {
       if (!is_object($this->authzToken)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -12853,16 +14614,6 @@ class Airavata_isUserExists_args {
       $xfer += $this->authzToken->write($output);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->gatewayId !== null) {
-      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
-      $xfer += $output->writeString($this->gatewayId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->userName !== null) {
-      $xfer += $output->writeFieldBegin('userName', TType::STRING, 3);
-      $xfer += $output->writeString($this->userName);
-      $xfer += $output->writeFieldEnd();
-    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
@@ -12870,11 +14621,11 @@ class Airavata_isUserExists_args {
 
 }
 
-class Airavata_isUserExists_result {
+class Airavata_getAllGateways_result {
   static $_TSPEC;
 
   /**
-   * @var bool
+   * @var \Airavata\Model\Workspace\Gateway[]
    */
   public $success = null;
   /**
@@ -12899,7 +14650,12 @@ class Airavata_isUserExists_result {
       self::$_TSPEC = array(
         0 => array(
           'var' => 'success',
-          'type' => TType::BOOL,
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Workspace\Gateway',
+            ),
           ),
         1 => array(
           'var' => 'ire',
@@ -12943,7 +14699,7 @@ class Airavata_isUserExists_result {
   }
 
   public function getName() {
-    return 'Airavata_isUserExists_result';
+    return 'Airavata_getAllGateways_result';
   }
 
   public function read($input)
@@ -12962,8 +14718,19 @@ class Airavata_isUserExists_result {
       switch ($fid)
       {
         case 0:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->success);
+          if ($ftype == TType::LST) {
+            $this->success = array();
+            $_size0 = 0;
+            $_etype3 = 0;
+            $xfer += $input->readListBegin($_etype3, $_size0);
+            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+            {
+              $elem5 = null;
+              $elem5 = new \Airavata\Model\Workspace\Gateway();
+              $xfer += $elem5->read($input);
+              $this->success []= $elem5;
+            }
+            $xfer += $input->readListEnd();
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -13012,10 +14779,22 @@ class Airavata_isUserExists_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_isUserExists_result');
+    $xfer += $output->writeStructBegin('Airavata_getAllGateways_result');
     if ($this->success !== null) {
-      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
-      $xfer += $output->writeBool($this->success);
+      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 $iter6)
+          {
+            $xfer += $iter6->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
       $xfer += $output->writeFieldEnd();
     }
     if ($this->ire !== null) {
@@ -13045,7 +14824,7 @@ class Airavata_isUserExists_result {
 
 }
 
-class Airavata_addGateway_args {
+class Airavata_isGatewayExist_args {
   static $_TSPEC;
 
   /**
@@ -13053,9 +14832,9 @@ class Airavata_addGateway_args {
    */
   public $authzToken = null;
   /**
-   * @var \Airavata\Model\Workspace\Gateway
+   * @var string
    */
-  public $gateway = null;
+  public $gatewayId = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -13066,9 +14845,8 @@ class Airavata_addGateway_args {
           'class' => '\Airavata\Model\Security\AuthzToken',
           ),
         2 => array(
-          'var' => 'gateway',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Gateway',
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
           ),
         );
     }
@@ -13076,14 +14854,14 @@ class Airavata_addGateway_args {
       if (isset($vals['authzToken'])) {
         $this->authzToken = $vals['authzToken'];
       }
-      if (isset($vals['gateway'])) {
-        $this->gateway = $vals['gateway'];
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
       }
     }
   }
 
   public function getName() {
-    return 'Airavata_addGateway_args';
+    return 'Airavata_isGatewayExist_args';
   }
 
   public function read($input)
@@ -13110,9 +14888,8 @@ class Airavata_addGateway_args {
           }
           break;
         case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->gateway = new \Airavata\Model\Workspace\Gateway();
-            $xfer += $this->gateway->read($input);
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -13129,7 +14906,7 @@ class Airavata_addGateway_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_addGateway_args');
+    $xfer += $output->writeStructBegin('Airavata_isGatewayExist_args');
     if ($this->authzToken !== null) {
       if (!is_object($this->authzToken)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -13138,12 +14915,9 @@ class Airavata_addGateway_args {
       $xfer += $this->authzToken->write($output);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->gateway !== null) {
-      if (!is_object($this->gateway)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('gateway', TType::STRUCT, 2);
-      $xfer += $this->gateway->write($output);
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
+      $xfer += $output->writeString($this->gatewayId);
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -13153,11 +14927,11 @@ class Airavata_addGateway_args {
 
 }
 
-class Airavata_addGateway_result {
+class Airavata_isGatewayExist_result {
   static $_TSPEC;
 
   /**
-   * @var string
+   * @var bool
    */
   public $success = null;
   /**
@@ -13182,7 +14956,7 @@ class Airavata_addGateway_result {
       self::$_TSPEC = array(
         0 => array(
           'var' => 'success',
-          'type' => TType::STRING,
+          'type' => TType::BOOL,
           ),
         1 => array(
           'var' => 'ire',
@@ -13226,7 +15000,7 @@ class Airavata_addGateway_result {
   }
 
   public function getName() {
-    return 'Airavata_addGateway_result';
+    return 'Airavata_isGatewayExist_result';
   }
 
   public function read($input)
@@ -13245,8 +15019,8 @@ class Airavata_addGateway_result {
       switch ($fid)
       {
         case 0:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->success);
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->success);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -13295,10 +15069,10 @@ class Airavata_addGateway_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_addGateway_result');
+    $xfer += $output->writeStructBegin('Airavata_isGatewayExist_result');
     if ($this->success !== null) {
-      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
-      $xfer += $output->writeString($this->success);
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+      $xfer += $output->writeBool($this->success);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->ire !== null) {
@@ -13328,7 +15102,7 @@ class Airavata_addGateway_result {
 
 }
 
-class Airavata_updateGateway_args {
+class Airavata_createNotification_args {
   static $_TSPEC;
 
   /**
@@ -13336,13 +15110,9 @@ class Airavata_updateGateway_args {
    */
   public $authzToken = null;
   /**
-   * @var string
-   */
-  public $gatewayId = null;
-  /**
-   * @var \Airavata\Model\Workspace\Gateway
+   * @var \Airavata\Model\Workspace\Notification
    */
-  public $updatedGateway = null;
+  public $notification = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -13353,13 +15123,9 @@ class Airavata_updateGateway_args {
           'class' => '\Airavata\Model\Security\AuthzToken',
           ),
         2 => array(
-          'var' => 'gatewayId',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'updatedGateway',
+          'var' => 'notification',
           'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Gateway',
+          'class' => '\Airavata\Model\Workspace\Notification',
           ),
         );
     }
@@ -13367,17 +15133,14 @@ class Airavata_updateGateway_args {
       if (isset($vals['authzToken'])) {
         $this->authzToken = $vals['authzToken'];
       }
-      if (isset($vals['gatewayId'])) {
-        $this->gatewayId = $vals['gatewayId'];
-      }
-      if (isset($vals['updatedGateway'])) {
-        $this->updatedGateway = $vals['updatedGateway'];
+      if (isset($vals['notification'])) {
+        $this->notification = $vals['notification'];
       }
     }
   }
 
   public function getName() {
-    return 'Airavata_updateGateway_args';
+    return 'Airavata_createNotification_args';
   }
 
   public function read($input)
@@ -13404,16 +15167,9 @@ class Airavata_updateGateway_args {
           }
           break;
         case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->gatewayId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
           if ($ftype == TType::STRUCT) {
-            $this->updatedGateway = new \Airavata\Model\Workspace\Gateway();
-            $xfer += $this->updatedGateway->read($input);
+            $this->notification = new \Airavata\Model\Workspace\Notification();
+            $xfer += $this->notification->read($input);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -13430,7 +15186,7 @@ class Airavata_updateGateway_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_updateGateway_args');
+    $xfer += $output->writeStructBegin('Airavata_createNotification_args');
     if ($this->authzToken !== null) {
       if (!is_object($this->authzToken)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -13439,17 +15195,12 @@ class Airavata_updateGateway_args {
       $xfer += $this->authzToken->write($output);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->gatewayId !== null) {
-      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
-      $xfer += $output->writeString($this->gatewayId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->updatedGateway !== null) {
-      if (!is_object($this->updatedGateway)) {
+    if ($this->notification !== null) {
+      if (!is_object($this->notification)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('updatedGateway', TType::STRUCT, 3);
-      $xfer += $this->updatedGateway->write($output);
+      $xfer += $output->writeFieldBegin('notification', TType::STRUCT, 2);
+      $xfer += $this->notification->write($output);
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -13459,10 +15210,14 @@ class Airavata_updateGateway_args {
 
 }
 
-class Airavata_updateGateway_result {
+class Airavata_createNotification_result {
   static $_TSPEC;
 
   /**
+   * @var string
+   */
+  public $success = null;
+  /**
    * @var \Airavata\API\Error\InvalidRequestException
    */
   public $ire = null;
@@ -13482,6 +15237,10 @@ class Airavata_updateGateway_result {
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRING,
+          ),
         1 => array(
           'var' => 'ire',
           'type' => TType::STRUCT,
@@ -13505,6 +15264,9 @@ class Airavata_updateGateway_result {
         );
     }
     if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
       if (isset($vals['ire'])) {
         $this->ire = $vals['ire'];
       }
@@ -13521,7 +15283,7 @@ class Airavata_updateGateway_result {
   }
 
   public function getName() {
-    return 'Airavata_updateGateway_result';
+    return 'Airavata_createNotification_result';
   }
 
   public function read($input)
@@ -13539,6 +15301,13 @@ class Airavata_updateGateway_result {
       }
       switch ($fid)
       {
+        case 0:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->success);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         case 1:
           if ($ftype == TType::STRUCT) {
             $this->ire = new \Airavata\API\Error\InvalidRequestException();
@@ -13583,7 +15352,12 @@ class Airavata_updateGateway_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_updateGateway_result');
+    $xfer += $output->writeStructBegin('Airavata_createNotification_result');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+      $xfer += $output->writeString($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
     if ($this->ire !== null) {
       $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
       $xfer += $this->ire->write($output);
@@ -13611,7 +15385,7 @@ class Airavata_updateGateway_result {
 
 }
 
-class Airavata_getGateway_args {
+class Airavata_updateNotification_args {
   static $_TSPEC;
 
   /**
@@ -13619,9 +15393,9 @@ class Airavata_getGateway_args {
    */
   public $authzToken = null;
   /**
-   * @var string
+   * @var \Airavata\Model\Workspace\Notification
    */
-  public $gatewayId = null;
+  public $notification = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -13632,8 +15406,9 @@ class Airavata_getGateway_args {
           'class' => '\Airavata\Model\Security\AuthzToken',
           ),
         2 => array(
-          'var' => 'gatewayId',
-          'type' => TType::STRING,
+          'var' => 'notification',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Workspace\Notification',
           ),
         );
     }
@@ -13641,14 +15416,14 @@ class Airavata_getGateway_args {
       if (isset($vals['authzToken'])) {
         $this->authzToken = $vals['authzToken'];
       }
-      if (isset($vals['gatewayId'])) {
-        $this->gatewayId = $vals['gatewayId'];
+      if (isset($vals['notification'])) {
+        $this->notification = $vals['notification'];
       }
     }
   }
 
   public function getName() {
-    return 'Airavata_getGateway_args';
+    return 'Airavata_updateNotification_args';
   }
 
   public function read($input)
@@ -13675,8 +15450,9 @@ class Airavata_getGateway_args {
           }
           break;
         case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->gatewayId);
+          if ($ftype == TType::STRUCT) {
+            $this->notification = new \Airavata\Model\Workspace\Notification();
+            $xfer += $this->notification->read($input);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -13693,7 +15469,7 @@ class Airavata_getGateway_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getGateway_args');
+    $xfer += $output->writeStructBegin('Airavata_updateNotification_args');
     if ($this->authzToken !== null) {
       if (!is_object($this->authzToken)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -13702,9 +15478,12 @@ class Airavata_getGateway_args {
       $xfer += $this->authzToken->write($output);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->gatewayId !== null) {
-      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
-      $xfer += $output->writeString($this->gatewayId);
+    if ($this->notification !== null) {
+      if (!is_object($this->notification)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('notification', TType::STRUCT, 2);
+      $xfer += $this->notification->write($output);
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -13714,14 +15493,10 @@ class Airavata_getGateway_args {
 
 }
 
-class Airavata_getGateway_result {
+class Airavata_updateNotification_result {
   static $_TSPEC;
 
   /**
-   * @var \Airavata\Model\Workspace\Gateway
-   */
-  public $success = null;
-  /**
    * @var \Airavata\API\Error\InvalidRequestException
    */
   public $ire = null;
@@ -13741,11 +15516,6 @@ class Airavata_getGateway_result {
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
-        0 => array(
-          'var' => 'success',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Gateway',
-          ),
         1 => array(
           'var' => 'ire',
           'type' => TType::STRUCT,
@@ -13769,9 +15539,6 @@ class Airavata_getGateway_result {
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['success'])) {
-        $this->success = $vals['success'];
-      }
       if (isset($vals['ire'])) {
         $this->ire = $vals['ire'];
       }
@@ -13788,7 +15555,7 @@ class Airavata_getGateway_result {
   }
 
   public function getName() {
-    return 'Airavata_getGateway_result';
+    return 'Airavata_updateNotification_result';
   }
 
   public function read($input)
@@ -13806,14 +15573,6 @@ class Airavata_getGateway_result {
       }
       switch ($fid)
       {
-        case 0:
-          if ($ftype == TType::STRUCT) {
-            $this->success = new \Airavata\Model\Workspace\Gateway();
-            $xfer += $this->success->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
         case 1:
           if ($ftype == TType::STRUCT) {
             $this->ire = new \Airavata\API\Error\InvalidRequestException();
@@ -13858,15 +15617,7 @@ class Airavata_getGateway_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getGateway_result');
-    if ($this->success !== null) {
-      if (!is_object($this->success)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
-      $xfer += $this->success->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
+    $xfer += $output->writeStructBegin('Airavata_updateNotification_result');
     if ($this->ire !== null) {
       $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
       $xfer += $this->ire->write($output);
@@ -13894,7 +15645,7 @@ class Airavata_getGateway_result {
 
 }
 
-class Airavata_deleteGateway_args {
+class Airavata_deleteNotification_args {
   static $_TSPEC;
 
   /**
@@ -13905,6 +15656,10 @@ class Airavata_deleteGateway_args {
    * @var string
    */
   public $gatewayId = null;
+  /**
+   * @var string
+   */
+  public $notificationId = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -13918,6 +15673,10 @@ class Airavata_deleteGateway_args {
           'var' => 'gatewayId',
           'type' => TType::STRING,
           ),
+        3 => array(
+          'var' => 'notificationId',
+          'type' => TType::STRING,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -13927,11 +15686,14 @@ class Airavata_deleteGateway_args {
       if (isset($vals['gatewayId'])) {
         $this->gatewayId = $vals['gatewayId'];
       }
+      if (isset($vals['notificationId'])) {
+        $this->notificationId = $vals['notificationId'];
+      }
     }
   }
 
   public function getName() {
-    return 'Airavata_deleteGateway_args';
+    return 'Airavata_deleteNotification_args';
   }
 
   public function read($input)
@@ -13964,6 +15726,13 @@ class Airavata_deleteGateway_args {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->notificationId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -13976,7 +15745,7 @@ class Airavata_deleteGateway_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_deleteGateway_args');
+    $xfer += $output->writeStructBegin('Airavata_deleteNotification_args');
     if ($this->authzToken !== null) {
       if (!is_object($this->authzToken)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -13990,6 +15759,11 @@ class Airavata_deleteGateway_args {
       $xfer += $output->writeString($this->gatewayId);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->notificationId !== null) {
+      $xfer += $output->writeFieldBegin('notificationId', TType::STRING, 3);
+      $xfer += $output->writeString($this->notificationId);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
@@ -13997,14 +15771,10 @@ class Airavata_deleteGateway_args {
 
 }
 
-class Airavata_deleteGateway_result {
+class Airavata_deleteNotification_result {
   static $_TSPEC;
 
   /**
-   * @var bool
-   */
-  public $success = null;
-  /**
    * @var \Airavata\API\Error\InvalidRequestException
    */
   public $ire = null;
@@ -14024,10 +15794,6 @@ class Airavata_deleteGateway_result {
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
-        0 => array(
-          'var' => 'success',
-          'type' => TType::BOOL,
-          ),
         1 => array(
           'var' => 'ire',
           'type' => TType::STRUCT,
@@ -14051,9 +15817,6 @@ class Airavata_deleteGateway_result {
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['success'])) {
-        $this->success = $vals['success'];
-      }
       if (isset($vals['ire'])) {
         $this->ire = $vals['ire'];
       }
@@ -14070,7 +15833,7 @@ class Airavata_deleteGateway_result {
   }
 
   public function getName() {
-    return 'Airavata_deleteGateway_result';
+    return 'Airavata_deleteNotification_result';
   }
 
   public function read($input)
@@ -14088,13 +15851,6 @@ class Airavata_deleteGateway_result {
       }
       switch ($fid)
       {
-        case 0:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->success);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
         case 1:
           if ($ftype == TType::STRUCT) {
             $this->ire = new \Airavata\API\Error\InvalidRequestException();
@@ -14139,12 +15895,7 @@ class Airavata_deleteGateway_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_deleteGateway_result');
-    if ($this->success !== null) {
-      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
-      $xfer += $output->writeBool($this->success);
-      $xfer += $output->writeFieldEnd();
-    }
+    $xfer += $output->writeStructBegin('Airavata_deleteNotification_result');
     if ($this->ire !== null) {
       $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
       $xfer += $this->ire->write($output);
@@ -14172,13 +15923,21 @@ class Airavata_deleteGateway_result {
 
 }
 
-class Airavata_getAllGateways_args {
+class Airavata_getNotification_args {
   static $_TSPEC;
 
   /**
    * @var \Airavata\Model\Security\AuthzToken
    */
   public $authzToken = null;
+  /**
+   * @var string
+   */
+  public $gatewayId = null;
+  /**
+   * @var string
+   */
+  public $notificationId = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -14188,17 +15947,31 @@ class Airavata_getAllGateways_args {
           'type' => TType::STRUCT,
           'class' => '\Airavata\Model\Security\AuthzToken',
           ),
+        2 => array(
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'notificationId',
+          'type' => TType::STRING,
+          ),
         );
     }
     if (is_array($vals)) {
       if (isset($vals['authzToken'])) {
         $this->authzToken = $vals['authzToken'];
       }
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
+      if (isset($vals['notificationId'])) {
+        $this->notificationId = $vals['notificationId'];
+      }
     }
   }
 
   public function getName() {
-    return 'Airavata_getAllGateways_args';
+    return 'Airavata_getNotification_args';
   }
 
   public function read($input)
@@ -14224,6 +15997,20 @@ class Airavata_getAllGateways_args {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->notificationId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -14236,7 +16023,7 @@ class Airavata_getAllGateways_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getAllGateways_args');
+    $xfer += $output->writeStructBegin('Airavata_getNotification_args');
     if ($this->authzToken !== null) {
       if (!is_object($this->authzToken)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -14245,6 +16032,16 @@ class Airavata_getAllGateways_args {
       $xfer += $this->authzToken->write($output);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->notificationId !== null) {
+      $xfer += $output->writeFieldBegin('notificationId', TType::STRING, 3);
+      $xfer += $output->writeString($this->notificationId);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
@@ -14252,11 +16049,11 @@ class Airavata_getAllGateways_args {
 
 }
 
-class Airavata_getAllGateways_result {
+class Airavata_getNotification_result {
   static $_TSPEC;
 
   /**
-   * @var \Airavata\Model\Workspace\Gateway[]
+   * @var \Airavata\Model\Workspace\Notification
    */
   public $success = null;
   /**
@@ -14281,12 +16078,8 @@ class Airavata_getAllGateways_result {
       self::$_TSPEC = array(
         0 => array(
           'var' => 'success',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Workspace\Gateway',
-            ),
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Workspace\Notification',
           ),
         1 => array(
           'var' => 'ire',
@@ -14330,7 +16123,7 @@ class Airavata_getAllGateways_result {
   }
 
   public function getName() {
-    return 'Airavata_getAllGateways_result';
+    return 'Airavata_getNotification_result';
   }
 
   public function read($input)
@@ -14349,19 +16142,9 @@ class Airavata_getAllGateways_result {
       switch ($fid)
       {
         case 0:
-          if ($ftype == TType::LST) {
-            $this->success = array();
-            $_size0 = 0;
-            $_etype3 = 0;
-            $xfer += $input->readListBegin($_etype3, $_size0);
-            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
-            {
-              $elem5 = null;
-              $elem5 = new \Airavata\Model\Workspace\Gateway();
-              $xfer += $elem5->read($input);
-              $this->success []= $elem5;
-            }
-            $xfer += $input->readListEnd();
+          if ($ftype == TType::STRUCT) {
+            $this->success = new \Airavata\Model\Workspace\Notification();
+            $xfer += $this->success->read($input);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -14410,22 +16193,13 @@ class Airavata_getAllGateways_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getAllGateways_result');
+    $xfer += $output->writeStructBegin('Airavata_getNotification_result');
     if ($this->success !== null) {
-      if (!is_array($this->success)) {
+      if (!is_object($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 $iter6)
-          {
-            $xfer += $iter6->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
       $xfer += $output->writeFieldEnd();
     }
     if ($this->ire !== null) {
@@ -14455,7 +16229,7 @@ class Airavata_getAllGateways_result {
 
 }
 
-class Airavata_isGatewayExist_args {
+class Airavata_getAllNotifications_args {
   static $_TSPEC;
 
   /**
@@ -14492,7 +16266,7 @@ class Airavata_isGatewayExist_args {
   }
 
   public function getName() {
-    return 'Airavata_isGatewayExist_args';
+    return 'Airavata_getAllNotifications_args';
   }
 
   public function read($input)
@@ -14537,7 +16311,7 @@ class Airavata_isGatewayExist_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_isGatewayExist_args');
+    $xfer += $output->writeStructBegin('Airavata_getAllNotifications

<TRUNCATED>

[6/6] airavata-php-gateway git commit: Notification system implementation for Admins. User side still in the works.

Posted by sm...@apache.org.
Notification system implementation for Admins. User side still in the works.


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

Branch: refs/heads/master
Commit: 2fb0e4c299048809f0c62f7a0d1eac11eb2a3fbc
Parents: 873aec4
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Wed Apr 27 17:03:34 2016 -0400
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Wed Apr 27 17:03:34 2016 -0400

----------------------------------------------------------------------
 app/controllers/AdminController.php          |  42 ++-
 app/libraries/AdminUtilities.php             |  31 +-
 app/routes.php                               |  12 +-
 app/views/admin/manage-credentials.blade.php |  53 ---
 app/views/admin/manage-notices.blade.php     | 380 ++++++++++++++--------
 app/views/partials/dashboard-block.blade.php |   2 +-
 6 files changed, 322 insertions(+), 198 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2fb0e4c2/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index d6de6bd..520ce5a 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -183,13 +183,6 @@ class AdminController extends BaseController {
 		return View::make("admin/manage-credentials", array("tokens" => $tokens ) );
 	}
 
-	public function noticesView(){
-        Session::put("admin-nav", "notices");
-        $notices = array();
-        //$notices = AdminUtilities::getNotices();
-		return View::make("admin/manage-notices", array("notices" => $notices));
-	}
-
 	public function updateUserRoles(){
 		if( Input::has("add")){
 			WSIS::updateUserRoles(Input::get("username"), array("new"=> Input::get("roles"), "deleted" => array() ) );
@@ -373,4 +366,39 @@ class AdminController extends BaseController {
     public function viewAllocationRequests(){
     	return 'result';
     }
+
+	public function noticesView(){
+        Session::put("admin-nav", "notices");
+        $notices = array();
+        $notices = array_reverse( AdminUtilities::get_all_notices() );
+		return View::make("admin/manage-notices", array("notices" => $notices));
+	}
+
+	public function addNotice(){
+		$inputs = Input::all();
+		$newNotice = AdminUtilities::add_or_update_notice( $inputs);
+			return json_encode( $newNotice);
+	}
+
+	public function updateNotice(){
+		$inputs = Input::all();
+		if( AdminUtilities::add_or_update_notice( $inputs, true))
+		{
+			return 1;
+		}
+		else
+			return 0;
+	}
+
+	public function deleteNotice(){
+		$inputs = Input::all();
+		if( AdminUtilities::delete_notice( $inputs["notificationId"]))
+		{
+			//ajax
+			return 1;
+		}
+		else
+			return 0;
+	}
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2fb0e4c2/app/libraries/AdminUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/AdminUtilities.php b/app/libraries/AdminUtilities.php
index 52e2123..8fb15ec 100644
--- a/app/libraries/AdminUtilities.php
+++ b/app/libraries/AdminUtilities.php
@@ -1,6 +1,7 @@
 <?php
 
 use Airavata\Model\Workspace\Gateway;
+use Airavata\Model\Workspace\Notification;
 
 class AdminUtilities
 {
@@ -110,7 +111,33 @@ class AdminUtilities
         }
     }
 
-    public static function get_notices(){
-        return Airavata::getNotices( Session::get('authz-token'), $token, Session::get("gateway_id"));
+    public static function get_all_notices(){
+        return Airavata::getAllNotifications( Session::get('authz-token'), Session::get("gateway_id"));
+    }
+
+    public static function add_or_update_notice( $notifData, $update = false){
+        $notification = new Notification();
+        $notification->gatewayId = Session::get("gateway_id");
+        $notification->title = $notifData["title"];
+        $notification->notifcationMessage = $notifData["notificationMessage"];
+        $notification->publishedtime = strtotime( $notifData["publishedtime"])* 1000;
+        $notification->expirationTime = strtotime( $notifData["expirationTime"]) * 1000;
+
+        if( $update){
+            $notification->notificationId =  $notifData["notificationId"];
+            return Airavata::getNotification( 
+                    Session::get('authz-token'), 
+                    Session::get("gateway_id"), 
+                    Airavata::updateNotification( Session::get("authz-token"), $notification) );
+        }
+        else
+            return Airavata::getNotification( 
+                    Session::get('authz-token'), 
+                    Session::get("gateway_id"), 
+                    Airavata::createNotification( Session::get("authz-token"), $notification) );
+    }
+
+    public static function delete_notice( $notificationId){
+        return Airavata::deleteNotification( Session::get('authz-token'), Session::get("gateway_id"), $notificationId);
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2fb0e4c2/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index 01b0adc..42b59f9 100644
--- a/app/routes.php
+++ b/app/routes.php
@@ -253,8 +253,6 @@ Route::get("admin/dashboard/experiment/summary", function () {
 
 Route::get("admin/dashboard/credential-store", "AdminController@credentialStoreView");
 
-Route::get("admin/dashboard/notices", "AdminController@noticesView");
-
 Route::get("manage/users", "AdminController@usersView");
 
 Route::post("admin/adduser", "AdminController@addAdminSubmit");
@@ -285,6 +283,16 @@ Route::post("admin/create-ssh-token", "AdminController@createSSH");
 
 Route::post("admin/remove-ssh-token", "AdminController@removeSSH");
 
+
+//notices
+Route::get("admin/dashboard/notices", "AdminController@noticesView");
+
+Route::post("add-notice", "AdminController@addNotice");
+
+Route::post("update-notice", "AdminController@updateNotice");
+
+Route::post("delete-notice", "AdminController@deleteNotice");
+
 //Super Admin Specific calls
 
 Route::post("admin/add-gateway", "AdminController@addGateway");

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2fb0e4c2/app/views/admin/manage-credentials.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-credentials.blade.php b/app/views/admin/manage-credentials.blade.php
index 16b2a34..fa751f6 100644
--- a/app/views/admin/manage-credentials.blade.php
+++ b/app/views/admin/manage-credentials.blade.php
@@ -119,59 +119,6 @@
         </div>
     </div>
 </div>
-
-<div class="modal fade" id="delete-role-block" tabindex="-1" role="dialog" aria-labelledby="add-modal"
-     aria-hidden="true">
-    <div class="modal-dialog">
-
-        <form action="{{URL::to('/')}}/admin/deleterole" method="POST">
-            <div class="modal-content">
-                <div class="modal-header">
-                    <h3 class="text-center">Delete Role Confirmation</h3>
-                </div>
-                <div class="modal-body">
-                    <input type="hidden" class="form-control delete-roleName" name="role"/>
-                    Do you really want to delete the role - <span class="delete-role-name"></span>
-                </div>
-                <div class="modal-footer">
-                    <div class="form-group">
-                        <input type="submit" class="btn btn-danger" value="Delete"/>
-                        <input type="button" class="btn btn-default" data-dismiss="modal" value="Cancel"/>
-                    </div>
-                </div>
-            </div>
-
-        </form>
-
-
-    </div>
-</div>
-
-
-<!-- Remove a Compute Resource from a Gateway -->
-<div class="modal fade" id="remove-token-block" tabindex="-1" role="dialog" aria-labelledby="add-modal"
-     aria-hidden="true">
-    <div class="modal-dialog">
-        <div class="modal-content">
-            <div class="modal-header">
-                <h3 class="text-center">Remove SSH Key Confirmation</h3>
-            </div>
-            <div class="modal-body">
-                <input type="hidden" class="form-control remove-crId" name="rem-crId"/>
-                <input type="hidden" class="form-control cr-gpId" name="gpId"/>
-
-                Are you sure, you want to remove the SSH Key?<span class="remove-token-name"> </span>
-            </div>
-            <div class="modal-footer">
-                <div class="form-group">
-                    <input type="submit" class="btn btn-danger" value="Remove"/>
-                    <input type="button" class="btn btn-default" data-dismiss="modal" value="Cancel"/>
-                </div>
-            </div>
-        </div>
-    </div>
-</div>
-
 @stop
 
 @section('scripts')

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2fb0e4c2/app/views/admin/manage-notices.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-notices.blade.php b/app/views/admin/manage-notices.blade.php
index bc9fdd7..24c0a6e 100644
--- a/app/views/admin/manage-notices.blade.php
+++ b/app/views/admin/manage-notices.blade.php
@@ -3,6 +3,8 @@
 @section('page-header')
 @parent
 {{ HTML::style('css/admin.css')}}
+{{ HTML::style('css/datetimepicker.css')}}
+
 @stop
 
 @section('content')
@@ -29,89 +31,48 @@
                 <hr/>
                 @if(Session::has("admin"))
                 <div class="col-md-12">
-                    <form class="form-horizontal">
-                        <h4 class="text-center">Create a new Notice</h4>
-                        <div class="form-group required">
-                            <label class="control-label col-md-3">Notice Message</label>
-
-                            <div class="col-md-6">
-                                <textarea type="text" class="form-control" name=""></textarea>
-                            </div>
-                        </div>
-                        <div class='form-group required'>
-                            <label class="col-md-3 control-label">Publish date</label>
-                            <div class='input-group date col-md-4' id='datetimepicker9'>
-                                <input type='text' class="form-control" placeholder="From Date" name="from-date"/>
-                                <span class="input-group-addon">
-                                    <span class="glyphicon glyphicon-calendar"></span>
-                                </span>
-                            </div>
-                        </div>
-                         <div class='form-group required'>
-                            <label class="col-md-3 control-label">Expiration Date</label>
-                            <div class='input-group date col-md-4' id='datetimepicker9'>
-                                <input type='text' class="form-control" placeholder="To Date" name="to-date"/>
-                                <span class="input-group-addon">
-                                    <span class="glyphicon glyphicon-calendar"></span>
-                                </span>
-                            </div>
-                        </div>
-
-                        <div class="form-group required">
-                            <label class="col-md-3 control-label">Priority</label>
-                            <div class="col-md-6">
-                                <select class="form-control">
-                                    <option>Low</option>
-                                    <option>Normal</option>
-                                    <option>Hight</option>
-                                </select>
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <div class=" col-md-offset-3 col-md-3">
-                                <button type="submit" class="btn btn-primary form-control" value="Submit">Submit</button>
-                            </div>
-                        </div>
-                    </form>
-                    <hr/>
+                    <button class="btn btn-default create-notice-button">Create a new Notice</button>
                 </div>
                 <div class="loading-img text-center hide">
                    <img src="../../assets/ajax-loader.gif"/>
                 </div>
                 @endif
                 <h4 class="text-center">Existing Notices</h4>
-                <table class="table table-bordered table-striped table-condensed" style="word-wrap: break-word;">
+                <table class="table table-bordered table-condensed" style="word-wrap: break-word;">
                     <tr>
                         <th>Notice</th>
+                        <th>Message</th>
                         <th>Publish Date</th>
                         <th>Expiry Date</th>
                         <th>Priority</th>
                         <th>Edit</th>
                         <th>Delete</th>
                     </tr>
-                    <tbody class="token-values">
+                    <tbody class="notices-list">
                     @foreach( $notices as $index => $notice)
-                    <tr>
+                    <tr id="notice-{{$notice->notificationId}}" data-notice-info="{{ htmlspecialchars(json_encode( $notice ), ENT_QUOTES, 'UTF-8') }}">
                         <td class="">
-                            {{ $notice->text }}
+                            {{ $notice->title }}
                         </td>
                         <td>
-                            {{ $notice->publish_date }}
+                            {{ $notice->notifcationMessage}}
+                        <td class="time" unix-time="{{ $notice->publishedtime/1000 }}">
+                            {{ $notice->publishedtime }}
                         </td>
-                        <td>
-                            {{ $notice->expiry_date }}
+                        <td class="time" unix-time="{{ $notice->expirationTime/1000 }}">
+                            {{ $notice->expirationTime }}
                         </td>
                         <td>
-                            {{ $notice->priority }}
+                            {{-- $notice->priority --}}
                         </td>
                         @if( Session::has("admin"))
-                        <td>
-                            <span data-token="{{$token}}" class="glyphicon glyphicon-pencil"></span>
+                        <td class="update-notice-icon">
+                            <span class="glyphicon glyphicon-pencil"></span>
                         </td>
                         @endif
                         @if( Session::has("admin"))
-                        <td>
-                            <span data-token="{{$token}}" class="glyphicon glyphicon-trash"></span>
+                        <td class="delete-notice-icon">
+                            <span class="glyphicon glyphicon-trash"></span>
                         </td>
                         @endif
                     </tr>
@@ -123,22 +84,64 @@
     </div>
 </div>
 
-<div class="modal fade" id="delete-role-block" tabindex="-1" role="dialog" aria-labelledby="add-modal"
+<!-- Create a Notice -->
+<div class="modal fade" id="create-notice" tabindex="-1" role="dialog" aria-labelledby="add-modal"
      aria-hidden="true">
     <div class="modal-dialog">
+        <div class="modal-content">
+            <form class="form-horizontal notice-form-values">
+                <div class="modal-header">
+                    <h3 class="text-center">Create a new Notice</h3>
+                </div>
+                <div class="modal-body">
+                    
+                </div>
+                <div class="modal-footer">
+                    <button type="submit" class="btn btn-primary submit-add-notice-form" class="btn btn-primary form-control" value="Submit">Create</button>
+                </div>
+            </form>
 
-        <form action="{{URL::to('/')}}/admin/deleterole" method="POST">
+        </div>
+    </div>
+</div>
+<div class="modal fade" id="update-notice" tabindex="-1" role="dialog" aria-labelledby="add-modal"
+     aria-hidden="true">
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <form class="form-horizontal notice-form-values">
+                <input type="hidden" class="notice-notificationId" name="notificationId"/>
+                <div class="modal-header">
+                    <h3 class="text-center">Update Notice</h3>
+                </div>
+                <div class="modal-body">
+                    
+                </div>
+                <div class="modal-footer">
+                    <button type="submit" class="btn btn-primary submit-update-notice-form" class="btn btn-primary form-control" value="Submit">Update</button>
+                </div>
+            </form>
+        </div>
+    </div>
+    </form>
+</div>
+
+
+<div class="modal fade" id="delete-notice" tabindex="-1" role="dialog" aria-labelledby="add-modal"
+     aria-hidden="true">
+    <div class="modal-dialog">
+
+        <form action="{{URL::to('/')}}/delete-notice" class="delete-notice-values" method="POST">
             <div class="modal-content">
                 <div class="modal-header">
-                    <h3 class="text-center">Delete Role Confirmation</h3>
+                    <h3 class="text-center">Delete Notice Confirmation</h3>
                 </div>
                 <div class="modal-body">
-                    <input type="hidden" class="form-control delete-roleName" name="role"/>
-                    Do you really want to delete the role - <span class="delete-role-name"></span>
+                    <input type="hidden" class="form-control notice-notificationId" name="notificationId"/>
+                    Do you really want to delete the Notice - <span class="notice-title"></span>
                 </div>
                 <div class="modal-footer">
                     <div class="form-group">
-                        <input type="submit" class="btn btn-danger" value="Delete"/>
+                        <button type="submit" class="btn btn-danger delete-notice-submit">Delete</button>
                         <input type="button" class="btn btn-default" data-dismiss="modal" value="Cancel"/>
                     </div>
                 </div>
@@ -150,95 +153,206 @@
     </div>
 </div>
 
+<div class="notice-form hide">
+    <div class="form-group required">
+        <label class="control-label col-md-3">Notice title</label>
 
-<!-- Remove a Compute Resource from a Gateway -->
-<div class="modal fade" id="remove-token-block" tabindex="-1" role="dialog" aria-labelledby="add-modal"
-     aria-hidden="true">
-    <div class="modal-dialog">
-        <div class="modal-content">
-            <div class="modal-header">
-                <h3 class="text-center">Remove SSH Key Confirmation</h3>
-            </div>
-            <div class="modal-body">
-                <input type="hidden" class="form-control remove-crId" name="rem-crId"/>
-                <input type="hidden" class="form-control cr-gpId" name="gpId"/>
+        <div class="col-md-6">
+            <input type="text" class="form-control notice-title" required name="title"/>
+        </div>
+    </div>
+    <div class="form-group required">
+        <label class="control-label col-md-3">Notice Message</label>
 
-                Are you sure, you want to remove the SSH Key?<span class="remove-token-name"> </span>
+        <div class="col-md-6">
+            <textarea type="text" class="form-control notice-notificationMessage" required name="notificationMessage"></textarea>
+        </div>
+    </div>
+    <div class='form-group required'>
+        <label class="col-md-3 control-label">Publish Date</label>
+        <div class="col-md-6">
+            <div class='input-group date datetimepicker9'>
+                <input type='text' class="form-control notice-publishedtime" id="publishedtime" required placeholder="From Date"/>
+                <span class="input-group-addon">
+                    <span class="glyphicon glyphicon-calendar"></span>
+                </span>
             </div>
-            <div class="modal-footer">
-                <div class="form-group">
-                    <input type="submit" class="btn btn-danger" value="Remove"/>
-                    <input type="button" class="btn btn-default" data-dismiss="modal" value="Cancel"/>
-                </div>
+        </div>
+    </div>
+     <div class='form-group'>
+        <label class="col-md-3 control-label">Expiration Date</label>
+        <div class="col-md-6">
+            <div class='input-group date datetimepicker10'>
+                <input type='text' class="form-control notice-expirationTime" placeholder="To Date" id="expirationTime"/>
+                <span class="input-group-addon">
+                    <span class="glyphicon glyphicon-calendar"></span>
+                </span>
             </div>
         </div>
     </div>
+
+    <div class="form-group required">
+        <label class="col-md-3 control-label">Priority</label>
+        <div class="col-md-6">
+            <select class="form-control notice-priority">
+                <option>Low</option>
+                <option>Normal</option>
+                <option>Hight</option>
+            </select>
+        </div>
+    </div>
 </div>
 
 @stop
 
 @section('scripts')
 @parent
+
+{{ HTML::script('js/moment.js')}}
+{{ HTML::script('js/datetimepicker.js')}}
+{{ HTML::script('js/time-conversion.js')}}
+
 <script>
-   $(".generate-ssh").click( function(){
-        $(".loading-img").removeClass("hide");
-        $.ajax({
-          type: "POST",
-          url: "{{URL::to('/')}}/admin/create-ssh-token"
-        }).success( function( data){
-
-            var tokenJson = data;
-
-            //$(".token-values").html("");
-            $(".generate-ssh").after("<div class='alert alert-success new-token-msg'>New Token has been generated.</div>");
-
-            $(".token-values").prepend("<tr class='alert alert-success'><td>" + tokenJson.token + "</td><td class='public-key'>" + tokenJson.pubkey + "</td>" + "<td><a href=''><span data-token='"+tokenJson.token+"' class='glyphicon glyphicon-trash remove-token'></span></a></td></<tr>");
-            $(".loading-img").addClass("hide");
-            
-            setInterval( function(){
-                $(".new-token-msg").fadeOut();
-            }, 3000);
-        }).fail( function( data){
-        $(".loading-img").addClass("hide");
-
-            failureObject = $.parseJSON( data.responseText);
-            $(".generate-ssh").after("<div class='alert alert-danger'>" + failureObject.error.message + "</div>");
+        $(".create-notice-button").click( function(){
+            $("#create-notice .modal-body").html( $(".notice-form").html());
+            setDateProperties("#create-notice");
+            $("#create-notice").modal( "show");
+        });
+
+        $(".notices-list").on("click", ".update-notice-icon", function(){
+            var noticeData = $(this).parent().data("notice-info");
+            $("#update-notice .modal-body").html( $(".notice-form").html());
+
+            for( var key in noticeData){
+                var formInput = $("#update-notice .notice-" + key);
+                formInput.val( noticeData[key]);
+            }
+            $("#update-notice .notice-publishedtime").val( moment( parseInt( $("#update-notice .notice-publishedtime").val()) ).format('MM/DD/YYYY hh:mm a') );
+            $("#update-notice .notice-expirationTime").val( moment( parseInt( $("#update-notice .notice-expirationTime").val()) ).format('MM/DD/YYYY hh:mm a') );
+            setDateProperties("#update-notice");
+
+            $("#update-notice").modal( "show");
         });
-   });
-
-   $(".remove-token").click( function(){
-        var removeSpan = $(this);
-        var tr = removeSpan.parent().parent();
-        var tokenToRemove = removeSpan.data("token");
-        var publicKey = tr.children(".public-key").html();
-        tr.children(".public-key").html("<div class='alert alert-danger'>Do you really want to remove the token? This action cannot be undone.<br/>" +
-                                                                    "<span class='btn-group'>"+
-                                                                    "<input type='button' class='btn btn-default remove-token-confirmation' value='Yes'/>" +
-                                                                    "<input type='button' class='btn btn-default remove-token-cancel' value='Cancel'/>"+
-                                                                    "</span></div>");
-
-        
-        tr.find( ".remove-token-confirmation").click( function(){
-            $(".loading-img").removeClass("hide");
+
+        //Add notice submit
+        $("body").on("click", ".submit-add-notice-form", function(ev){
+            ev.preventDefault();
+            $(this).html("<img src='{{URL::to('/')}}/assets/ajax-loader.gif'/>");
+            var formData = $("#create-notice .notice-form-values").serialize();
+            formData += "&publishedtime="+ moment( $("#publishedtime").val() ).utc().format('MM/DD/YYYY hh:mm a');
+            formData += "&expirationTime="+ moment( $("#expirationTime").val() ).utc().format('MM/DD/YYYY hh:mm a');
             $.ajax({
-              type: "POST",
-              data:{ "token" : tokenToRemove},
-              url: "{{URL::to('/')}}/admin/remove-ssh-token"
-              }).success( function( data){
-                if( data.responseText == 1)
-                    tr.addClass("alert").addClass("alert-danger");
-                        tr.fadeOut(1000);
-            }).fail( function( data){
-                tr.after("<tr class='alert alert-danger'><td></td><td>Error occurred : " + $.parseJSON( data.responseText).error.message + "</td><td></td></tr>");
+                url: '{{URL::to('/')}}/add-notice',
+                type: "post",
+                data: formData,
+                success: function( data){
+                    var addedNotice = $.parseJSON( data);
+                    $(".notices-list").prepend(
+                        "<tr class='alert alert-success' data-notice-info='" + data + "'>" + updateRow( addedNotice) + "</tr>"
+                    );
+                    $("#create-notice").modal("hide");  
+                },
+                error: function(){
+                    $(".submit-add-notice-form").after("<span alert alert-danger'>An error has occurred. Please try again later.</span>");
+                }
             }).complete( function(){
-                $(".loading-img").addClass("hide");
+                    $(".submit-add-notice-form").html("Submit");
+            });
+        });
 
+        //Update Notice Submit
+        $("body").on("click", ".submit-update-notice-form", function(ev){
+            ev.preventDefault();
+            $(this).html("<img src='{{URL::to('/')}}/assets/ajax-loader.gif'/>");
+            var formData = $("#update-notice .notice-form-values").serialize();
+            formData += "&publishedtime="+ moment( $("#publishedtime").val() ).utc().format('MM/DD/YYYY hh:mm a');
+            formData += "&expirationTime="+ moment( $("#expirationTime").val() ).utc().format('MM/DD/YYYY hh:mm a');
+            $.ajax({
+                url: '{{URL::to('/')}}/update-notice',
+                type: "post",
+                data: formData,
+                success: function( data){
+                    var addedNotice = $.parseJSON( data);
+                    $("#notice-" + $("#update-notice .notice-notificationId").val() ).html(updateRow( addedNotice));
+
+                    $("#notice-" + $("#update-notice .notice-notificationId").val())
+                        .addClass("alert")
+                        .addClass("alert-success")
+                        .data("notice-info", data);
+                    $("#update-notice").modal("hide");  
+                },
+                error: function(){
+                    $(".submit-update-notice-form").after("<span alert alert-danger'>An error has occurred. Please try again later.</span>");
+                }
+            }).complete( function(){
+                    $(".submit-add-notice-form").html("Update");
             });
         });
-        tr.find( ".remove-token-cancel").click( function(){
-            tr.children(".public-key").html( publicKey);
+
+        $(".notices-list").on("click", ".delete-notice-icon", function(){
+            var notice = $(this).parent().data("notice-info");
+            $("#delete-notice .notice-notificationId").val( notice.notificationId);
+            $("#delete-notice .notice-title").html( notice.title);
+            $("#delete-notice").modal("show");
+        });
+
+        //Update Notice Submit
+        $(".delete-notice-submit").click( function(ev){
+            ev.preventDefault();
+            formData = $(".delete-notice-values").serialize();
+
+            $(this).html("<img src='{{URL::to('/')}}/assets/ajax-loader.gif'/>");
+
+            $.ajax({
+                url: '{{URL::to('/')}}/delete-notice',
+                type: "post",
+                data: formData,
+                success: function( data){
+                    if( data == 1){
+                        $("#notice-" +$("#delete-notice .notice-notificationId").val()).fadeOut().remove();
+                    }
+                    else{
+                        $(".delete-notice-submit").after("<span alert alert-danger'>An error has occurred. Please try again later.</span>");
+                    }
+                },
+                error: function(){
+                    $(".submit-update-notice-form").after("<span alert alert-danger'>An error has occurred. Please try again later.</span>");
+                }
+            }).complete( function(){
+                    $(".submit-add-notice-form").html("Update");
+            });
         });
-        
-   });
+
+        function setDateProperties( parent){
+            $( parent + " .datetimepicker9").datetimepicker({
+                pick12HourFormat: false
+            });
+            $( parent + " .datetimepicker10").datetimepicker({
+                pick12HourFormat: false
+            });
+            $( parent + " .datetimepicker9").on("dp.change", function (e) {
+                $( parent + " .datetimepicker10").data("DateTimePicker").setMinDate(e.date);
+
+                //hack to close calendar on selecting date
+                $(this).find(".glyphicon-calendar").click();
+            });
+            $( parent + " .datetimepicker10").on("dp.change", function (e) {
+                $( parent + " .datetimepicker9").data("DateTimePicker").setMaxDate(e.date);
+
+                //hack to close calendar on selecting date
+                $(this).find(".glyphicon-calendar").click();
+            });
+        }
+
+        function updateRow( noticeObject){
+            var row =   "<td>" + noticeObject.title + "</td>" +
+                        "<td>" + noticeObject.notifcationMessage + "</td>" +
+                        "<td class='date'>" + convertTimestamp( noticeObject.publishedtime) + "</td>" +
+                        "<td class='date' unix-time='" + convertTimestamp( noticeObject.expirationTime ) + "'</td>" +
+                        "<td></td>"+
+                        "<td class='update-notice-icon'><span class='glyphicon glyphicon-pencil'></span></td>"+
+                        "<td class='delete-notice-icon'><span class='glyphicon glyphicon-trash'></span></td>";
+            return row;
+        }
 </script>
 @stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2fb0e4c2/app/views/partials/dashboard-block.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/dashboard-block.blade.php b/app/views/partials/dashboard-block.blade.php
index 8fd1758..08740d4 100644
--- a/app/views/partials/dashboard-block.blade.php
+++ b/app/views/partials/dashboard-block.blade.php
@@ -84,7 +84,7 @@
 
         <li
             @if( Session::has("admin-nav") && Session::get("admin-nav") == "credential-store") class="active" @endif>
-            <a class="dashboard-link" href="{{ URL::to('/')}}/admin/dashboard/credential-store"><span class="glyphicon glyphicon-lock"></span>&nbspCredential
+            <a class="dashboard-link" href="{{ URL::to('/')}}/admin/dashboard/credential-store"><span class="glyphicon glyphicon-lock"></span>&nbsp; Credential
                 Store</a>
         </li>
         <li


[2/6] airavata-php-gateway git commit: updating thrift generated files

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/8b67709f/app/libraries/Airavata/Model/Data/Product/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/Data/Product/Types.php b/app/libraries/Airavata/Model/Data/Product/Types.php
new file mode 100644
index 0000000..aa26196
--- /dev/null
+++ b/app/libraries/Airavata/Model/Data/Product/Types.php
@@ -0,0 +1,879 @@
+<?php
+namespace Airavata\Model\Data\Product;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * 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;
+
+
+final class ReplicaLocationCategory {
+  const GATEWAY_DATA_STORE = 0;
+  const COMPUTE_RESOURCE = 1;
+  const LONG_TERM_STORAGE_RESOURCE = 2;
+  const OTHER = 3;
+  static public $__names = array(
+    0 => 'GATEWAY_DATA_STORE',
+    1 => 'COMPUTE_RESOURCE',
+    2 => 'LONG_TERM_STORAGE_RESOURCE',
+    3 => 'OTHER',
+  );
+}
+
+final class ReplicaPersistentType {
+  const TRANSIENT = 0;
+  const PERSISTENT = 1;
+  static public $__names = array(
+    0 => 'TRANSIENT',
+    1 => 'PERSISTENT',
+  );
+}
+
+final class DataProductType {
+  const DIR = 0;
+  const FILE = 1;
+  const COLLECTION = 2;
+  static public $__names = array(
+    0 => 'DIR',
+    1 => 'FILE',
+    2 => 'COLLECTION',
+  );
+}
+
+class DataProductModel {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $productUri = null;
+  /**
+   * @var string
+   */
+  public $gatewayId = null;
+  /**
+   * @var string
+   */
+  public $parentProductUri = null;
+  /**
+   * @var string
+   */
+  public $logicalPath = null;
+  /**
+   * @var string
+   */
+  public $productName = null;
+  /**
+   * @var string
+   */
+  public $productDescription = null;
+  /**
+   * @var string
+   */
+  public $ownerName = null;
+  /**
+   * @var int
+   */
+  public $dataProductType = null;
+  /**
+   * @var int
+   */
+  public $productSize = null;
+  /**
+   * @var int
+   */
+  public $creationTime = null;
+  /**
+   * @var int
+   */
+  public $lastModifiedTime = null;
+  /**
+   * @var array
+   */
+  public $productMetadata = null;
+  /**
+   * @var \Airavata\Model\Data\Product\DataReplicaLocationModel[]
+   */
+  public $replicaLocations = null;
+  /**
+   * @var \Airavata\Model\Data\Product\DataProductModel[]
+   */
+  public $childProducts = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'productUri',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'parentProductUri',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'logicalPath',
+          'type' => TType::STRING,
+          ),
+        5 => array(
+          'var' => 'productName',
+          'type' => TType::STRING,
+          ),
+        6 => array(
+          'var' => 'productDescription',
+          'type' => TType::STRING,
+          ),
+        7 => array(
+          'var' => 'ownerName',
+          'type' => TType::STRING,
+          ),
+        8 => array(
+          'var' => 'dataProductType',
+          'type' => TType::I32,
+          ),
+        9 => array(
+          'var' => 'productSize',
+          'type' => TType::I32,
+          ),
+        10 => array(
+          'var' => 'creationTime',
+          'type' => TType::I64,
+          ),
+        11 => array(
+          'var' => 'lastModifiedTime',
+          'type' => TType::I64,
+          ),
+        12 => array(
+          'var' => 'productMetadata',
+          'type' => TType::MAP,
+          'ktype' => TType::STRING,
+          'vtype' => TType::STRING,
+          'key' => array(
+            'type' => TType::STRING,
+          ),
+          'val' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        13 => array(
+          'var' => 'replicaLocations',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Data\Product\DataReplicaLocationModel',
+            ),
+          ),
+        14 => array(
+          'var' => 'childProducts',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Data\Product\DataProductModel',
+            ),
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['productUri'])) {
+        $this->productUri = $vals['productUri'];
+      }
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
+      if (isset($vals['parentProductUri'])) {
+        $this->parentProductUri = $vals['parentProductUri'];
+      }
+      if (isset($vals['logicalPath'])) {
+        $this->logicalPath = $vals['logicalPath'];
+      }
+      if (isset($vals['productName'])) {
+        $this->productName = $vals['productName'];
+      }
+      if (isset($vals['productDescription'])) {
+        $this->productDescription = $vals['productDescription'];
+      }
+      if (isset($vals['ownerName'])) {
+        $this->ownerName = $vals['ownerName'];
+      }
+      if (isset($vals['dataProductType'])) {
+        $this->dataProductType = $vals['dataProductType'];
+      }
+      if (isset($vals['productSize'])) {
+        $this->productSize = $vals['productSize'];
+      }
+      if (isset($vals['creationTime'])) {
+        $this->creationTime = $vals['creationTime'];
+      }
+      if (isset($vals['lastModifiedTime'])) {
+        $this->lastModifiedTime = $vals['lastModifiedTime'];
+      }
+      if (isset($vals['productMetadata'])) {
+        $this->productMetadata = $vals['productMetadata'];
+      }
+      if (isset($vals['replicaLocations'])) {
+        $this->replicaLocations = $vals['replicaLocations'];
+      }
+      if (isset($vals['childProducts'])) {
+        $this->childProducts = $vals['childProducts'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'DataProductModel';
+  }
+
+  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->productUri);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->parentProductUri);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->logicalPath);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->productName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->productDescription);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->ownerName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->dataProductType);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 9:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->productSize);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 10:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->creationTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 11:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->lastModifiedTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 12:
+          if ($ftype == TType::MAP) {
+            $this->productMetadata = array();
+            $_size0 = 0;
+            $_ktype1 = 0;
+            $_vtype2 = 0;
+            $xfer += $input->readMapBegin($_ktype1, $_vtype2, $_size0);
+            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+            {
+              $key5 = '';
+              $val6 = '';
+              $xfer += $input->readString($key5);
+              $xfer += $input->readString($val6);
+              $this->productMetadata[$key5] = $val6;
+            }
+            $xfer += $input->readMapEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 13:
+          if ($ftype == TType::LST) {
+            $this->replicaLocations = array();
+            $_size7 = 0;
+            $_etype10 = 0;
+            $xfer += $input->readListBegin($_etype10, $_size7);
+            for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
+            {
+              $elem12 = null;
+              $elem12 = new \Airavata\Model\Data\Product\DataReplicaLocationModel();
+              $xfer += $elem12->read($input);
+              $this->replicaLocations []= $elem12;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 14:
+          if ($ftype == TType::LST) {
+            $this->childProducts = array();
+            $_size13 = 0;
+            $_etype16 = 0;
+            $xfer += $input->readListBegin($_etype16, $_size13);
+            for ($_i17 = 0; $_i17 < $_size13; ++$_i17)
+            {
+              $elem18 = null;
+              $elem18 = new \Airavata\Model\Data\Product\DataProductModel();
+              $xfer += $elem18->read($input);
+              $this->childProducts []= $elem18;
+            }
+            $xfer += $input->readListEnd();
+          } 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('DataProductModel');
+    if ($this->productUri !== null) {
+      $xfer += $output->writeFieldBegin('productUri', TType::STRING, 1);
+      $xfer += $output->writeString($this->productUri);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->parentProductUri !== null) {
+      $xfer += $output->writeFieldBegin('parentProductUri', TType::STRING, 3);
+      $xfer += $output->writeString($this->parentProductUri);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->logicalPath !== null) {
+      $xfer += $output->writeFieldBegin('logicalPath', TType::STRING, 4);
+      $xfer += $output->writeString($this->logicalPath);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->productName !== null) {
+      $xfer += $output->writeFieldBegin('productName', TType::STRING, 5);
+      $xfer += $output->writeString($this->productName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->productDescription !== null) {
+      $xfer += $output->writeFieldBegin('productDescription', TType::STRING, 6);
+      $xfer += $output->writeString($this->productDescription);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ownerName !== null) {
+      $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 7);
+      $xfer += $output->writeString($this->ownerName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->dataProductType !== null) {
+      $xfer += $output->writeFieldBegin('dataProductType', TType::I32, 8);
+      $xfer += $output->writeI32($this->dataProductType);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->productSize !== null) {
+      $xfer += $output->writeFieldBegin('productSize', TType::I32, 9);
+      $xfer += $output->writeI32($this->productSize);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->creationTime !== null) {
+      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 10);
+      $xfer += $output->writeI64($this->creationTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->lastModifiedTime !== null) {
+      $xfer += $output->writeFieldBegin('lastModifiedTime', TType::I64, 11);
+      $xfer += $output->writeI64($this->lastModifiedTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->productMetadata !== null) {
+      if (!is_array($this->productMetadata)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('productMetadata', TType::MAP, 12);
+      {
+        $output->writeMapBegin(TType::STRING, TType::STRING, count($this->productMetadata));
+        {
+          foreach ($this->productMetadata as $kiter19 => $viter20)
+          {
+            $xfer += $output->writeString($kiter19);
+            $xfer += $output->writeString($viter20);
+          }
+        }
+        $output->writeMapEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->replicaLocations !== null) {
+      if (!is_array($this->replicaLocations)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('replicaLocations', TType::LST, 13);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->replicaLocations));
+        {
+          foreach ($this->replicaLocations as $iter21)
+          {
+            $xfer += $iter21->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->childProducts !== null) {
+      if (!is_array($this->childProducts)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('childProducts', TType::LST, 14);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->childProducts));
+        {
+          foreach ($this->childProducts as $iter22)
+          {
+            $xfer += $iter22->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class DataReplicaLocationModel {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $replicaId = null;
+  /**
+   * @var string
+   */
+  public $productUri = null;
+  /**
+   * @var string
+   */
+  public $replicaName = null;
+  /**
+   * @var string
+   */
+  public $replicaDescription = null;
+  /**
+   * @var int
+   */
+  public $creationTime = null;
+  /**
+   * @var int
+   */
+  public $lastModifiedTime = null;
+  /**
+   * @var int
+   */
+  public $validUntilTime = null;
+  /**
+   * @var int
+   */
+  public $replicaLocationCategory = null;
+  /**
+   * @var int
+   */
+  public $replicaPersistentType = null;
+  /**
+   * @var string
+   */
+  public $storageResourceId = null;
+  /**
+   * @var string
+   */
+  public $filePath = null;
+  /**
+   * @var array
+   */
+  public $replicaMetadata = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'replicaId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'productUri',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'replicaName',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'replicaDescription',
+          'type' => TType::STRING,
+          ),
+        5 => array(
+          'var' => 'creationTime',
+          'type' => TType::I64,
+          ),
+        6 => array(
+          'var' => 'lastModifiedTime',
+          'type' => TType::I64,
+          ),
+        7 => array(
+          'var' => 'validUntilTime',
+          'type' => TType::I64,
+          ),
+        8 => array(
+          'var' => 'replicaLocationCategory',
+          'type' => TType::I32,
+          ),
+        9 => array(
+          'var' => 'replicaPersistentType',
+          'type' => TType::I32,
+          ),
+        10 => array(
+          'var' => 'storageResourceId',
+          'type' => TType::STRING,
+          ),
+        11 => array(
+          'var' => 'filePath',
+          'type' => TType::STRING,
+          ),
+        12 => array(
+          'var' => 'replicaMetadata',
+          'type' => TType::MAP,
+          'ktype' => TType::STRING,
+          'vtype' => TType::STRING,
+          'key' => array(
+            'type' => TType::STRING,
+          ),
+          'val' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['replicaId'])) {
+        $this->replicaId = $vals['replicaId'];
+      }
+      if (isset($vals['productUri'])) {
+        $this->productUri = $vals['productUri'];
+      }
+      if (isset($vals['replicaName'])) {
+        $this->replicaName = $vals['replicaName'];
+      }
+      if (isset($vals['replicaDescription'])) {
+        $this->replicaDescription = $vals['replicaDescription'];
+      }
+      if (isset($vals['creationTime'])) {
+        $this->creationTime = $vals['creationTime'];
+      }
+      if (isset($vals['lastModifiedTime'])) {
+        $this->lastModifiedTime = $vals['lastModifiedTime'];
+      }
+      if (isset($vals['validUntilTime'])) {
+        $this->validUntilTime = $vals['validUntilTime'];
+      }
+      if (isset($vals['replicaLocationCategory'])) {
+        $this->replicaLocationCategory = $vals['replicaLocationCategory'];
+      }
+      if (isset($vals['replicaPersistentType'])) {
+        $this->replicaPersistentType = $vals['replicaPersistentType'];
+      }
+      if (isset($vals['storageResourceId'])) {
+        $this->storageResourceId = $vals['storageResourceId'];
+      }
+      if (isset($vals['filePath'])) {
+        $this->filePath = $vals['filePath'];
+      }
+      if (isset($vals['replicaMetadata'])) {
+        $this->replicaMetadata = $vals['replicaMetadata'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'DataReplicaLocationModel';
+  }
+
+  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->replicaId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->productUri);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->replicaName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->replicaDescription);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->creationTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->lastModifiedTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->validUntilTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->replicaLocationCategory);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 9:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->replicaPersistentType);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 10:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->storageResourceId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 11:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->filePath);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 12:
+          if ($ftype == TType::MAP) {
+            $this->replicaMetadata = array();
+            $_size23 = 0;
+            $_ktype24 = 0;
+            $_vtype25 = 0;
+            $xfer += $input->readMapBegin($_ktype24, $_vtype25, $_size23);
+            for ($_i27 = 0; $_i27 < $_size23; ++$_i27)
+            {
+              $key28 = '';
+              $val29 = '';
+              $xfer += $input->readString($key28);
+              $xfer += $input->readString($val29);
+              $this->replicaMetadata[$key28] = $val29;
+            }
+            $xfer += $input->readMapEnd();
+          } 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('DataReplicaLocationModel');
+    if ($this->replicaId !== null) {
+      $xfer += $output->writeFieldBegin('replicaId', TType::STRING, 1);
+      $xfer += $output->writeString($this->replicaId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->productUri !== null) {
+      $xfer += $output->writeFieldBegin('productUri', TType::STRING, 2);
+      $xfer += $output->writeString($this->productUri);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->replicaName !== null) {
+      $xfer += $output->writeFieldBegin('replicaName', TType::STRING, 3);
+      $xfer += $output->writeString($this->replicaName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->replicaDescription !== null) {
+      $xfer += $output->writeFieldBegin('replicaDescription', TType::STRING, 4);
+      $xfer += $output->writeString($this->replicaDescription);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->creationTime !== null) {
+      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 5);
+      $xfer += $output->writeI64($this->creationTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->lastModifiedTime !== null) {
+      $xfer += $output->writeFieldBegin('lastModifiedTime', TType::I64, 6);
+      $xfer += $output->writeI64($this->lastModifiedTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->validUntilTime !== null) {
+      $xfer += $output->writeFieldBegin('validUntilTime', TType::I64, 7);
+      $xfer += $output->writeI64($this->validUntilTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->replicaLocationCategory !== null) {
+      $xfer += $output->writeFieldBegin('replicaLocationCategory', TType::I32, 8);
+      $xfer += $output->writeI32($this->replicaLocationCategory);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->replicaPersistentType !== null) {
+      $xfer += $output->writeFieldBegin('replicaPersistentType', TType::I32, 9);
+      $xfer += $output->writeI32($this->replicaPersistentType);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->storageResourceId !== null) {
+      $xfer += $output->writeFieldBegin('storageResourceId', TType::STRING, 10);
+      $xfer += $output->writeString($this->storageResourceId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->filePath !== null) {
+      $xfer += $output->writeFieldBegin('filePath', TType::STRING, 11);
+      $xfer += $output->writeString($this->filePath);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->replicaMetadata !== null) {
+      if (!is_array($this->replicaMetadata)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('replicaMetadata', TType::MAP, 12);
+      {
+        $output->writeMapBegin(TType::STRING, TType::STRING, count($this->replicaMetadata));
+        {
+          foreach ($this->replicaMetadata as $kiter30 => $viter31)
+          {
+            $xfer += $output->writeString($kiter30);
+            $xfer += $output->writeString($viter31);
+          }
+        }
+        $output->writeMapEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/8b67709f/app/libraries/Airavata/Model/Data/Resource/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/Data/Resource/Types.php b/app/libraries/Airavata/Model/Data/Resource/Types.php
new file mode 100644
index 0000000..cd5542a
--- /dev/null
+++ b/app/libraries/Airavata/Model/Data/Resource/Types.php
@@ -0,0 +1,854 @@
+<?php
+namespace Airavata\Model\Data\Resource;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * 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;
+
+
+final class ReplicaLocationCategory {
+  const GATEWAY_DATA_STORE = 0;
+  const COMPUTE_RESOURCE = 1;
+  const LONG_TERM_STORAGE_RESOURCE = 2;
+  const OTHER = 3;
+  static public $__names = array(
+    0 => 'GATEWAY_DATA_STORE',
+    1 => 'COMPUTE_RESOURCE',
+    2 => 'LONG_TERM_STORAGE_RESOURCE',
+    3 => 'OTHER',
+  );
+}
+
+final class ReplicaPersistentType {
+  const TRANSIENT = 0;
+  const PERSISTENT = 1;
+  static public $__names = array(
+    0 => 'TRANSIENT',
+    1 => 'PERSISTENT',
+  );
+}
+
+final class DataResourceType {
+  const COLLECTION = 0;
+  const FILE = 1;
+  static public $__names = array(
+    0 => 'COLLECTION',
+    1 => 'FILE',
+  );
+}
+
+class DataResourceModel {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $resourceId = null;
+  /**
+   * @var string
+   */
+  public $gatewayId = null;
+  /**
+   * @var string
+   */
+  public $parentResourceId = null;
+  /**
+   * @var string
+   */
+  public $resourceName = null;
+  /**
+   * @var string
+   */
+  public $resourceDescription = null;
+  /**
+   * @var string
+   */
+  public $ownerName = null;
+  /**
+   * @var int
+   */
+  public $dataResourceType = null;
+  /**
+   * @var int
+   */
+  public $resourceSize = null;
+  /**
+   * @var int
+   */
+  public $creationTime = null;
+  /**
+   * @var int
+   */
+  public $lastModifiedTime = null;
+  /**
+   * @var array
+   */
+  public $resourceMetadata = null;
+  /**
+   * @var \Airavata\Model\Data\Resource\DataReplicaLocationModel[]
+   */
+  public $replicaLocations = null;
+  /**
+   * @var \Airavata\Model\Data\Resource\DataResourceModel[]
+   */
+  public $childResources = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'resourceId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'parentResourceId',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'resourceName',
+          'type' => TType::STRING,
+          ),
+        5 => array(
+          'var' => 'resourceDescription',
+          'type' => TType::STRING,
+          ),
+        6 => array(
+          'var' => 'ownerName',
+          'type' => TType::STRING,
+          ),
+        7 => array(
+          'var' => 'dataResourceType',
+          'type' => TType::I32,
+          ),
+        8 => array(
+          'var' => 'resourceSize',
+          'type' => TType::I32,
+          ),
+        9 => array(
+          'var' => 'creationTime',
+          'type' => TType::I64,
+          ),
+        10 => array(
+          'var' => 'lastModifiedTime',
+          'type' => TType::I64,
+          ),
+        11 => array(
+          'var' => 'resourceMetadata',
+          'type' => TType::MAP,
+          'ktype' => TType::STRING,
+          'vtype' => TType::STRING,
+          'key' => array(
+            'type' => TType::STRING,
+          ),
+          'val' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        12 => array(
+          'var' => 'replicaLocations',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Data\Resource\DataReplicaLocationModel',
+            ),
+          ),
+        13 => array(
+          'var' => 'childResources',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Data\Resource\DataResourceModel',
+            ),
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['resourceId'])) {
+        $this->resourceId = $vals['resourceId'];
+      }
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
+      if (isset($vals['parentResourceId'])) {
+        $this->parentResourceId = $vals['parentResourceId'];
+      }
+      if (isset($vals['resourceName'])) {
+        $this->resourceName = $vals['resourceName'];
+      }
+      if (isset($vals['resourceDescription'])) {
+        $this->resourceDescription = $vals['resourceDescription'];
+      }
+      if (isset($vals['ownerName'])) {
+        $this->ownerName = $vals['ownerName'];
+      }
+      if (isset($vals['dataResourceType'])) {
+        $this->dataResourceType = $vals['dataResourceType'];
+      }
+      if (isset($vals['resourceSize'])) {
+        $this->resourceSize = $vals['resourceSize'];
+      }
+      if (isset($vals['creationTime'])) {
+        $this->creationTime = $vals['creationTime'];
+      }
+      if (isset($vals['lastModifiedTime'])) {
+        $this->lastModifiedTime = $vals['lastModifiedTime'];
+      }
+      if (isset($vals['resourceMetadata'])) {
+        $this->resourceMetadata = $vals['resourceMetadata'];
+      }
+      if (isset($vals['replicaLocations'])) {
+        $this->replicaLocations = $vals['replicaLocations'];
+      }
+      if (isset($vals['childResources'])) {
+        $this->childResources = $vals['childResources'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'DataResourceModel';
+  }
+
+  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->resourceId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->parentResourceId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->resourceName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->resourceDescription);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->ownerName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->dataResourceType);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->resourceSize);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 9:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->creationTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 10:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->lastModifiedTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 11:
+          if ($ftype == TType::MAP) {
+            $this->resourceMetadata = array();
+            $_size0 = 0;
+            $_ktype1 = 0;
+            $_vtype2 = 0;
+            $xfer += $input->readMapBegin($_ktype1, $_vtype2, $_size0);
+            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+            {
+              $key5 = '';
+              $val6 = '';
+              $xfer += $input->readString($key5);
+              $xfer += $input->readString($val6);
+              $this->resourceMetadata[$key5] = $val6;
+            }
+            $xfer += $input->readMapEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 12:
+          if ($ftype == TType::LST) {
+            $this->replicaLocations = array();
+            $_size7 = 0;
+            $_etype10 = 0;
+            $xfer += $input->readListBegin($_etype10, $_size7);
+            for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
+            {
+              $elem12 = null;
+              $elem12 = new \Airavata\Model\Data\Resource\DataReplicaLocationModel();
+              $xfer += $elem12->read($input);
+              $this->replicaLocations []= $elem12;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 13:
+          if ($ftype == TType::LST) {
+            $this->childResources = array();
+            $_size13 = 0;
+            $_etype16 = 0;
+            $xfer += $input->readListBegin($_etype16, $_size13);
+            for ($_i17 = 0; $_i17 < $_size13; ++$_i17)
+            {
+              $elem18 = null;
+              $elem18 = new \Airavata\Model\Data\Resource\DataResourceModel();
+              $xfer += $elem18->read($input);
+              $this->childResources []= $elem18;
+            }
+            $xfer += $input->readListEnd();
+          } 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('DataResourceModel');
+    if ($this->resourceId !== null) {
+      $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 1);
+      $xfer += $output->writeString($this->resourceId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->parentResourceId !== null) {
+      $xfer += $output->writeFieldBegin('parentResourceId', TType::STRING, 3);
+      $xfer += $output->writeString($this->parentResourceId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->resourceName !== null) {
+      $xfer += $output->writeFieldBegin('resourceName', TType::STRING, 4);
+      $xfer += $output->writeString($this->resourceName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->resourceDescription !== null) {
+      $xfer += $output->writeFieldBegin('resourceDescription', TType::STRING, 5);
+      $xfer += $output->writeString($this->resourceDescription);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ownerName !== null) {
+      $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 6);
+      $xfer += $output->writeString($this->ownerName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->dataResourceType !== null) {
+      $xfer += $output->writeFieldBegin('dataResourceType', TType::I32, 7);
+      $xfer += $output->writeI32($this->dataResourceType);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->resourceSize !== null) {
+      $xfer += $output->writeFieldBegin('resourceSize', TType::I32, 8);
+      $xfer += $output->writeI32($this->resourceSize);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->creationTime !== null) {
+      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 9);
+      $xfer += $output->writeI64($this->creationTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->lastModifiedTime !== null) {
+      $xfer += $output->writeFieldBegin('lastModifiedTime', TType::I64, 10);
+      $xfer += $output->writeI64($this->lastModifiedTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->resourceMetadata !== null) {
+      if (!is_array($this->resourceMetadata)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('resourceMetadata', TType::MAP, 11);
+      {
+        $output->writeMapBegin(TType::STRING, TType::STRING, count($this->resourceMetadata));
+        {
+          foreach ($this->resourceMetadata as $kiter19 => $viter20)
+          {
+            $xfer += $output->writeString($kiter19);
+            $xfer += $output->writeString($viter20);
+          }
+        }
+        $output->writeMapEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->replicaLocations !== null) {
+      if (!is_array($this->replicaLocations)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('replicaLocations', TType::LST, 12);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->replicaLocations));
+        {
+          foreach ($this->replicaLocations as $iter21)
+          {
+            $xfer += $iter21->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->childResources !== null) {
+      if (!is_array($this->childResources)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('childResources', TType::LST, 13);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->childResources));
+        {
+          foreach ($this->childResources as $iter22)
+          {
+            $xfer += $iter22->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class DataReplicaLocationModel {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $replicaId = null;
+  /**
+   * @var string
+   */
+  public $resourceId = null;
+  /**
+   * @var string
+   */
+  public $replicaName = null;
+  /**
+   * @var string
+   */
+  public $replicaDescription = null;
+  /**
+   * @var int
+   */
+  public $creationTime = null;
+  /**
+   * @var int
+   */
+  public $lastModifiedTime = null;
+  /**
+   * @var int
+   */
+  public $validUntilTime = null;
+  /**
+   * @var int
+   */
+  public $replicaLocationCategory = null;
+  /**
+   * @var int
+   */
+  public $replicaPersistentType = null;
+  /**
+   * @var string
+   */
+  public $storageResourceId = null;
+  /**
+   * @var string
+   */
+  public $fileAbsolutePath = null;
+  /**
+   * @var array
+   */
+  public $replicaMetadata = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'replicaId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'resourceId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'replicaName',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'replicaDescription',
+          'type' => TType::STRING,
+          ),
+        5 => array(
+          'var' => 'creationTime',
+          'type' => TType::I64,
+          ),
+        6 => array(
+          'var' => 'lastModifiedTime',
+          'type' => TType::I64,
+          ),
+        7 => array(
+          'var' => 'validUntilTime',
+          'type' => TType::I64,
+          ),
+        8 => array(
+          'var' => 'replicaLocationCategory',
+          'type' => TType::I32,
+          ),
+        9 => array(
+          'var' => 'replicaPersistentType',
+          'type' => TType::I32,
+          ),
+        10 => array(
+          'var' => 'storageResourceId',
+          'type' => TType::STRING,
+          ),
+        11 => array(
+          'var' => 'fileAbsolutePath',
+          'type' => TType::STRING,
+          ),
+        12 => array(
+          'var' => 'replicaMetadata',
+          'type' => TType::MAP,
+          'ktype' => TType::STRING,
+          'vtype' => TType::STRING,
+          'key' => array(
+            'type' => TType::STRING,
+          ),
+          'val' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['replicaId'])) {
+        $this->replicaId = $vals['replicaId'];
+      }
+      if (isset($vals['resourceId'])) {
+        $this->resourceId = $vals['resourceId'];
+      }
+      if (isset($vals['replicaName'])) {
+        $this->replicaName = $vals['replicaName'];
+      }
+      if (isset($vals['replicaDescription'])) {
+        $this->replicaDescription = $vals['replicaDescription'];
+      }
+      if (isset($vals['creationTime'])) {
+        $this->creationTime = $vals['creationTime'];
+      }
+      if (isset($vals['lastModifiedTime'])) {
+        $this->lastModifiedTime = $vals['lastModifiedTime'];
+      }
+      if (isset($vals['validUntilTime'])) {
+        $this->validUntilTime = $vals['validUntilTime'];
+      }
+      if (isset($vals['replicaLocationCategory'])) {
+        $this->replicaLocationCategory = $vals['replicaLocationCategory'];
+      }
+      if (isset($vals['replicaPersistentType'])) {
+        $this->replicaPersistentType = $vals['replicaPersistentType'];
+      }
+      if (isset($vals['storageResourceId'])) {
+        $this->storageResourceId = $vals['storageResourceId'];
+      }
+      if (isset($vals['fileAbsolutePath'])) {
+        $this->fileAbsolutePath = $vals['fileAbsolutePath'];
+      }
+      if (isset($vals['replicaMetadata'])) {
+        $this->replicaMetadata = $vals['replicaMetadata'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'DataReplicaLocationModel';
+  }
+
+  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->replicaId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->resourceId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->replicaName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->replicaDescription);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->creationTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->lastModifiedTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->validUntilTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->replicaLocationCategory);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 9:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->replicaPersistentType);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 10:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->storageResourceId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 11:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->fileAbsolutePath);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 12:
+          if ($ftype == TType::MAP) {
+            $this->replicaMetadata = array();
+            $_size23 = 0;
+            $_ktype24 = 0;
+            $_vtype25 = 0;
+            $xfer += $input->readMapBegin($_ktype24, $_vtype25, $_size23);
+            for ($_i27 = 0; $_i27 < $_size23; ++$_i27)
+            {
+              $key28 = '';
+              $val29 = '';
+              $xfer += $input->readString($key28);
+              $xfer += $input->readString($val29);
+              $this->replicaMetadata[$key28] = $val29;
+            }
+            $xfer += $input->readMapEnd();
+          } 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('DataReplicaLocationModel');
+    if ($this->replicaId !== null) {
+      $xfer += $output->writeFieldBegin('replicaId', TType::STRING, 1);
+      $xfer += $output->writeString($this->replicaId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->resourceId !== null) {
+      $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 2);
+      $xfer += $output->writeString($this->resourceId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->replicaName !== null) {
+      $xfer += $output->writeFieldBegin('replicaName', TType::STRING, 3);
+      $xfer += $output->writeString($this->replicaName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->replicaDescription !== null) {
+      $xfer += $output->writeFieldBegin('replicaDescription', TType::STRING, 4);
+      $xfer += $output->writeString($this->replicaDescription);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->creationTime !== null) {
+      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 5);
+      $xfer += $output->writeI64($this->creationTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->lastModifiedTime !== null) {
+      $xfer += $output->writeFieldBegin('lastModifiedTime', TType::I64, 6);
+      $xfer += $output->writeI64($this->lastModifiedTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->validUntilTime !== null) {
+      $xfer += $output->writeFieldBegin('validUntilTime', TType::I64, 7);
+      $xfer += $output->writeI64($this->validUntilTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->replicaLocationCategory !== null) {
+      $xfer += $output->writeFieldBegin('replicaLocationCategory', TType::I32, 8);
+      $xfer += $output->writeI32($this->replicaLocationCategory);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->replicaPersistentType !== null) {
+      $xfer += $output->writeFieldBegin('replicaPersistentType', TType::I32, 9);
+      $xfer += $output->writeI32($this->replicaPersistentType);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->storageResourceId !== null) {
+      $xfer += $output->writeFieldBegin('storageResourceId', TType::STRING, 10);
+      $xfer += $output->writeString($this->storageResourceId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->fileAbsolutePath !== null) {
+      $xfer += $output->writeFieldBegin('fileAbsolutePath', TType::STRING, 11);
+      $xfer += $output->writeString($this->fileAbsolutePath);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->replicaMetadata !== null) {
+      if (!is_array($this->replicaMetadata)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('replicaMetadata', TType::MAP, 12);
+      {
+        $output->writeMapBegin(TType::STRING, TType::STRING, count($this->replicaMetadata));
+        {
+          foreach ($this->replicaMetadata as $kiter30 => $viter31)
+          {
+            $xfer += $output->writeString($kiter30);
+            $xfer += $output->writeString($viter31);
+          }
+        }
+        $output->writeMapEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/8b67709f/app/libraries/Airavata/Model/Process/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/Process/Types.php b/app/libraries/Airavata/Model/Process/Types.php
index c0000d0..179be2b 100644
--- a/app/libraries/Airavata/Model/Process/Types.php
+++ b/app/libraries/Airavata/Model/Process/Types.php
@@ -117,6 +117,10 @@ class ProcessModel {
    * @var string
    */
   public $experimentDataDir = null;
+  /**
+   * @var string
+   */
+  public $userName = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -231,6 +235,10 @@ class ProcessModel {
           'var' => 'experimentDataDir',
           'type' => TType::STRING,
           ),
+        23 => array(
+          'var' => 'userName',
+          'type' => TType::STRING,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -300,6 +308,9 @@ class ProcessModel {
       if (isset($vals['experimentDataDir'])) {
         $this->experimentDataDir = $vals['experimentDataDir'];
       }
+      if (isset($vals['userName'])) {
+        $this->userName = $vals['userName'];
+      }
     }
   }
 
@@ -522,6 +533,13 @@ class ProcessModel {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 23:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->userName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -702,6 +720,11 @@ class ProcessModel {
       $xfer += $output->writeString($this->experimentDataDir);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->userName !== null) {
+      $xfer += $output->writeFieldBegin('userName', TType::STRING, 23);
+      $xfer += $output->writeString($this->userName);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/8b67709f/app/libraries/Airavata/Model/Scheduling/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/Scheduling/Types.php b/app/libraries/Airavata/Model/Scheduling/Types.php
index 44c1180..9eb8ebb 100644
--- a/app/libraries/Airavata/Model/Scheduling/Types.php
+++ b/app/libraries/Airavata/Model/Scheduling/Types.php
@@ -61,6 +61,18 @@ class ComputationalResourceSchedulingModel {
    * @var string
    */
   public $staticWorkingDir = null;
+  /**
+   * @var string
+   */
+  public $overrideLoginUserName = null;
+  /**
+   * @var string
+   */
+  public $overrideScratchLocation = null;
+  /**
+   * @var string
+   */
+  public $overrideAllocationProjectNumber = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -101,6 +113,18 @@ class ComputationalResourceSchedulingModel {
           'var' => 'staticWorkingDir',
           'type' => TType::STRING,
           ),
+        10 => array(
+          'var' => 'overrideLoginUserName',
+          'type' => TType::STRING,
+          ),
+        11 => array(
+          'var' => 'overrideScratchLocation',
+          'type' => TType::STRING,
+          ),
+        12 => array(
+          'var' => 'overrideAllocationProjectNumber',
+          'type' => TType::STRING,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -131,6 +155,15 @@ class ComputationalResourceSchedulingModel {
       if (isset($vals['staticWorkingDir'])) {
         $this->staticWorkingDir = $vals['staticWorkingDir'];
       }
+      if (isset($vals['overrideLoginUserName'])) {
+        $this->overrideLoginUserName = $vals['overrideLoginUserName'];
+      }
+      if (isset($vals['overrideScratchLocation'])) {
+        $this->overrideScratchLocation = $vals['overrideScratchLocation'];
+      }
+      if (isset($vals['overrideAllocationProjectNumber'])) {
+        $this->overrideAllocationProjectNumber = $vals['overrideAllocationProjectNumber'];
+      }
     }
   }
 
@@ -216,6 +249,27 @@ class ComputationalResourceSchedulingModel {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 10:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->overrideLoginUserName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 11:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->overrideScratchLocation);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 12:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->overrideAllocationProjectNumber);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -274,6 +328,21 @@ class ComputationalResourceSchedulingModel {
       $xfer += $output->writeString($this->staticWorkingDir);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->overrideLoginUserName !== null) {
+      $xfer += $output->writeFieldBegin('overrideLoginUserName', TType::STRING, 10);
+      $xfer += $output->writeString($this->overrideLoginUserName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->overrideScratchLocation !== null) {
+      $xfer += $output->writeFieldBegin('overrideScratchLocation', TType::STRING, 11);
+      $xfer += $output->writeString($this->overrideScratchLocation);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->overrideAllocationProjectNumber !== null) {
+      $xfer += $output->writeFieldBegin('overrideAllocationProjectNumber', TType::STRING, 12);
+      $xfer += $output->writeString($this->overrideAllocationProjectNumber);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/8b67709f/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 6903330..cb7b721 100644
--- a/app/libraries/Airavata/Model/Workspace/Types.php
+++ b/app/libraries/Airavata/Model/Workspace/Types.php
@@ -650,4 +650,194 @@ class Gateway {
 
 }
 
+class Notification {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $notificationId = null;
+  /**
+   * @var string
+   */
+  public $gatewayId = null;
+  /**
+   * @var string
+   */
+  public $title = null;
+  /**
+   * @var string
+   */
+  public $notifcationMessage = null;
+  /**
+   * @var int
+   */
+  public $publishedtime = null;
+  /**
+   * @var int
+   */
+  public $expirationTime = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'notificationId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'title',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'notifcationMessage',
+          'type' => TType::STRING,
+          ),
+        5 => array(
+          'var' => 'publishedtime',
+          'type' => TType::I64,
+          ),
+        6 => array(
+          'var' => 'expirationTime',
+          'type' => TType::I64,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['notificationId'])) {
+        $this->notificationId = $vals['notificationId'];
+      }
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
+      if (isset($vals['title'])) {
+        $this->title = $vals['title'];
+      }
+      if (isset($vals['notifcationMessage'])) {
+        $this->notifcationMessage = $vals['notifcationMessage'];
+      }
+      if (isset($vals['publishedtime'])) {
+        $this->publishedtime = $vals['publishedtime'];
+      }
+      if (isset($vals['expirationTime'])) {
+        $this->expirationTime = $vals['expirationTime'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Notification';
+  }
+
+  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->notificationId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->title);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->notifcationMessage);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->publishedtime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->expirationTime);
+          } 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('Notification');
+    if ($this->notificationId !== null) {
+      $xfer += $output->writeFieldBegin('notificationId', TType::STRING, 1);
+      $xfer += $output->writeString($this->notificationId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->title !== null) {
+      $xfer += $output->writeFieldBegin('title', TType::STRING, 3);
+      $xfer += $output->writeString($this->title);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->notifcationMessage !== null) {
+      $xfer += $output->writeFieldBegin('notifcationMessage', TType::STRING, 4);
+      $xfer += $output->writeString($this->notifcationMessage);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->publishedtime !== null) {
+      $xfer += $output->writeFieldBegin('publishedtime', TType::I64, 5);
+      $xfer += $output->writeI64($this->publishedtime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->expirationTime !== null) {
+      $xfer += $output->writeFieldBegin('expirationTime', TType::I64, 6);
+      $xfer += $output->writeI64($this->expirationTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
 


[5/6] airavata-php-gateway git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/airavata-php-gateway into develop

Posted by sm...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/airavata-php-gateway into develop


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

Branch: refs/heads/master
Commit: 873aec41bbe80f427c63473d08f06950987cbfac
Parents: a14cd91 8b67709
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Tue Apr 26 12:25:40 2016 -0400
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Tue Apr 26 12:25:40 2016 -0400

----------------------------------------------------------------------
 app/libraries/Airavata/API/Airavata.php         | 3062 ++++++++++++++----
 .../Airavata/Model/Data/Product/Types.php       |  879 +++++
 .../Airavata/Model/Data/Resource/Types.php      |  854 +++++
 app/libraries/Airavata/Model/Process/Types.php  |   23 +
 .../Airavata/Model/Scheduling/Types.php         |   69 +
 .../Airavata/Model/Workspace/Types.php          |  190 ++
 6 files changed, 4447 insertions(+), 630 deletions(-)
----------------------------------------------------------------------