airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject airavata git commit: setting placeholders to gateway object to contain oauth client id and client secret
Date Mon, 08 Aug 2016 21:33:38 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop 7666d32c8 -> 610a8d2e3


setting placeholders to gateway object to contain oauth client id and client secret


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

Branch: refs/heads/develop
Commit: 610a8d2e39c815a4256901e80db185f3b81d087f
Parents: 7666d32
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Mon Aug 8 17:33:28 2016 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Mon Aug 8 17:33:28 2016 -0400

----------------------------------------------------------------------
 .../lib/airavata/workspace_model_types.cpp      |  44 ++++
 .../lib/airavata/workspace_model_types.h        |  20 +-
 .../lib/Airavata/Model/Workspace/Types.php      |  46 ++++
 .../apache/airavata/model/workspace/ttypes.py   |  28 ++-
 .../airavata/model/workspace/Gateway.java       | 220 ++++++++++++++++++-
 .../catalog/impl/GatewayRegistry.java           |   4 +
 .../core/experiment/catalog/model/Gateway.java  |  20 ++
 .../catalog/resources/GatewayResource.java      |  22 ++
 .../experiment/catalog/resources/Utils.java     |   2 +
 .../utils/ThriftDataModelConversion.java        |   2 +
 .../workspace_model.thrift                      |   4 +-
 11 files changed, 404 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/610a8d2e/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspace_model_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspace_model_types.cpp
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspace_model_types.cpp
index ab2e6e0..1a3cfb6 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspace_model_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspace_model_types.cpp
@@ -735,6 +735,16 @@ void Gateway::__set_declinedReason(const std::string& val) {
 __isset.declinedReason = true;
 }
 
+void Gateway::__set_oauthClientId(const std::string& val) {
+  this->oauthClientId = val;
+__isset.oauthClientId = true;
+}
+
+void Gateway::__set_oauthClientSecret(const std::string& val) {
+  this->oauthClientSecret = val;
+__isset.oauthClientSecret = true;
+}
+
 uint32_t Gateway::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -880,6 +890,22 @@ uint32_t Gateway::read(::apache::thrift::protocol::TProtocol* iprot)
{
           xfer += iprot->skip(ftype);
         }
         break;
+      case 16:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->oauthClientId);
+          this->__isset.oauthClientId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 17:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->oauthClientSecret);
+          this->__isset.oauthClientSecret = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -974,6 +1000,16 @@ uint32_t Gateway::write(::apache::thrift::protocol::TProtocol* oprot)
const {
     xfer += oprot->writeString(this->declinedReason);
     xfer += oprot->writeFieldEnd();
   }
+  if (this->__isset.oauthClientId) {
+    xfer += oprot->writeFieldBegin("oauthClientId", ::apache::thrift::protocol::T_STRING,
16);
+    xfer += oprot->writeString(this->oauthClientId);
+    xfer += oprot->writeFieldEnd();
+  }
+  if (this->__isset.oauthClientSecret) {
+    xfer += oprot->writeFieldBegin("oauthClientSecret", ::apache::thrift::protocol::T_STRING,
17);
+    xfer += oprot->writeString(this->oauthClientSecret);
+    xfer += oprot->writeFieldEnd();
+  }
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -996,6 +1032,8 @@ void swap(Gateway &a, Gateway &b) {
   swap(a.identityServerUserName, b.identityServerUserName);
   swap(a.identityServerPasswordToken, b.identityServerPasswordToken);
   swap(a.declinedReason, b.declinedReason);
+  swap(a.oauthClientId, b.oauthClientId);
+  swap(a.oauthClientSecret, b.oauthClientSecret);
   swap(a.__isset, b.__isset);
 }
 
