You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/08/10 16:54:35 UTC
[1/2] airavata git commit: adding requestCreationTime to gateway
object
Repository: airavata
Updated Branches:
refs/heads/develop 2df4bb2e9 -> 6f1883bf8
adding requestCreationTime to gateway object
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/5521ea6a
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/5521ea6a
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/5521ea6a
Branch: refs/heads/develop
Commit: 5521ea6afabea32a97522ab204ef02167dfad039
Parents: 4157065
Author: scnakandala <su...@gmail.com>
Authored: Wed Aug 10 12:54:25 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Wed Aug 10 12:54:25 2016 -0400
----------------------------------------------------------------------
.../lib/airavata/workspace_model_types.cpp | 22 ++++
.../lib/airavata/workspace_model_types.h | 12 +-
.../lib/Airavata/Model/Workspace/Types.php | 23 ++++
.../apache/airavata/model/workspace/ttypes.py | 15 ++-
.../airavata/model/workspace/Gateway.java | 111 ++++++++++++++++++-
.../catalog/impl/GatewayRegistry.java | 3 +
.../core/experiment/catalog/model/Gateway.java | 11 ++
.../catalog/resources/GatewayResource.java | 12 ++
.../experiment/catalog/resources/Utils.java | 3 +
.../utils/ThriftDataModelConversion.java | 1 +
.../workspace_model.thrift | 3 +-
11 files changed, 208 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/5521ea6a/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 1a3cfb6..0eccc15 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
@@ -745,6 +745,11 @@ void Gateway::__set_oauthClientSecret(const std::string& val) {
__isset.oauthClientSecret = true;
}
+void Gateway::__set_requestCreationTime(const int64_t val) {
+ this->requestCreationTime = val;
+__isset.requestCreationTime = true;
+}
+
uint32_t Gateway::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -906,6 +911,14 @@ uint32_t Gateway::read(::apache::thrift::protocol::TProtocol* iprot) {
xfer += iprot->skip(ftype);
}
break;
+ case 18:
+ if (ftype == ::apache::thrift::protocol::T_I64) {
+ xfer += iprot->readI64(this->requestCreationTime);
+ this->__isset.requestCreationTime = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -1010,6 +1023,11 @@ uint32_t Gateway::write(::apache::thrift::protocol::TProtocol* oprot) const {
xfer += oprot->writeString(this->oauthClientSecret);
xfer += oprot->writeFieldEnd();
}
+ if (this->__isset.requestCreationTime) {
+ xfer += oprot->writeFieldBegin("requestCreationTime", ::apache::thrift::protocol::T_I64, 18);
+ xfer += oprot->writeI64(this->requestCreationTime);
+ xfer += oprot->writeFieldEnd();
+ }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -1034,6 +1052,7 @@ void swap(Gateway &a, Gateway &b) {
swap(a.declinedReason, b.declinedReason);
swap(a.oauthClientId, b.oauthClientId);
swap(a.oauthClientSecret, b.oauthClientSecret);
+ swap(a.requestCreationTime, b.requestCreationTime);
swap(a.__isset, b.__isset);
}
@@ -1055,6 +1074,7 @@ Gateway::Gateway(const Gateway& other19) {
declinedReason = other19.declinedReason;
oauthClientId = other19.oauthClientId;
oauthClientSecret = other19.oauthClientSecret;
+ requestCreationTime = other19.requestCreationTime;
__isset = other19.__isset;
}
Gateway& Gateway::operator=(const Gateway& other20) {
@@ -1075,6 +1095,7 @@ Gateway& Gateway::operator=(const Gateway& other20) {
declinedReason = other20.declinedReason;
oauthClientId = other20.oauthClientId;
oauthClientSecret = other20.oauthClientSecret;
+ requestCreationTime = other20.requestCreationTime;
__isset = other20.__isset;
return *this;
}
@@ -1098,6 +1119,7 @@ void Gateway::printTo(std::ostream& out) const {
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 << ", " << "requestCreationTime="; (__isset.requestCreationTime ? (out << to_string(requestCreationTime)) : (out << "<null>"));
out << ")";
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5521ea6a/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 5582997..e30bb92 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), oauthClientId(false), oauthClientSecret(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), requestCreationTime(false) {}
bool gatewayName :1;
bool domain :1;
bool emailAddress :1;
@@ -314,6 +314,7 @@ typedef struct _Gateway__isset {
bool declinedReason :1;
bool oauthClientId :1;
bool oauthClientSecret :1;
+ bool requestCreationTime :1;
} _Gateway__isset;
class Gateway {
@@ -321,7 +322,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(), oauthClientId(), oauthClientSecret() {
+ Gateway() : gatewayId(), gatewayApprovalStatus((GatewayApprovalStatus::type)0), gatewayName(), domain(), emailAddress(), gatewayAcronym(), gatewayURL(), gatewayPublicAbstract(), reviewProposalDescription(), gatewayAdminFirstName(), gatewayAdminLastName(), gatewayAdminEmail(), identityServerUserName(), identityServerPasswordToken(), declinedReason(), oauthClientId(), oauthClientSecret(), requestCreationTime(0) {
}
virtual ~Gateway() throw();
@@ -342,6 +343,7 @@ class Gateway {
std::string declinedReason;
std::string oauthClientId;
std::string oauthClientSecret;
+ int64_t requestCreationTime;
_Gateway__isset __isset;
@@ -379,6 +381,8 @@ class Gateway {
void __set_oauthClientSecret(const std::string& val);
+ void __set_requestCreationTime(const int64_t val);
+
bool operator == (const Gateway & rhs) const
{
if (!(gatewayId == rhs.gatewayId))
@@ -445,6 +449,10 @@ class Gateway {
return false;
else if (__isset.oauthClientSecret && !(oauthClientSecret == rhs.oauthClientSecret))
return false;
+ if (__isset.requestCreationTime != rhs.__isset.requestCreationTime)
+ return false;
+ else if (__isset.requestCreationTime && !(requestCreationTime == rhs.requestCreationTime))
+ return false;
return true;
}
bool operator != (const Gateway &rhs) const {
http://git-wip-us.apache.org/repos/asf/airavata/blob/5521ea6a/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 b44753f..71a2eca 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
@@ -692,6 +692,10 @@ class Gateway {
* @var string
*/
public $oauthClientSecret = null;
+ /**
+ * @var int
+ */
+ public $requestCreationTime = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -764,6 +768,10 @@ class Gateway {
'var' => 'oauthClientSecret',
'type' => TType::STRING,
),
+ 18 => array(
+ 'var' => 'requestCreationTime',
+ 'type' => TType::I64,
+ ),
);
}
if (is_array($vals)) {
@@ -818,6 +826,9 @@ class Gateway {
if (isset($vals['oauthClientSecret'])) {
$this->oauthClientSecret = $vals['oauthClientSecret'];
}
+ if (isset($vals['requestCreationTime'])) {
+ $this->requestCreationTime = $vals['requestCreationTime'];
+ }
}
}
@@ -959,6 +970,13 @@ class Gateway {
$xfer += $input->skip($ftype);
}
break;
+ case 18:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->requestCreationTime);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -1057,6 +1075,11 @@ class Gateway {
$xfer += $output->writeString($this->oauthClientSecret);
$xfer += $output->writeFieldEnd();
}
+ if ($this->requestCreationTime !== null) {
+ $xfer += $output->writeFieldBegin('requestCreationTime', TType::I64, 18);
+ $xfer += $output->writeI64($this->requestCreationTime);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
http://git-wip-us.apache.org/repos/asf/airavata/blob/5521ea6a/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 f57c44a..77a3116 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
@@ -476,6 +476,7 @@ class Gateway:
- declinedReason
- oauthClientId
- oauthClientSecret
+ - requestCreationTime
"""
thrift_spec = (
@@ -497,9 +498,10 @@ class Gateway:
(15, TType.STRING, 'declinedReason', None, None, ), # 15
(16, TType.STRING, 'oauthClientId', None, None, ), # 16
(17, TType.STRING, 'oauthClientSecret', None, None, ), # 17
+ (18, TType.I64, 'requestCreationTime', None, None, ), # 18
)
- 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,):
+ 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, requestCreationTime=None,):
self.gatewayId = gatewayId
self.gatewayApprovalStatus = gatewayApprovalStatus
self.gatewayName = gatewayName
@@ -517,6 +519,7 @@ class Gateway:
self.declinedReason = declinedReason
self.oauthClientId = oauthClientId
self.oauthClientSecret = oauthClientSecret
+ self.requestCreationTime = requestCreationTime
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:
@@ -612,6 +615,11 @@ class Gateway:
self.oauthClientSecret = iprot.readString()
else:
iprot.skip(ftype)
+ elif fid == 18:
+ if ftype == TType.I64:
+ self.requestCreationTime = iprot.readI64()
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -690,6 +698,10 @@ class Gateway:
oprot.writeFieldBegin('oauthClientSecret', TType.STRING, 17)
oprot.writeString(self.oauthClientSecret)
oprot.writeFieldEnd()
+ if self.requestCreationTime is not None:
+ oprot.writeFieldBegin('requestCreationTime', TType.I64, 18)
+ oprot.writeI64(self.requestCreationTime)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -720,6 +732,7 @@ class Gateway:
value = (value * 31) ^ hash(self.declinedReason)
value = (value * 31) ^ hash(self.oauthClientId)
value = (value * 31) ^ hash(self.oauthClientSecret)
+ value = (value * 31) ^ hash(self.requestCreationTime)
return value
def __repr__(self):
http://git-wip-us.apache.org/repos/asf/airavata/blob/5521ea6a/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 5bf0176..cfe04d3 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
@@ -72,6 +72,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
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 org.apache.thrift.protocol.TField REQUEST_CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("requestCreationTime", org.apache.thrift.protocol.TType.I64, (short)18);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -96,6 +97,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
private String declinedReason; // optional
private String oauthClientId; // optional
private String oauthClientSecret; // optional
+ private long requestCreationTime; // 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 {
@@ -119,7 +121,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
IDENTITY_SERVER_PASSWORD_TOKEN((short)14, "identityServerPasswordToken"),
DECLINED_REASON((short)15, "declinedReason"),
OAUTH_CLIENT_ID((short)16, "oauthClientId"),
- OAUTH_CLIENT_SECRET((short)17, "oauthClientSecret");
+ OAUTH_CLIENT_SECRET((short)17, "oauthClientSecret"),
+ REQUEST_CREATION_TIME((short)18, "requestCreationTime");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -168,6 +171,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
return OAUTH_CLIENT_ID;
case 17: // OAUTH_CLIENT_SECRET
return OAUTH_CLIENT_SECRET;
+ case 18: // REQUEST_CREATION_TIME
+ return REQUEST_CREATION_TIME;
default:
return null;
}
@@ -208,7 +213,9 @@ 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,_Fields.OAUTH_CLIENT_ID,_Fields.OAUTH_CLIENT_SECRET};
+ private static final int __REQUESTCREATIONTIME_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ 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,_Fields.REQUEST_CREATION_TIME};
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);
@@ -246,6 +253,8 @@ 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.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)));
+ tmpMap.put(_Fields.REQUEST_CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("requestCreationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Gateway.class, metaDataMap);
}
@@ -266,6 +275,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
* Performs a deep copy on <i>other</i>.
*/
public Gateway(Gateway other) {
+ __isset_bitfield = other.__isset_bitfield;
if (other.isSetGatewayId()) {
this.gatewayId = other.gatewayId;
}
@@ -317,6 +327,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
if (other.isSetOauthClientSecret()) {
this.oauthClientSecret = other.oauthClientSecret;
}
+ this.requestCreationTime = other.requestCreationTime;
}
public Gateway deepCopy() {
@@ -342,6 +353,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
this.declinedReason = null;
this.oauthClientId = null;
this.oauthClientSecret = null;
+ setRequestCreationTimeIsSet(false);
+ this.requestCreationTime = 0;
}
public String getGatewayId() {
@@ -743,6 +756,28 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
}
}
+ public long getRequestCreationTime() {
+ return this.requestCreationTime;
+ }
+
+ public void setRequestCreationTime(long requestCreationTime) {
+ this.requestCreationTime = requestCreationTime;
+ setRequestCreationTimeIsSet(true);
+ }
+
+ public void unsetRequestCreationTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REQUESTCREATIONTIME_ISSET_ID);
+ }
+
+ /** Returns true if field requestCreationTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetRequestCreationTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __REQUESTCREATIONTIME_ISSET_ID);
+ }
+
+ public void setRequestCreationTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REQUESTCREATIONTIME_ISSET_ID, value);
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case GATEWAY_ID:
@@ -881,6 +916,14 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
}
break;
+ case REQUEST_CREATION_TIME:
+ if (value == null) {
+ unsetRequestCreationTime();
+ } else {
+ setRequestCreationTime((Long)value);
+ }
+ break;
+
}
}
@@ -937,6 +980,9 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
case OAUTH_CLIENT_SECRET:
return getOauthClientSecret();
+ case REQUEST_CREATION_TIME:
+ return getRequestCreationTime();
+
}
throw new IllegalStateException();
}
@@ -982,6 +1028,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
return isSetOauthClientId();
case OAUTH_CLIENT_SECRET:
return isSetOauthClientSecret();
+ case REQUEST_CREATION_TIME:
+ return isSetRequestCreationTime();
}
throw new IllegalStateException();
}
@@ -1152,6 +1200,15 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
return false;
}
+ boolean this_present_requestCreationTime = true && this.isSetRequestCreationTime();
+ boolean that_present_requestCreationTime = true && that.isSetRequestCreationTime();
+ if (this_present_requestCreationTime || that_present_requestCreationTime) {
+ if (!(this_present_requestCreationTime && that_present_requestCreationTime))
+ return false;
+ if (this.requestCreationTime != that.requestCreationTime)
+ return false;
+ }
+
return true;
}
@@ -1244,6 +1301,11 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
if (present_oauthClientSecret)
list.add(oauthClientSecret);
+ boolean present_requestCreationTime = true && (isSetRequestCreationTime());
+ list.add(present_requestCreationTime);
+ if (present_requestCreationTime)
+ list.add(requestCreationTime);
+
return list.hashCode();
}
@@ -1425,6 +1487,16 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetRequestCreationTime()).compareTo(other.isSetRequestCreationTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRequestCreationTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestCreationTime, other.requestCreationTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -1610,6 +1682,12 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
}
first = false;
}
+ if (isSetRequestCreationTime()) {
+ if (!first) sb.append(", ");
+ sb.append("requestCreationTime:");
+ sb.append(this.requestCreationTime);
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -1637,6 +1715,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
@@ -1797,6 +1877,14 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 18: // REQUEST_CREATION_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.requestCreationTime = iprot.readI64();
+ struct.setRequestCreationTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -1925,6 +2013,11 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
oprot.writeFieldEnd();
}
}
+ if (struct.isSetRequestCreationTime()) {
+ oprot.writeFieldBegin(REQUEST_CREATION_TIME_FIELD_DESC);
+ oprot.writeI64(struct.requestCreationTime);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -1990,7 +2083,10 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
if (struct.isSetOauthClientSecret()) {
optionals.set(14);
}
- oprot.writeBitSet(optionals, 15);
+ if (struct.isSetRequestCreationTime()) {
+ optionals.set(15);
+ }
+ oprot.writeBitSet(optionals, 16);
if (struct.isSetGatewayName()) {
oprot.writeString(struct.gatewayName);
}
@@ -2036,6 +2132,9 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
if (struct.isSetOauthClientSecret()) {
oprot.writeString(struct.oauthClientSecret);
}
+ if (struct.isSetRequestCreationTime()) {
+ oprot.writeI64(struct.requestCreationTime);
+ }
}
@Override
@@ -2045,7 +2144,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(15);
+ BitSet incoming = iprot.readBitSet(16);
if (incoming.get(0)) {
struct.gatewayName = iprot.readString();
struct.setGatewayNameIsSet(true);
@@ -2106,6 +2205,10 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
struct.oauthClientSecret = iprot.readString();
struct.setOauthClientSecretIsSet(true);
}
+ if (incoming.get(15)) {
+ struct.requestCreationTime = iprot.readI64();
+ struct.setRequestCreationTimeIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5521ea6a/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 4f081f6..37d8820 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
@@ -32,6 +32,7 @@ import org.apache.airavata.registry.cpi.RegistryException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
@@ -65,6 +66,7 @@ public class GatewayRegistry {
resource.setDeclinedReason(gateway.getDeclinedReason());
resource.setOauthClientId(gateway.getOauthClientId());
resource.setOauthClientSecret(gateway.getOauthClientSecret());
+ resource.setRequestCreationTime(new Timestamp(gateway.getRequestCreationTime()));
resource.save();
return gateway.getGatewayId();
}catch (RegistryException e){
@@ -92,6 +94,7 @@ public class GatewayRegistry {
existingGateway.setDeclinedReason(updatedGateway.getDeclinedReason());
existingGateway.setOauthClientId(updatedGateway.getOauthClientId());
existingGateway.setOauthClientSecret(updatedGateway.getOauthClientSecret());
+ existingGateway.setRequestCreationTime(new Timestamp(updatedGateway.getRequestCreationTime()));
existingGateway.save();
}catch (RegistryException e){
logger.error("Error while updating gateway to registry", e);
http://git-wip-us.apache.org/repos/asf/airavata/blob/5521ea6a/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 1ae1117..e3f4113 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
@@ -24,6 +24,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.persistence.*;
+import java.sql.Timestamp;
import java.util.Collection;
@Entity
@@ -47,6 +48,7 @@ public class Gateway {
private String declinedReason;
private String oauthClientId;
private String getOauthClientSecret;
+ private Timestamp requestCreationTime;
private Collection<GatewayWorker> gatewayWorkers;
private Collection<Project> projects;
@@ -195,6 +197,15 @@ public class Gateway {
this.oauthClientId = oauthClientId;
}
+ @Column(name = "REQUEST_CREATION_TIME")
+ public Timestamp getRequestCreationTime() {
+ return requestCreationTime;
+ }
+
+ public void setRequestCreationTime(Timestamp requestCreationTime) {
+ this.requestCreationTime = requestCreationTime;
+ }
+
@Column(name = "OAUTH_CLIENT_SECRET")
public String getGetOauthClientSecret() {
return getOauthClientSecret;
http://git-wip-us.apache.org/repos/asf/airavata/blob/5521ea6a/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 e940384..54bee96 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
@@ -31,6 +31,7 @@ import org.slf4j.LoggerFactory;
import javax.persistence.EntityManager;
import javax.persistence.Query;
+import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
@@ -54,6 +55,7 @@ public class GatewayResource extends AbstractExpCatResource {
private String declinedReason;
private String oauthClientId;
private String oauthClientSecret;
+ private Timestamp requestCreationTime;
public String getGatewayAdminFirstName() {
return gatewayAdminFirstName;
@@ -175,6 +177,14 @@ public class GatewayResource extends AbstractExpCatResource {
this.oauthClientSecret = oauthClientSecret;
}
+ public Timestamp getRequestCreationTime() {
+ return requestCreationTime;
+ }
+
+ public void setRequestCreationTime(Timestamp requestCreationTime) {
+ this.requestCreationTime = requestCreationTime;
+ }
+
/**
*
* @param gatewayId gateway name
@@ -462,6 +472,7 @@ public class GatewayResource extends AbstractExpCatResource {
gateway.setDeclinedReason(declinedReason);
gateway.setOauthClientId(oauthClientId);
gateway.setGetOauthClientSecret(oauthClientSecret);
+ gateway.setRequestCreationTime(requestCreationTime);
if (existingGateway != null) {
existingGateway.setDomain(domain);
existingGateway.setGatewayApprovalStatus(gatewayApprovalStatus);
@@ -480,6 +491,7 @@ public class GatewayResource extends AbstractExpCatResource {
existingGateway.setDeclinedReason(declinedReason);
existingGateway.setOauthClientId(oauthClientId);
existingGateway.setGetOauthClientSecret(oauthClientSecret);
+ existingGateway.setRequestCreationTime(requestCreationTime);
em.merge(existingGateway);
} else {
em.persist(gateway);
http://git-wip-us.apache.org/repos/asf/airavata/blob/5521ea6a/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 c97d4af..ff5f4e3 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
@@ -358,6 +358,9 @@ public class Utils {
gatewayResource.setIdentityServerPasswordToken(o.getIdentityServerPasswordToken());
gatewayResource.setDeclinedReason(o.getDeclinedReason());
gatewayResource.setOauthClientId(o.getOauthClientId());
+ gatewayResource.setRequestCreationTime(o.getRequestCreationTime());
+ gatewayResource.setRequestCreationTime(o.getRequestCreationTime());
+
gatewayResource.setOauthClientSecret(o.getGetOauthClientSecret());
return gatewayResource;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5521ea6a/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 f890978..72897ee 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
@@ -93,6 +93,7 @@ public class ThriftDataModelConversion {
gateway.setIdentityServerPasswordToken(resource.getIdentityServerPasswordToken());
gateway.setOauthClientId(resource.getOauthClientId());
gateway.setOauthClientSecret(resource.getOauthClientSecret());
+ gateway.setRequestCreationTime(resource.getRequestCreationTime().getTime());
return gateway;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5521ea6a/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 147f3d9..8ece13f 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
@@ -86,7 +86,8 @@ struct Gateway {
14: optional string identityServerPasswordToken,
15: optional string declinedReason,
16: optional string oauthClientId,
- 17: optional string oauthClientSecret
+ 17: optional string oauthClientSecret,
+ 18: optional i64 requestCreationTime
}
enum NotificationPriority {
[2/2] airavata git commit: Merge remote-tracking branch
'origin/develop' into develop
Posted by sc...@apache.org.
Merge remote-tracking branch 'origin/develop' into develop
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/6f1883bf
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/6f1883bf
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/6f1883bf
Branch: refs/heads/develop
Commit: 6f1883bf82eee983cc4135063da55ad7f0f0f178
Parents: 5521ea6 2df4bb2
Author: scnakandala <su...@gmail.com>
Authored: Wed Aug 10 12:54:31 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Wed Aug 10 12:54:31 2016 -0400
----------------------------------------------------------------------
.../airavata/common/utils/ServerSettings.java | 42 +-
.../main/resources/airavata-server.properties | 12 +-
.../apache/airavata/gfac/core/GFacUtils.java | 261 +++++----
.../org/apache/airavata/gfac/impl/Factory.java | 26 +-
.../apache/airavata/gfac/impl/GFacWorker.java | 3 +-
.../airavata/gfac/server/GfacServerHandler.java | 82 +--
.../messaging/client/RabbitMQListener.java | 258 +++++----
.../airavata/messaging/core/Consumer.java | 40 --
.../airavata/messaging/core/MessageHandler.java | 4 +-
.../messaging/core/MessagingConstants.java | 3 +-
.../messaging/core/MessagingFactory.java | 88 +++
.../airavata/messaging/core/Metadata.java | 25 -
.../airavata/messaging/core/Publisher.java | 1 +
.../airavata/messaging/core/Subscriber.java | 58 ++
.../messaging/core/SubscriberProperties.java | 125 ++++
.../airavata/messaging/core/TestClient.java | 56 +-
.../messaging/core/impl/ExperimentConsumer.java | 42 ++
.../messaging/core/impl/ProcessConsumer.java | 114 ++++
.../impl/RabbitMQProcessLaunchConsumer.java | 574 +++++++++----------
.../impl/RabbitMQProcessLaunchPublisher.java | 2 +-
.../core/impl/RabbitMQStatusConsumer.java | 286 ---------
.../core/impl/RabbitMQStatusSubscriber.java | 287 ++++++++++
.../messaging/core/impl/RabbitMQSubscriber.java | 189 ++++++
.../messaging/core/impl/StatusConsumer.java | 143 +++++
.../server/OrchestratorServerHandler.java | 47 +-
.../ExperimentExecution.java | 391 +++++++------
.../workflow/core/WorkflowEnactmentService.java | 60 +-
.../workflow/core/WorkflowInterpreter.java | 21 +-
28 files changed, 1974 insertions(+), 1266 deletions(-)
----------------------------------------------------------------------