@@ -1015,6 +1053,8 @@ Gateway::Gateway(const Gateway& other19) {
   identityServerUserName = other19.identityServerUserName;
   identityServerPasswordToken = other19.identityServerPasswordToken;
   declinedReason = other19.declinedReason;
+  oauthClientId = other19.oauthClientId;
+  oauthClientSecret = other19.oauthClientSecret;
   __isset = other19.__isset;
 }
 Gateway& Gateway::operator=(const Gateway& other20) {
@@ -1033,6 +1073,8 @@ Gateway& Gateway::operator=(const Gateway& other20) {
   identityServerUserName = other20.identityServerUserName;
   identityServerPasswordToken = other20.identityServerPasswordToken;
   declinedReason = other20.declinedReason;
+  oauthClientId = other20.oauthClientId;
+  oauthClientSecret = other20.oauthClientSecret;
   __isset = other20.__isset;
   return *this;
 }
@@ -1054,6 +1096,8 @@ void Gateway::printTo(std::ostream& out) const {
   out << ", " << "identityServerUserName="; (__isset.identityServerUserName ?
(out << to_string(identityServerUserName)) : (out << "<null>"));
   out << ", " << "identityServerPasswordToken="; (__isset.identityServerPasswordToken
? (out << to_string(identityServerPasswordToken)) : (out << "<null>"));
   out << ", " << "declinedReason="; (__isset.declinedReason ? (out << to_string(declinedReason))
: (out << "<null>"));
+  out << ", " << "oauthClientId="; (__isset.oauthClientId ? (out << to_string(oauthClientId))
: (out << "<null>"));
+  out << ", " << "oauthClientSecret="; (__isset.oauthClientSecret ? (out <<
to_string(oauthClientSecret)) : (out << "<null>"));
   out << ")";
 }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/610a8d2e/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspace_model_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspace_model_types.h
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspace_model_types.h
index 3373cdd..5582997 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspace_model_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/workspace_model_types.h
@@ -298,7 +298,7 @@ inline std::ostream& operator<<(std::ostream& out, const
User& obj)
 }
 
 typedef struct _Gateway__isset {
-  _Gateway__isset() : gatewayName(false), domain(false), emailAddress(false), gatewayAcronym(false),
gatewayURL(false), gatewayPublicAbstract(false), reviewProposalDescription(false), gatewayAdminFirstName(false),
gatewayAdminLastName(false), gatewayAdminEmail(false), identityServerUserName(false), identityServerPasswordToken(false),
declinedReason(false) {}
+  _Gateway__isset() : gatewayName(false), domain(false), emailAddress(false), gatewayAcronym(false),
gatewayURL(false), gatewayPublicAbstract(false), reviewProposalDescription(false), gatewayAdminFirstName(false),
gatewayAdminLastName(false), gatewayAdminEmail(false), identityServerUserName(false), identityServerPasswordToken(false),
declinedReason(false), oauthClientId(false), oauthClientSecret(false) {}
   bool gatewayName :1;
   bool domain :1;
   bool emailAddress :1;
@@ -312,6 +312,8 @@ typedef struct _Gateway__isset {
   bool identityServerUserName :1;
   bool identityServerPasswordToken :1;
   bool declinedReason :1;
+  bool oauthClientId :1;
+  bool oauthClientSecret :1;
 } _Gateway__isset;
 
 class Gateway {
@@ -319,7 +321,7 @@ class Gateway {
 
   Gateway(const Gateway&);
   Gateway& operator=(const Gateway&);
-  Gateway() : gatewayId(), gatewayApprovalStatus((GatewayApprovalStatus::type)0), gatewayName(),
domain(), emailAddress(), gatewayAcronym(), gatewayURL(), gatewayPublicAbstract(), reviewProposalDescription(),
gatewayAdminFirstName(), gatewayAdminLastName(), gatewayAdminEmail(), identityServerUserName(),
identityServerPasswordToken(), declinedReason() {
+  Gateway() : gatewayId(), gatewayApprovalStatus((GatewayApprovalStatus::type)0), gatewayName(),
domain(), emailAddress(), gatewayAcronym(), gatewayURL(), gatewayPublicAbstract(), reviewProposalDescription(),
gatewayAdminFirstName(), gatewayAdminLastName(), gatewayAdminEmail(), identityServerUserName(),
identityServerPasswordToken(), declinedReason(), oauthClientId(), oauthClientSecret() {
   }
 
   virtual ~Gateway() throw();
@@ -338,6 +340,8 @@ class Gateway {
   std::string identityServerUserName;
   std::string identityServerPasswordToken;
   std::string declinedReason;
+  std::string oauthClientId;
+  std::string oauthClientSecret;
 
   _Gateway__isset __isset;
 
@@ -371,6 +375,10 @@ class Gateway {
 
   void __set_declinedReason(const std::string& val);
 
+  void __set_oauthClientId(const std::string& val);
+
+  void __set_oauthClientSecret(const std::string& val);
+
   bool operator == (const Gateway & rhs) const
   {
     if (!(gatewayId == rhs.gatewayId))
@@ -429,6 +437,14 @@ class Gateway {
       return false;
     else if (__isset.declinedReason && !(declinedReason == rhs.declinedReason))
       return false;
+    if (__isset.oauthClientId != rhs.__isset.oauthClientId)
+      return false;
+    else if (__isset.oauthClientId && !(oauthClientId == rhs.oauthClientId))
+      return false;
+    if (__isset.oauthClientSecret != rhs.__isset.oauthClientSecret)
+      return false;
+    else if (__isset.oauthClientSecret && !(oauthClientSecret == rhs.oauthClientSecret))
+      return false;
     return true;
   }
   bool operator != (const Gateway &rhs) const {

http://git-wip-us.apache.org/repos/asf/airavata/blob/610a8d2e/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php
index 34f2699..b44753f 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Workspace/Types.php
@@ -684,6 +684,14 @@ class Gateway {
    * @var string
    */
   public $declinedReason = null;
+  /**
+   * @var string
+   */
+  public $oauthClientId = null;
+  /**
+   * @var string
+   */
+  public $oauthClientSecret = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -748,6 +756,14 @@ class Gateway {
           'var' => 'declinedReason',
           'type' => TType::STRING,
           ),
+        16 => array(
+          'var' => 'oauthClientId',
+          'type' => TType::STRING,
+          ),
+        17 => array(
+          'var' => 'oauthClientSecret',
+          'type' => TType::STRING,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -796,6 +812,12 @@ class Gateway {
       if (isset($vals['declinedReason'])) {
         $this->declinedReason = $vals['declinedReason'];
       }
+      if (isset($vals['oauthClientId'])) {
+        $this->oauthClientId = $vals['oauthClientId'];
+      }
+      if (isset($vals['oauthClientSecret'])) {
+        $this->oauthClientSecret = $vals['oauthClientSecret'];
+      }
     }
   }
 
@@ -923,6 +945,20 @@ class Gateway {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 16:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->oauthClientId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 17:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->oauthClientSecret);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -1011,6 +1047,16 @@ class Gateway {
       $xfer += $output->writeString($this->declinedReason);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->oauthClientId !== null) {
+      $xfer += $output->writeFieldBegin('oauthClientId', TType::STRING, 16);
+      $xfer += $output->writeString($this->oauthClientId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->oauthClientSecret !== null) {
+      $xfer += $output->writeFieldBegin('oauthClientSecret', TType::STRING, 17);
+      $xfer += $output->writeString($this->oauthClientSecret);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata/blob/610a8d2e/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/workspace/ttypes.py
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/workspace/ttypes.py
b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/workspace/ttypes.py
index 0f4b7eb..f57c44a 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/workspace/ttypes.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/workspace/ttypes.py
@@ -474,6 +474,8 @@ class Gateway:
    - identityServerUserName
    - identityServerPasswordToken
    - declinedReason
+   - oauthClientId
+   - oauthClientSecret
   """
 
   thrift_spec = (
@@ -493,9 +495,11 @@ class Gateway:
     (13, TType.STRING, 'identityServerUserName', None, None, ), # 13
     (14, TType.STRING, 'identityServerPasswordToken', None, None, ), # 14
     (15, TType.STRING, 'declinedReason', None, None, ), # 15
+    (16, TType.STRING, 'oauthClientId', None, None, ), # 16
+    (17, TType.STRING, 'oauthClientSecret', None, None, ), # 17
   )
 
-  def __init__(self, gatewayId=None, gatewayApprovalStatus=None, gatewayName=None, domain=None,
emailAddress=None, gatewayAcronym=None, gatewayURL=None, gatewayPublicAbstract=None, reviewProposalDescription=None,
gatewayAdminFirstName=None, gatewayAdminLastName=None, gatewayAdminEmail=None, identityServerUserName=None,
identityServerPasswordToken=None, declinedReason=None,):
+  def __init__(self, gatewayId=None, gatewayApprovalStatus=None, gatewayName=None, domain=None,
emailAddress=None, gatewayAcronym=None, gatewayURL=None, gatewayPublicAbstract=None, reviewProposalDescription=None,
gatewayAdminFirstName=None, gatewayAdminLastName=None, gatewayAdminEmail=None, identityServerUserName=None,
identityServerPasswordToken=None, declinedReason=None, oauthClientId=None, oauthClientSecret=None,):
     self.gatewayId = gatewayId
     self.gatewayApprovalStatus = gatewayApprovalStatus
     self.gatewayName = gatewayName
@@ -511,6 +515,8 @@ class Gateway:
     self.identityServerUserName = identityServerUserName
     self.identityServerPasswordToken = identityServerPasswordToken
     self.declinedReason = declinedReason
+    self.oauthClientId = oauthClientId
+    self.oauthClientSecret = oauthClientSecret
 
   def read(self, iprot):
     if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -596,6 +602,16 @@ class Gateway:
           self.declinedReason = iprot.readString()
         else:
           iprot.skip(ftype)
+      elif fid == 16:
+        if ftype == TType.STRING:
+          self.oauthClientId = iprot.readString()
+        else:
+          iprot.skip(ftype)
+      elif fid == 17:
+        if ftype == TType.STRING:
+          self.oauthClientSecret = iprot.readString()
+        else:
+          iprot.skip(ftype)
       else:
         iprot.skip(ftype)
       iprot.readFieldEnd()
@@ -666,6 +682,14 @@ class Gateway:
       oprot.writeFieldBegin('declinedReason', TType.STRING, 15)
       oprot.writeString(self.declinedReason)
       oprot.writeFieldEnd()
+    if self.oauthClientId is not None:
+      oprot.writeFieldBegin('oauthClientId', TType.STRING, 16)
+      oprot.writeString(self.oauthClientId)
+      oprot.writeFieldEnd()
+    if self.oauthClientSecret is not None:
+      oprot.writeFieldBegin('oauthClientSecret', TType.STRING, 17)
+      oprot.writeString(self.oauthClientSecret)
+      oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
 
@@ -694,6 +718,8 @@ class Gateway:
     value = (value * 31) ^ hash(self.identityServerUserName)
     value = (value * 31) ^ hash(self.identityServerPasswordToken)
     value = (value * 31) ^ hash(self.declinedReason)
+    value = (value * 31) ^ hash(self.oauthClientId)
+    value = (value * 31) ^ hash(self.oauthClientSecret)
     return value
 
   def __repr__(self):

http://git-wip-us.apache.org/repos/asf/airavata/blob/610a8d2e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java
b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java
index 34b7778..5bf0176 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/Gateway.java
@@ -70,6 +70,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
   private static final org.apache.thrift.protocol.TField IDENTITY_SERVER_USER_NAME_FIELD_DESC
= new org.apache.thrift.protocol.TField("identityServerUserName", org.apache.thrift.protocol.TType.STRING,
(short)13);
   private static final org.apache.thrift.protocol.TField IDENTITY_SERVER_PASSWORD_TOKEN_FIELD_DESC
= new org.apache.thrift.protocol.TField("identityServerPasswordToken", org.apache.thrift.protocol.TType.STRING,
(short)14);
   private static final org.apache.thrift.protocol.TField DECLINED_REASON_FIELD_DESC = new
org.apache.thrift.protocol.TField("declinedReason", org.apache.thrift.protocol.TType.STRING,
(short)15);
+  private static final org.apache.thrift.protocol.TField OAUTH_CLIENT_ID_FIELD_DESC = new
org.apache.thrift.protocol.TField("oauthClientId", org.apache.thrift.protocol.TType.STRING,
(short)16);
+  private static final org.apache.thrift.protocol.TField OAUTH_CLIENT_SECRET_FIELD_DESC =
new org.apache.thrift.protocol.TField("oauthClientSecret", org.apache.thrift.protocol.TType.STRING,
(short)17);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -92,6 +94,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
   private String identityServerUserName; // optional
   private String identityServerPasswordToken; // optional
   private String declinedReason; // optional
+  private String oauthClientId; // optional
+  private String oauthClientSecret; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -113,7 +117,9 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
     GATEWAY_ADMIN_EMAIL((short)12, "gatewayAdminEmail"),
     IDENTITY_SERVER_USER_NAME((short)13, "identityServerUserName"),
     IDENTITY_SERVER_PASSWORD_TOKEN((short)14, "identityServerPasswordToken"),
-    DECLINED_REASON((short)15, "declinedReason");
+    DECLINED_REASON((short)15, "declinedReason"),
+    OAUTH_CLIENT_ID((short)16, "oauthClientId"),
+    OAUTH_CLIENT_SECRET((short)17, "oauthClientSecret");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -158,6 +164,10 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
           return IDENTITY_SERVER_PASSWORD_TOKEN;
         case 15: // DECLINED_REASON
           return DECLINED_REASON;
+        case 16: // OAUTH_CLIENT_ID
+          return OAUTH_CLIENT_ID;
+        case 17: // OAUTH_CLIENT_SECRET
+          return OAUTH_CLIENT_SECRET;
         default:
           return null;
       }
@@ -198,7 +208,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
   }
 
   // isset id assignments
-  private static final _Fields optionals[] = {_Fields.GATEWAY_NAME,_Fields.DOMAIN,_Fields.EMAIL_ADDRESS,_Fields.GATEWAY_ACRONYM,_Fields.GATEWAY_URL,_Fields.GATEWAY_PUBLIC_ABSTRACT,_Fields.REVIEW_PROPOSAL_DESCRIPTION,_Fields.GATEWAY_ADMIN_FIRST_NAME,_Fields.GATEWAY_ADMIN_LAST_NAME,_Fields.GATEWAY_ADMIN_EMAIL,_Fields.IDENTITY_SERVER_USER_NAME,_Fields.IDENTITY_SERVER_PASSWORD_TOKEN,_Fields.DECLINED_REASON};
+  private static final _Fields optionals[] = {_Fields.GATEWAY_NAME,_Fields.DOMAIN,_Fields.EMAIL_ADDRESS,_Fields.GATEWAY_ACRONYM,_Fields.GATEWAY_URL,_Fields.GATEWAY_PUBLIC_ABSTRACT,_Fields.REVIEW_PROPOSAL_DESCRIPTION,_Fields.GATEWAY_ADMIN_FIRST_NAME,_Fields.GATEWAY_ADMIN_LAST_NAME,_Fields.GATEWAY_ADMIN_EMAIL,_Fields.IDENTITY_SERVER_USER_NAME,_Fields.IDENTITY_SERVER_PASSWORD_TOKEN,_Fields.DECLINED_REASON,_Fields.OAUTH_CLIENT_ID,_Fields.OAUTH_CLIENT_SECRET};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -232,6 +242,10 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.DECLINED_REASON, new org.apache.thrift.meta_data.FieldMetaData("declinedReason",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.OAUTH_CLIENT_ID, new org.apache.thrift.meta_data.FieldMetaData("oauthClientId",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.OAUTH_CLIENT_SECRET, new org.apache.thrift.meta_data.FieldMetaData("oauthClientSecret",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Gateway.class, metaDataMap);
   }
@@ -297,6 +311,12 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
     if (other.isSetDeclinedReason()) {
       this.declinedReason = other.declinedReason;
     }
+    if (other.isSetOauthClientId()) {
+      this.oauthClientId = other.oauthClientId;
+    }
+    if (other.isSetOauthClientSecret()) {
+      this.oauthClientSecret = other.oauthClientSecret;
+    }
   }
 
   public Gateway deepCopy() {
@@ -320,6 +340,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
     this.identityServerUserName = null;
     this.identityServerPasswordToken = null;
     this.declinedReason = null;
+    this.oauthClientId = null;
+    this.oauthClientSecret = null;
   }
 
   public String getGatewayId() {
@@ -675,6 +697,52 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
     }
   }
 
+  public String getOauthClientId() {
+    return this.oauthClientId;
+  }
+
+  public void setOauthClientId(String oauthClientId) {
+    this.oauthClientId = oauthClientId;
+  }
+
+  public void unsetOauthClientId() {
+    this.oauthClientId = null;
+  }
+
+  /** Returns true if field oauthClientId is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetOauthClientId() {
+    return this.oauthClientId != null;
+  }
+
+  public void setOauthClientIdIsSet(boolean value) {
+    if (!value) {
+      this.oauthClientId = null;
+    }
+  }
+
+  public String getOauthClientSecret() {
+    return this.oauthClientSecret;
+  }
+
+  public void setOauthClientSecret(String oauthClientSecret) {
+    this.oauthClientSecret = oauthClientSecret;
+  }
+
+  public void unsetOauthClientSecret() {
+    this.oauthClientSecret = null;
+  }
+
+  /** Returns true if field oauthClientSecret is set (has been assigned a value) and false
otherwise */
+  public boolean isSetOauthClientSecret() {
+    return this.oauthClientSecret != null;
+  }
+
+  public void setOauthClientSecretIsSet(boolean value) {
+    if (!value) {
+      this.oauthClientSecret = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case GATEWAY_ID:
@@ -797,6 +865,22 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
       }
       break;
 
+    case OAUTH_CLIENT_ID:
+      if (value == null) {
+        unsetOauthClientId();
+      } else {
+        setOauthClientId((String)value);
+      }
+      break;
+
+    case OAUTH_CLIENT_SECRET:
+      if (value == null) {
+        unsetOauthClientSecret();
+      } else {
+        setOauthClientSecret((String)value);
+      }
+      break;
+
     }
   }
 
@@ -847,6 +931,12 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
     case DECLINED_REASON:
       return getDeclinedReason();
 
+    case OAUTH_CLIENT_ID:
+      return getOauthClientId();
+
+    case OAUTH_CLIENT_SECRET:
+      return getOauthClientSecret();
+
     }
     throw new IllegalStateException();
   }
@@ -888,6 +978,10 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
       return isSetIdentityServerPasswordToken();
     case DECLINED_REASON:
       return isSetDeclinedReason();
+    case OAUTH_CLIENT_ID:
+      return isSetOauthClientId();
+    case OAUTH_CLIENT_SECRET:
+      return isSetOauthClientSecret();
     }
     throw new IllegalStateException();
   }
@@ -1040,6 +1134,24 @@ public class Gateway implements org.apache.thrift.TBase<Gateway,
Gateway._Fields
         return false;
     }
 
+    boolean this_present_oauthClientId = true && this.isSetOauthClientId();
+    boolean that_present_oauthClientId = true && that.isSetOauthClientId();
+    if (this_present_oauthClientId || that_present_oauthClientId) {
+      if (!(this_present_oauthClientId && that_present_oauthClientId))
+        return false;
+      if (!this.oauthClientId.equals(that.oauthClientId))
+        return false;
+    }
+
+    boolean this_present_oauthClientSecret = true && this.isSetOauthClientSecret();
+    boolean that_present_oauthClientSecret = true && that.isSetOauthClientSecret();
+    if (this_present_oauthClientSecret || that_present_oauthClientSecret) {
+      if (!(this_present_oauthClientSecret && that_present_oauthClientSecret))
+        return false;
+      if (!this.oauthClientSecret.equals(that.oauthClientSecret))
+        return false;
+    }
+
     return true;
   }
 
@@ -1122,6 +1234,16 @@ public class Gateway implements org.apache.thrift.TBase<Gateway,
Gateway._Fields
     if (present_declinedReason)
       list.add(declinedReason);
 
+    boolean present_oauthClientId = true && (isSetOauthClientId());
+    list.add(present_oauthClientId);
+    if (present_oauthClientId)
+      list.add(oauthClientId);
+
+    boolean present_oauthClientSecret = true && (isSetOauthClientSecret());
+    list.add(present_oauthClientSecret);
+    if (present_oauthClientSecret)
+      list.add(oauthClientSecret);
+
     return list.hashCode();
   }
 
@@ -1283,6 +1405,26 @@ public class Gateway implements org.apache.thrift.TBase<Gateway,
Gateway._Fields
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetOauthClientId()).compareTo(other.isSetOauthClientId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetOauthClientId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.oauthClientId, other.oauthClientId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetOauthClientSecret()).compareTo(other.isSetOauthClientSecret());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetOauthClientSecret()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.oauthClientSecret, other.oauthClientSecret);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -1448,6 +1590,26 @@ public class Gateway implements org.apache.thrift.TBase<Gateway,
Gateway._Fields
       }
       first = false;
     }
+    if (isSetOauthClientId()) {
+      if (!first) sb.append(", ");
+      sb.append("oauthClientId:");
+      if (this.oauthClientId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.oauthClientId);
+      }
+      first = false;
+    }
+    if (isSetOauthClientSecret()) {
+      if (!first) sb.append(", ");
+      sb.append("oauthClientSecret:");
+      if (this.oauthClientSecret == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.oauthClientSecret);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -1619,6 +1781,22 @@ public class Gateway implements org.apache.thrift.TBase<Gateway,
Gateway._Fields
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 16: // OAUTH_CLIENT_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.oauthClientId = iprot.readString();
+              struct.setOauthClientIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 17: // OAUTH_CLIENT_SECRET
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.oauthClientSecret = iprot.readString();
+              struct.setOauthClientSecretIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -1733,6 +1911,20 @@ public class Gateway implements org.apache.thrift.TBase<Gateway,
Gateway._Fields
           oprot.writeFieldEnd();
         }
       }
+      if (struct.oauthClientId != null) {
+        if (struct.isSetOauthClientId()) {
+          oprot.writeFieldBegin(OAUTH_CLIENT_ID_FIELD_DESC);
+          oprot.writeString(struct.oauthClientId);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.oauthClientSecret != null) {
+        if (struct.isSetOauthClientSecret()) {
+          oprot.writeFieldBegin(OAUTH_CLIENT_SECRET_FIELD_DESC);
+          oprot.writeString(struct.oauthClientSecret);
+          oprot.writeFieldEnd();
+        }
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -1792,7 +1984,13 @@ public class Gateway implements org.apache.thrift.TBase<Gateway,
Gateway._Fields
       if (struct.isSetDeclinedReason()) {
         optionals.set(12);
       }
-      oprot.writeBitSet(optionals, 13);
+      if (struct.isSetOauthClientId()) {
+        optionals.set(13);
+      }
+      if (struct.isSetOauthClientSecret()) {
+        optionals.set(14);
+      }
+      oprot.writeBitSet(optionals, 15);
       if (struct.isSetGatewayName()) {
         oprot.writeString(struct.gatewayName);
       }
@@ -1832,6 +2030,12 @@ public class Gateway implements org.apache.thrift.TBase<Gateway,
Gateway._Fields
       if (struct.isSetDeclinedReason()) {
         oprot.writeString(struct.declinedReason);
       }
+      if (struct.isSetOauthClientId()) {
+        oprot.writeString(struct.oauthClientId);
+      }
+      if (struct.isSetOauthClientSecret()) {
+        oprot.writeString(struct.oauthClientSecret);
+      }
     }
 
     @Override
@@ -1841,7 +2045,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway,
Gateway._Fields
       struct.setGatewayIdIsSet(true);
       struct.gatewayApprovalStatus = org.apache.airavata.model.workspace.GatewayApprovalStatus.findByValue(iprot.readI32());
       struct.setGatewayApprovalStatusIsSet(true);
-      BitSet incoming = iprot.readBitSet(13);
+      BitSet incoming = iprot.readBitSet(15);
       if (incoming.get(0)) {
         struct.gatewayName = iprot.readString();
         struct.setGatewayNameIsSet(true);
@@ -1894,6 +2098,14 @@ public class Gateway implements org.apache.thrift.TBase<Gateway,
Gateway._Fields
         struct.declinedReason = iprot.readString();
         struct.setDeclinedReasonIsSet(true);
       }
+      if (incoming.get(13)) {
+        struct.oauthClientId = iprot.readString();
+        struct.setOauthClientIdIsSet(true);
+      }
+      if (incoming.get(14)) {
+        struct.oauthClientSecret = iprot.readString();
+        struct.setOauthClientSecretIsSet(true);
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/610a8d2e/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/GatewayRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/GatewayRegistry.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/GatewayRegistry.java
index 5ea914d..4f081f6 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/GatewayRegistry.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/GatewayRegistry.java
@@ -63,6 +63,8 @@ public class GatewayRegistry {
             resource.setIdentityServerUserName(gateway.getIdentityServerUserName());
             resource.setIdentityServerPasswordToken(gateway.getIdentityServerPasswordToken());
             resource.setDeclinedReason(gateway.getDeclinedReason());
+            resource.setOauthClientId(gateway.getOauthClientId());
+            resource.setOauthClientSecret(gateway.getOauthClientSecret());
             resource.save();
             return gateway.getGatewayId();
         }catch (RegistryException e){
@@ -88,6 +90,8 @@ public class GatewayRegistry {
             existingGateway.setIdentityServerUserName(updatedGateway.getIdentityServerUserName());
             existingGateway.setIdentityServerPasswordToken(updatedGateway.getIdentityServerPasswordToken());
             existingGateway.setDeclinedReason(updatedGateway.getDeclinedReason());
+            existingGateway.setOauthClientId(updatedGateway.getOauthClientId());
+            existingGateway.setOauthClientSecret(updatedGateway.getOauthClientSecret());
             existingGateway.save();
         }catch (RegistryException e){
             logger.error("Error while updating gateway to registry", e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/610a8d2e/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Gateway.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Gateway.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Gateway.java
index 6d57388..1ae1117 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Gateway.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Gateway.java
@@ -45,6 +45,8 @@ public class Gateway {
     private String identityServerUserName;
     private String identityServerPasswordToken;
     private String declinedReason;
+    private String oauthClientId;
+    private String getOauthClientSecret;
     private Collection<GatewayWorker> gatewayWorkers;
     private Collection<Project> projects;
 
@@ -184,6 +186,24 @@ public class Gateway {
         this.declinedReason = declinedReason;
     }
 
+    @Column(name = "OAUTH_CLIENT_ID")
+    public String getOauthClientId() {
+        return oauthClientId;
+    }
+
+    public void setOauthClientId(String oauthClientId) {
+        this.oauthClientId = oauthClientId;
+    }
+
+    @Column(name = "OAUTH_CLIENT_SECRET")
+    public String getGetOauthClientSecret() {
+        return getOauthClientSecret;
+    }
+
+    public void setGetOauthClientSecret(String oauthClientSecret) {
+        this.getOauthClientSecret = oauthClientSecret;
+    }
+
     //    @Override
 //    public boolean equals(Object o) {
 //        if (this == o) return true;

http://git-wip-us.apache.org/repos/asf/airavata/blob/610a8d2e/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
index 16081dd..e940384 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/GatewayResource.java
@@ -52,6 +52,8 @@ public class GatewayResource extends AbstractExpCatResource {
     private String identityServerUserName;
     private String identityServerPasswordToken;
     private String declinedReason;
+    private String oauthClientId;
+    private String oauthClientSecret;
 
     public String getGatewayAdminFirstName() {
         return gatewayAdminFirstName;
@@ -157,6 +159,22 @@ public class GatewayResource extends AbstractExpCatResource {
         this.declinedReason = declinedReason;
     }
 
+    public String getOauthClientId() {
+        return oauthClientId;
+    }
+
+    public void setOauthClientId(String oauthClientId) {
+        this.oauthClientId = oauthClientId;
+    }
+
+    public String getOauthClientSecret() {
+        return oauthClientSecret;
+    }
+
+    public void setOauthClientSecret(String oauthClientSecret) {
+        this.oauthClientSecret = oauthClientSecret;
+    }
+
     /**
      *
      * @param gatewayId gateway name
@@ -442,6 +460,8 @@ public class GatewayResource extends AbstractExpCatResource {
             gateway.setIdentityServerUserName(identityServerUserName);
             gateway.setIdentityServerPasswordToken(identityServerPasswordToken);
             gateway.setDeclinedReason(declinedReason);
+            gateway.setOauthClientId(oauthClientId);
+            gateway.setGetOauthClientSecret(oauthClientSecret);
             if (existingGateway != null) {
                 existingGateway.setDomain(domain);
                 existingGateway.setGatewayApprovalStatus(gatewayApprovalStatus);
@@ -458,6 +478,8 @@ public class GatewayResource extends AbstractExpCatResource {
                 existingGateway.setIdentityServerUserName(identityServerUserName);
                 existingGateway.setIdentityServerPasswordToken(identityServerPasswordToken);
                 existingGateway.setDeclinedReason(declinedReason);
+                existingGateway.setOauthClientId(oauthClientId);
+                existingGateway.setGetOauthClientSecret(oauthClientSecret);
                 em.merge(existingGateway);
             } else {
                 em.persist(gateway);

http://git-wip-us.apache.org/repos/asf/airavata/blob/610a8d2e/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
index e7b70f5..c97d4af 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
@@ -357,6 +357,8 @@ public class Utils {
         gatewayResource.setIdentityServerUserName(o.getIdentityServerUserName());
         gatewayResource.setIdentityServerPasswordToken(o.getIdentityServerPasswordToken());
         gatewayResource.setDeclinedReason(o.getDeclinedReason());
+        gatewayResource.setOauthClientId(o.getOauthClientId());
+        gatewayResource.setOauthClientSecret(o.getGetOauthClientSecret());
         return gatewayResource;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/610a8d2e/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
index 2581832..f890978 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
@@ -91,6 +91,8 @@ public class ThriftDataModelConversion {
         gateway.setGatewayAdminEmail(resource.getGatewayAdminEmail());
         gateway.setIdentityServerUserName(resource.getIdentityServerUserName());
         gateway.setIdentityServerPasswordToken(resource.getIdentityServerPasswordToken());
+        gateway.setOauthClientId(resource.getOauthClientId());
+        gateway.setOauthClientSecret(resource.getOauthClientSecret());
         return gateway;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/610a8d2e/thrift-interface-descriptions/data-models/experiment-catalog-models/workspace_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/experiment-catalog-models/workspace_model.thrift
b/thrift-interface-descriptions/data-models/experiment-catalog-models/workspace_model.thrift
index f0fa834..147f3d9 100644
--- a/thrift-interface-descriptions/data-models/experiment-catalog-models/workspace_model.thrift
+++ b/thrift-interface-descriptions/data-models/experiment-catalog-models/workspace_model.thrift
@@ -84,7 +84,9 @@ struct Gateway {
     12: optional string gatewayAdminEmail,
     13: optional string identityServerUserName,
     14: optional string identityServerPasswordToken,
-    15: optional string declinedReason
+    15: optional string declinedReason,
+    16: optional string oauthClientId,
+    17: optional string oauthClientSecret
 }
 
 enum NotificationPriority {


Mime
View raw message