This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/develop by this push:
new 9d6d37d Removing authz check from getAPIVersion
9d6d37d is described below
commit 9d6d37dd0f4f0f97f317a357ab602afef04b9cb6
Author: Marcus Christie <machristie@apache.org>
AuthorDate: Fri Jan 11 16:21:05 2019 -0500
Removing authz check from getAPIVersion
---
.../api/server/handler/AiravataServerHandler.java | 5 +-
.../java/org/apache/airavata/api/Airavata.java | 265 +------
.../resources/lib/airavata/api/Airavata-remote | 8 +-
.../main/resources/lib/airavata/api/Airavata.py | 58 +-
.../groupmanager/cpi/GroupManagerService-remote | 9 +-
.../groupmanager/cpi/GroupManagerService.py | 168 ++++
.../iam/admin/services/cpi/IamAdminServices-remote | 8 +-
.../iam/admin/services/cpi/IamAdminServices.py | 60 +-
.../profile/tenant/cpi/TenantProfileService-remote | 8 +-
.../profile/tenant/cpi/TenantProfileService.py | 60 +-
.../profile/user/cpi/UserProfileService-remote | 9 +-
.../service/profile/user/cpi/UserProfileService.py | 168 ++++
.../handlers/GroupManagerServiceHandler.java | 6 +
.../profile/handlers/IamAdminServicesHandler.java | 11 +-
.../handlers/TenantProfileServiceHandler.java | 12 +-
.../handlers/UserProfileServiceHandler.java | 6 +
.../groupmanager/cpi/GroupManagerService.java | 867 +++++++++++++++++++++
.../iam/admin/services/cpi/IamAdminServices.java | 263 +------
.../profile/tenant/cpi/TenantProfileService.java | 263 +------
.../profile/user/cpi/UserProfileService.java | 867 +++++++++++++++++++++
.../airavata-apis/airavata_api.thrift | 5 +-
.../group-manager/group-manager-cpi.thrift | 3 +
.../iam-admin-services-cpi.thrift | 6 +-
.../profile-tenant/profile-tenant-cpi.thrift | 5 +-
.../profile-user/profile-user-cpi.thrift | 3 +
25 files changed, 2198 insertions(+), 945 deletions(-)
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
index 9a3e086..10ff636 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
@@ -280,9 +280,8 @@ public class AiravataServerHandler implements Airavata.Iface {
* Query Airavata to fetch the API version
*/
@Override
- @SecurityCheck
- public String getAPIVersion(AuthzToken authzToken) throws InvalidRequestException, AiravataClientException,
- AiravataSystemException, AuthorizationException, TException {
+ public String getAPIVersion() throws InvalidRequestException, AiravataClientException,
+ AiravataSystemException, TException {
return airavata_apiConstants.AIRAVATA_API_VERSION;
}
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
index 7bfbf6c..abf5c8e 100644
--- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
@@ -32,10 +32,8 @@ public class Airavata {
/**
* Fetch Apache Airavata API version
*
- *
- * @param authzToken
*/
- public java.lang.String getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+ public java.lang.String getAPIVersion() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
/**
* Verify if User Exists within Airavata.
@@ -3008,7 +3006,7 @@ public class Airavata {
public interface AsyncIface {
- public void getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
+ public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
public void isUserExists(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String gatewayId, java.lang.String userName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
@@ -3410,20 +3408,19 @@ public class Airavata {
super(iprot, oprot);
}
- public java.lang.String getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+ public java.lang.String getAPIVersion() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
{
- send_getAPIVersion(authzToken);
+ send_getAPIVersion();
return recv_getAPIVersion();
}
- public void send_getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.thrift.TException
+ public void send_getAPIVersion() throws org.apache.thrift.TException
{
getAPIVersion_args args = new getAPIVersion_args();
- args.setAuthzToken(authzToken);
sendBase("getAPIVersion", args);
}
- public java.lang.String recv_getAPIVersion() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+ public java.lang.String recv_getAPIVersion() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
{
getAPIVersion_result result = new getAPIVersion_result();
receiveBase(result, "getAPIVersion");
@@ -3439,9 +3436,6 @@ public class Airavata {
if (result.ase != null) {
throw result.ase;
}
- if (result.ae != null) {
- throw result.ae;
- }
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAPIVersion failed: unknown result");
}
@@ -10417,29 +10411,26 @@ public class Airavata {
super(protocolFactory, clientManager, transport);
}
- public void getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
+ public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
- getAPIVersion_call method_call = new getAPIVersion_call(authzToken, resultHandler, this, ___protocolFactory, ___transport);
+ getAPIVersion_call method_call = new getAPIVersion_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getAPIVersion_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
- private org.apache.airavata.model.security.AuthzToken authzToken;
- public getAPIVersion_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public getAPIVersion_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
- this.authzToken = authzToken;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAPIVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
getAPIVersion_args args = new getAPIVersion_args();
- args.setAuthzToken(authzToken);
args.write(prot);
prot.writeMessageEnd();
}
- public java.lang.String getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
+ public java.lang.String getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
@@ -17700,15 +17691,13 @@ public class Airavata {
public getAPIVersion_result getResult(I iface, getAPIVersion_args args) throws org.apache.thrift.TException {
getAPIVersion_result result = new getAPIVersion_result();
try {
- result.success = iface.getAPIVersion(args.authzToken);
+ result.success = iface.getAPIVersion();
} catch (org.apache.airavata.model.error.InvalidRequestException ire) {
result.ire = ire;
} catch (org.apache.airavata.model.error.AiravataClientException ace) {
result.ace = ace;
} catch (org.apache.airavata.model.error.AiravataSystemException ase) {
result.ase = ase;
- } catch (org.apache.airavata.model.error.AuthorizationException ae) {
- result.ae = ae;
}
return result;
}
@@ -23721,10 +23710,6 @@ public class Airavata {
result.ase = (org.apache.airavata.model.error.AiravataSystemException) e;
result.setAseIsSet(true);
msg = result;
- } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
- result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
- result.setAeIsSet(true);
- msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
@@ -23753,7 +23738,7 @@ public class Airavata {
}
public void start(I iface, getAPIVersion_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
- iface.getAPIVersion(args.authzToken,resultHandler);
+ iface.getAPIVersion(resultHandler);
}
}
@@ -38420,16 +38405,14 @@ public class Airavata {
public static class getAPIVersion_args implements org.apache.thrift.TBase<getAPIVersion_args, getAPIVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_args");
- private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAPIVersion_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAPIVersion_argsTupleSchemeFactory();
- public org.apache.airavata.model.security.AuthzToken authzToken; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- AUTHZ_TOKEN((short)1, "authzToken");
+;
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -38444,8 +38427,6 @@ public class Airavata {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // AUTHZ_TOKEN
- return AUTHZ_TOKEN;
default:
return null;
}
@@ -38484,13 +38465,9 @@ public class Airavata {
return _fieldName;
}
}
-
- // isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap);
}
@@ -38498,20 +38475,10 @@ public class Airavata {
public getAPIVersion_args() {
}
- public getAPIVersion_args(
- org.apache.airavata.model.security.AuthzToken authzToken)
- {
- this();
- this.authzToken = authzToken;
- }
-
/**
* Performs a deep copy on <i>other</i>.
*/
public getAPIVersion_args(getAPIVersion_args other) {
- if (other.isSetAuthzToken()) {
- this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
- }
}
public getAPIVersion_args deepCopy() {
@@ -38520,51 +38487,15 @@ public class Airavata {
@Override
public void clear() {
- this.authzToken = null;
- }
-
- public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
- return this.authzToken;
- }
-
- public getAPIVersion_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
- this.authzToken = authzToken;
- return this;
- }
-
- public void unsetAuthzToken() {
- this.authzToken = null;
- }
-
- /** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
- public boolean isSetAuthzToken() {
- return this.authzToken != null;
- }
-
- public void setAuthzTokenIsSet(boolean value) {
- if (!value) {
- this.authzToken = null;
- }
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
- case AUTHZ_TOKEN:
- if (value == null) {
- unsetAuthzToken();
- } else {
- setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
- }
- break;
-
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case AUTHZ_TOKEN:
- return getAuthzToken();
-
}
throw new java.lang.IllegalStateException();
}
@@ -38576,8 +38507,6 @@ public class Airavata {
}
switch (field) {
- case AUTHZ_TOKEN:
- return isSetAuthzToken();
}
throw new java.lang.IllegalStateException();
}
@@ -38597,15 +38526,6 @@ public class Airavata {
if (this == that)
return true;
- boolean this_present_authzToken = true && this.isSetAuthzToken();
- boolean that_present_authzToken = true && that.isSetAuthzToken();
- if (this_present_authzToken || that_present_authzToken) {
- if (!(this_present_authzToken && that_present_authzToken))
- return false;
- if (!this.authzToken.equals(that.authzToken))
- return false;
- }
-
return true;
}
@@ -38613,10 +38533,6 @@ public class Airavata {
public int hashCode() {
int hashCode = 1;
- hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
- if (isSetAuthzToken())
- hashCode = hashCode * 8191 + authzToken.hashCode();
-
return hashCode;
}
@@ -38628,16 +38544,6 @@ public class Airavata {
int lastComparison = 0;
- lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAuthzToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
return 0;
}
@@ -38658,26 +38564,13 @@ public class Airavata {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getAPIVersion_args(");
boolean first = true;
- sb.append("authzToken:");
- if (this.authzToken == null) {
- sb.append("null");
- } else {
- sb.append(this.authzToken);
- }
- first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
- if (authzToken == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
- }
// check for sub-struct validity
- if (authzToken != null) {
- authzToken.validate();
- }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -38714,15 +38607,6 @@ public class Airavata {
break;
}
switch (schemeField.id) {
- case 1: // AUTHZ_TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
- struct.authzToken.read(iprot);
- struct.setAuthzTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -38738,11 +38622,6 @@ public class Airavata {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (struct.authzToken != null) {
- oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
- struct.authzToken.write(oprot);
- oprot.writeFieldEnd();
- }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -38760,15 +38639,11 @@ public class Airavata {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
- struct.authzToken.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
- struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
- struct.authzToken.read(iprot);
- struct.setAuthzTokenIsSet(true);
}
}
@@ -38784,7 +38659,6 @@ public class Airavata {
private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField ACE_FIELD_DESC = new org.apache.thrift.protocol.TField("ace", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField ASE_FIELD_DESC = new org.apache.thrift.protocol.TField("ase", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAPIVersion_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAPIVersion_resultTupleSchemeFactory();
@@ -38793,15 +38667,13 @@ public class Airavata {
public org.apache.airavata.model.error.InvalidRequestException ire; // required
public org.apache.airavata.model.error.AiravataClientException ace; // required
public org.apache.airavata.model.error.AiravataSystemException ase; // required
- public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
IRE((short)1, "ire"),
ACE((short)2, "ace"),
- ASE((short)3, "ase"),
- AE((short)4, "ae");
+ ASE((short)3, "ase");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -38824,8 +38696,6 @@ public class Airavata {
return ACE;
case 3: // ASE
return ASE;
- case 4: // AE
- return AE;
default:
return null;
}
@@ -38877,8 +38747,6 @@ public class Airavata {
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AiravataClientException.class)));
tmpMap.put(_Fields.ASE, new org.apache.thrift.meta_data.FieldMetaData("ase", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AiravataSystemException.class)));
- tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_result.class, metaDataMap);
}
@@ -38890,15 +38758,13 @@ public class Airavata {
java.lang.String success,
org.apache.airavata.model.error.InvalidRequestException ire,
org.apache.airavata.model.error.AiravataClientException ace,
- org.apache.airavata.model.error.AiravataSystemException ase,
- org.apache.airavata.model.error.AuthorizationException ae)
+ org.apache.airavata.model.error.AiravataSystemException ase)
{
this();
this.success = success;
this.ire = ire;
this.ace = ace;
this.ase = ase;
- this.ae = ae;
}
/**
@@ -38917,9 +38783,6 @@ public class Airavata {
if (other.isSetAse()) {
this.ase = new org.apache.airavata.model.error.AiravataSystemException(other.ase);
}
- if (other.isSetAe()) {
- this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
- }
}
public getAPIVersion_result deepCopy() {
@@ -38932,7 +38795,6 @@ public class Airavata {
this.ire = null;
this.ace = null;
this.ase = null;
- this.ae = null;
}
public java.lang.String getSuccess() {
@@ -39031,30 +38893,6 @@ public class Airavata {
}
}
- public org.apache.airavata.model.error.AuthorizationException getAe() {
- return this.ae;
- }
-
- public getAPIVersion_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
- this.ae = ae;
- return this;
- }
-
- public void unsetAe() {
- this.ae = null;
- }
-
- /** Returns true if field ae is set (has been assigned a value) and false otherwise */
- public boolean isSetAe() {
- return this.ae != null;
- }
-
- public void setAeIsSet(boolean value) {
- if (!value) {
- this.ae = null;
- }
- }
-
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
@@ -39089,14 +38927,6 @@ public class Airavata {
}
break;
- case AE:
- if (value == null) {
- unsetAe();
- } else {
- setAe((org.apache.airavata.model.error.AuthorizationException)value);
- }
- break;
-
}
}
@@ -39114,9 +38944,6 @@ public class Airavata {
case ASE:
return getAse();
- case AE:
- return getAe();
-
}
throw new java.lang.IllegalStateException();
}
@@ -39136,8 +38963,6 @@ public class Airavata {
return isSetAce();
case ASE:
return isSetAse();
- case AE:
- return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@@ -39193,15 +39018,6 @@ public class Airavata {
return false;
}
- boolean this_present_ae = true && this.isSetAe();
- boolean that_present_ae = true && that.isSetAe();
- if (this_present_ae || that_present_ae) {
- if (!(this_present_ae && that_present_ae))
- return false;
- if (!this.ae.equals(that.ae))
- return false;
- }
-
return true;
}
@@ -39225,10 +39041,6 @@ public class Airavata {
if (isSetAse())
hashCode = hashCode * 8191 + ase.hashCode();
- hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
- if (isSetAe())
- hashCode = hashCode * 8191 + ae.hashCode();
-
return hashCode;
}
@@ -39280,16 +39092,6 @@ public class Airavata {
return lastComparison;
}
}
- lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAe()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
return 0;
}
@@ -39341,14 +39143,6 @@ public class Airavata {
sb.append(this.ase);
}
first = false;
- if (!first) sb.append(", ");
- sb.append("ae:");
- if (this.ae == null) {
- sb.append("null");
- } else {
- sb.append(this.ae);
- }
- first = false;
sb.append(")");
return sb.toString();
}
@@ -39427,15 +39221,6 @@ public class Airavata {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 4: // AE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.ae = new org.apache.airavata.model.error.AuthorizationException();
- struct.ae.read(iprot);
- struct.setAeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -39471,11 +39256,6 @@ public class Airavata {
struct.ase.write(oprot);
oprot.writeFieldEnd();
}
- if (struct.ae != null) {
- oprot.writeFieldBegin(AE_FIELD_DESC);
- struct.ae.write(oprot);
- oprot.writeFieldEnd();
- }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -39506,10 +39286,7 @@ public class Airavata {
if (struct.isSetAse()) {
optionals.set(3);
}
- if (struct.isSetAe()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
+ oprot.writeBitSet(optionals, 4);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
@@ -39522,15 +39299,12 @@ public class Airavata {
if (struct.isSetAse()) {
struct.ase.write(oprot);
}
- if (struct.isSetAe()) {
- struct.ae.write(oprot);
- }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(5);
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
@@ -39550,11 +39324,6 @@ public class Airavata {
struct.ase.read(iprot);
struct.setAseIsSet(true);
}
- if (incoming.get(4)) {
- struct.ae = new org.apache.airavata.model.error.AuthorizationException();
- struct.ae.read(iprot);
- struct.setAeIsSet(true);
- }
}
}
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/api/Airavata-remote b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/api/Airavata-remote
index 77d0221..9ff7ab4 100755
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/api/Airavata-remote
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/api/Airavata-remote
@@ -24,7 +24,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
print('')
print('Functions:')
- print(' string getAPIVersion(AuthzToken authzToken)')
+ print(' string getAPIVersion()')
print(' bool isUserExists(AuthzToken authzToken, string gatewayId, string userName)')
print(' string addGateway(AuthzToken authzToken, Gateway gateway)')
print(' getAllUsersInGateway(AuthzToken authzToken, string gatewayId)')
@@ -294,10 +294,10 @@ client = Airavata.Client(protocol)
transport.open()
if cmd == 'getAPIVersion':
- if len(args) != 1:
- print('getAPIVersion requires 1 args')
+ if len(args) != 0:
+ print('getAPIVersion requires 0 args')
sys.exit(1)
- pp.pprint(client.getAPIVersion(eval(args[0]),))
+ pp.pprint(client.getAPIVersion())
elif cmd == 'isUserExists':
if len(args) != 3:
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/api/Airavata.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/api/Airavata.py
index 03ec907..be91e70 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/api/Airavata.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/api/Airavata.py
@@ -16,13 +16,10 @@ from thrift.transport import TTransport
class Iface(object):
- def getAPIVersion(self, authzToken):
+ def getAPIVersion(self):
"""
Fetch Apache Airavata API version
-
- Parameters:
- - authzToken
"""
pass
@@ -3591,21 +3588,17 @@ class Client(Iface):
self._oprot = oprot
self._seqid = 0
- def getAPIVersion(self, authzToken):
+ def getAPIVersion(self):
"""
Fetch Apache Airavata API version
-
- Parameters:
- - authzToken
"""
- self.send_getAPIVersion(authzToken)
+ self.send_getAPIVersion()
return self.recv_getAPIVersion()
- def send_getAPIVersion(self, authzToken):
+ def send_getAPIVersion(self):
self._oprot.writeMessageBegin('getAPIVersion', TMessageType.CALL, self._seqid)
args = getAPIVersion_args()
- args.authzToken = authzToken
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
@@ -3629,8 +3622,6 @@ class Client(Iface):
raise result.ace
if result.ase is not None:
raise result.ase
- if result.ae is not None:
- raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "getAPIVersion failed: unknown result")
def isUserExists(self, authzToken, gatewayId, userName):
@@ -13790,7 +13781,7 @@ class Processor(Iface, TProcessor):
iprot.readMessageEnd()
result = getAPIVersion_result()
try:
- result.success = self._handler.getAPIVersion(args.authzToken)
+ result.success = self._handler.getAPIVersion()
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
@@ -13803,9 +13794,6 @@ class Processor(Iface, TProcessor):
except airavata.api.error.ttypes.AiravataSystemException as ase:
msg_type = TMessageType.REPLY
result.ase = ase
- except airavata.api.error.ttypes.AuthorizationException as ae:
- msg_type = TMessageType.REPLY
- result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
@@ -19711,19 +19699,10 @@ class Processor(Iface, TProcessor):
class getAPIVersion_args(object):
- """
- Attributes:
- - authzToken
- """
thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
)
- def __init__(self, authzToken=None,):
- self.authzToken = authzToken
-
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
@@ -19733,12 +19712,6 @@ class getAPIVersion_args(object):
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.authzToken = airavata.model.security.ttypes.AuthzToken()
- self.authzToken.read(iprot)
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -19749,16 +19722,10 @@ class getAPIVersion_args(object):
oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('getAPIVersion_args')
- if self.authzToken is not None:
- oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
- self.authzToken.write(oprot)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
- if self.authzToken is None:
- raise TProtocolException(message='Required field authzToken is unset!')
return
def __repr__(self):
@@ -19780,7 +19747,6 @@ class getAPIVersion_result(object):
- ire
- ace
- ase
- - ae
"""
thrift_spec = (
@@ -19788,15 +19754,13 @@ class getAPIVersion_result(object):
(1, TType.STRUCT, 'ire', (airavata.api.error.ttypes.InvalidRequestException, airavata.api.error.ttypes.InvalidRequestException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ace', (airavata.api.error.ttypes.AiravataClientException, airavata.api.error.ttypes.AiravataClientException.thrift_spec), None, ), # 2
(3, TType.STRUCT, 'ase', (airavata.api.error.ttypes.AiravataSystemException, airavata.api.error.ttypes.AiravataSystemException.thrift_spec), None, ), # 3
- (4, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 4
)
- def __init__(self, success=None, ire=None, ace=None, ase=None, ae=None,):
+ def __init__(self, success=None, ire=None, ace=None, ase=None,):
self.success = success
self.ire = ire
self.ace = ace
self.ase = ase
- self.ae = ae
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -19830,12 +19794,6 @@ class getAPIVersion_result(object):
self.ase.read(iprot)
else:
iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.STRUCT:
- self.ae = airavata.api.error.ttypes.AuthorizationException()
- self.ae.read(iprot)
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -19862,10 +19820,6 @@ class getAPIVersion_result(object):
oprot.writeFieldBegin('ase', TType.STRUCT, 3)
self.ase.write(oprot)
oprot.writeFieldEnd()
- if self.ae is not None:
- oprot.writeFieldBegin('ae', TType.STRUCT, 4)
- self.ae.write(oprot)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/groupmanager/cpi/GroupManagerService-remote b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/groupmanager/cpi/GroupManagerService-remote
index 5f5b33c..ab732bf 100755
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/groupmanager/cpi/GroupManagerService-remote
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/groupmanager/cpi/GroupManagerService-remote
@@ -24,6 +24,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
print('')
print('Functions:')
+ print(' string getAPIVersion()')
print(' string createGroup(AuthzToken authzToken, GroupModel groupModel)')
print(' bool updateGroup(AuthzToken authzToken, GroupModel groupModel)')
print(' bool deleteGroup(AuthzToken authzToken, string groupId, string ownerId)')
@@ -116,7 +117,13 @@ protocol = TBinaryProtocol(transport)
client = GroupManagerService.Client(protocol)
transport.open()
-if cmd == 'createGroup':
+if cmd == 'getAPIVersion':
+ if len(args) != 0:
+ print('getAPIVersion requires 0 args')
+ sys.exit(1)
+ pp.pprint(client.getAPIVersion())
+
+elif cmd == 'createGroup':
if len(args) != 2:
print('createGroup requires 2 args')
sys.exit(1)
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/groupmanager/cpi/GroupManagerService.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/groupmanager/cpi/GroupManagerService.py
index 1df8d23..e0d3fd7 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/groupmanager/cpi/GroupManagerService.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/groupmanager/cpi/GroupManagerService.py
@@ -16,6 +16,9 @@ from thrift.transport import TTransport
class Iface(object):
+ def getAPIVersion(self):
+ pass
+
def createGroup(self, authzToken, groupModel):
"""
Parameters:
@@ -135,6 +138,34 @@ class Client(Iface):
self._oprot = oprot
self._seqid = 0
+ def getAPIVersion(self):
+ self.send_getAPIVersion()
+ return self.recv_getAPIVersion()
+
+ def send_getAPIVersion(self):
+ self._oprot.writeMessageBegin('getAPIVersion', TMessageType.CALL, self._seqid)
+ args = getAPIVersion_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getAPIVersion(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getAPIVersion_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.gse is not None:
+ raise result.gse
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getAPIVersion failed: unknown result")
+
def createGroup(self, authzToken, groupModel):
"""
Parameters:
@@ -635,6 +666,7 @@ class Processor(Iface, TProcessor):
def __init__(self, handler):
self._handler = handler
self._processMap = {}
+ self._processMap["getAPIVersion"] = Processor.process_getAPIVersion
self._processMap["createGroup"] = Processor.process_createGroup
self._processMap["updateGroup"] = Processor.process_updateGroup
self._processMap["deleteGroup"] = Processor.process_deleteGroup
@@ -664,6 +696,28 @@ class Processor(Iface, TProcessor):
self._processMap[name](self, seqid, iprot, oprot)
return True
+ def process_getAPIVersion(self, seqid, iprot, oprot):
+ args = getAPIVersion_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getAPIVersion_result()
+ try:
+ result.success = self._handler.getAPIVersion()
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException as gse:
+ msg_type = TMessageType.REPLY
+ result.gse = gse
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("getAPIVersion", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
def process_createGroup(self, seqid, iprot, oprot):
args = createGroup_args()
args.read(iprot)
@@ -992,6 +1046,120 @@ class Processor(Iface, TProcessor):
# HELPER FUNCTIONS AND STRUCTURES
+class getAPIVersion_args(object):
+
+ thrift_spec = (
+ )
+
+ def read(self, iprot):
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
+ iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
+ oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('getAPIVersion_args')
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.items()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+
+class getAPIVersion_result(object):
+ """
+ Attributes:
+ - success
+ - gse
+ """
+
+ thrift_spec = (
+ (0, TType.STRING, 'success', 'UTF8', None, ), # 0
+ (1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException, airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec), None, ), # 1
+ )
+
+ def __init__(self, success=None, gse=None,):
+ self.success = success
+ self.gse = gse
+
+ def read(self, iprot):
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
+ iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.STRING:
+ self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
+ self.gse.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
+ oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('getAPIVersion_result')
+ if self.success is not None:
+ oprot.writeFieldBegin('success', TType.STRING, 0)
+ oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success)
+ oprot.writeFieldEnd()
+ if self.gse is not None:
+ oprot.writeFieldBegin('gse', TType.STRUCT, 1)
+ self.gse.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.items()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+
class createGroup_args(object):
"""
Attributes:
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/iam/admin/services/cpi/IamAdminServices-remote b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/iam/admin/services/cpi/IamAdminServices-remote
index c164ce1..ba10cb0 100755
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/iam/admin/services/cpi/IamAdminServices-remote
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/iam/admin/services/cpi/IamAdminServices-remote
@@ -24,7 +24,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
print('')
print('Functions:')
- print(' string getAPIVersion(AuthzToken authzToken)')
+ print(' string getAPIVersion()')
print(' Gateway setUpGateway(AuthzToken authzToken, Gateway gateway)')
print(' bool isUsernameAvailable(AuthzToken authzToken, string username)')
print(' bool registerUser(AuthzToken authzToken, string username, string emailAddress, string firstName, string lastName, string newPassword)')
@@ -118,10 +118,10 @@ client = IamAdminServices.Client(protocol)
transport.open()
if cmd == 'getAPIVersion':
- if len(args) != 1:
- print('getAPIVersion requires 1 args')
+ if len(args) != 0:
+ print('getAPIVersion requires 0 args')
sys.exit(1)
- pp.pprint(client.getAPIVersion(eval(args[0]),))
+ pp.pprint(client.getAPIVersion())
elif cmd == 'setUpGateway':
if len(args) != 2:
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/iam/admin/services/cpi/IamAdminServices.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/iam/admin/services/cpi/IamAdminServices.py
index dae59b5..2e6fac8 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/iam/admin/services/cpi/IamAdminServices.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/iam/admin/services/cpi/IamAdminServices.py
@@ -16,11 +16,7 @@ from thrift.transport import TTransport
class Iface(object):
- def getAPIVersion(self, authzToken):
- """
- Parameters:
- - authzToken
- """
+ def getAPIVersion(self):
pass
def setUpGateway(self, authzToken, gateway):
@@ -143,18 +139,13 @@ class Client(Iface):
self._oprot = oprot
self._seqid = 0
- def getAPIVersion(self, authzToken):
- """
- Parameters:
- - authzToken
- """
- self.send_getAPIVersion(authzToken)
+ def getAPIVersion(self):
+ self.send_getAPIVersion()
return self.recv_getAPIVersion()
- def send_getAPIVersion(self, authzToken):
+ def send_getAPIVersion(self):
self._oprot.writeMessageBegin('getAPIVersion', TMessageType.CALL, self._seqid)
args = getAPIVersion_args()
- args.authzToken = authzToken
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
@@ -174,8 +165,6 @@ class Client(Iface):
return result.success
if result.Idse is not None:
raise result.Idse
- if result.ae is not None:
- raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "getAPIVersion failed: unknown result")
def setUpGateway(self, authzToken, gateway):
@@ -714,16 +703,13 @@ class Processor(Iface, TProcessor):
iprot.readMessageEnd()
result = getAPIVersion_result()
try:
- result.success = self._handler.getAPIVersion(args.authzToken)
+ result.success = self._handler.getAPIVersion()
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.iam.admin.services.cpi.error.ttypes.IamAdminServicesException as Idse:
msg_type = TMessageType.REPLY
result.Idse = Idse
- except airavata.api.error.ttypes.AuthorizationException as ae:
- msg_type = TMessageType.REPLY
- result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
@@ -1062,19 +1048,10 @@ class Processor(Iface, TProcessor):
class getAPIVersion_args(object):
- """
- Attributes:
- - authzToken
- """
thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
)
- def __init__(self, authzToken=None,):
- self.authzToken = authzToken
-
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
@@ -1084,12 +1061,6 @@ class getAPIVersion_args(object):
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.authzToken = airavata.model.security.ttypes.AuthzToken()
- self.authzToken.read(iprot)
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -1100,16 +1071,10 @@ class getAPIVersion_args(object):
oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('getAPIVersion_args')
- if self.authzToken is not None:
- oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
- self.authzToken.write(oprot)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
- if self.authzToken is None:
- raise TProtocolException(message='Required field authzToken is unset!')
return
def __repr__(self):
@@ -1129,19 +1094,16 @@ class getAPIVersion_result(object):
Attributes:
- success
- Idse
- - ae
"""
thrift_spec = (
(0, TType.STRING, 'success', 'UTF8', None, ), # 0
(1, TType.STRUCT, 'Idse', (airavata.service.profile.iam.admin.services.cpi.error.ttypes.IamAdminServicesException, airavata.service.profile.iam.admin.services.cpi.error.ttypes.IamAdminServicesException.thrift_spec), None, ), # 1
- (2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 2
)
- def __init__(self, success=None, Idse=None, ae=None,):
+ def __init__(self, success=None, Idse=None,):
self.success = success
self.Idse = Idse
- self.ae = ae
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -1163,12 +1125,6 @@ class getAPIVersion_result(object):
self.Idse.read(iprot)
else:
iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.ae = airavata.api.error.ttypes.AuthorizationException()
- self.ae.read(iprot)
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -1187,10 +1143,6 @@ class getAPIVersion_result(object):
oprot.writeFieldBegin('Idse', TType.STRUCT, 1)
self.Idse.write(oprot)
oprot.writeFieldEnd()
- if self.ae is not None:
- oprot.writeFieldBegin('ae', TType.STRUCT, 2)
- self.ae.write(oprot)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/tenant/cpi/TenantProfileService-remote b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/tenant/cpi/TenantProfileService-remote
index 410b138..307dc4c 100755
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/tenant/cpi/TenantProfileService-remote
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/tenant/cpi/TenantProfileService-remote
@@ -24,7 +24,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
print('')
print('Functions:')
- print(' string getAPIVersion(AuthzToken authzToken)')
+ print(' string getAPIVersion()')
print(' string addGateway(AuthzToken authzToken, Gateway gateway)')
print(' bool updateGateway(AuthzToken authzToken, Gateway updatedGateway)')
print(' Gateway getGateway(AuthzToken authzToken, string airavataInternalGatewayId)')
@@ -112,10 +112,10 @@ client = TenantProfileService.Client(protocol)
transport.open()
if cmd == 'getAPIVersion':
- if len(args) != 1:
- print('getAPIVersion requires 1 args')
+ if len(args) != 0:
+ print('getAPIVersion requires 0 args')
sys.exit(1)
- pp.pprint(client.getAPIVersion(eval(args[0]),))
+ pp.pprint(client.getAPIVersion())
elif cmd == 'addGateway':
if len(args) != 2:
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/tenant/cpi/TenantProfileService.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/tenant/cpi/TenantProfileService.py
index dd89fbb..2328e0f 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/tenant/cpi/TenantProfileService.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/tenant/cpi/TenantProfileService.py
@@ -16,11 +16,7 @@ from thrift.transport import TTransport
class Iface(object):
- def getAPIVersion(self, authzToken):
- """
- Parameters:
- - authzToken
- """
+ def getAPIVersion(self):
pass
def addGateway(self, authzToken, gateway):
@@ -89,18 +85,13 @@ class Client(Iface):
self._oprot = oprot
self._seqid = 0
- def getAPIVersion(self, authzToken):
- """
- Parameters:
- - authzToken
- """
- self.send_getAPIVersion(authzToken)
+ def getAPIVersion(self):
+ self.send_getAPIVersion()
return self.recv_getAPIVersion()
- def send_getAPIVersion(self, authzToken):
+ def send_getAPIVersion(self):
self._oprot.writeMessageBegin('getAPIVersion', TMessageType.CALL, self._seqid)
args = getAPIVersion_args()
- args.authzToken = authzToken
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
@@ -120,8 +111,6 @@ class Client(Iface):
return result.success
if result.tpe is not None:
raise result.tpe
- if result.ae is not None:
- raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "getAPIVersion failed: unknown result")
def addGateway(self, authzToken, gateway):
@@ -420,16 +409,13 @@ class Processor(Iface, TProcessor):
iprot.readMessageEnd()
result = getAPIVersion_result()
try:
- result.success = self._handler.getAPIVersion(args.authzToken)
+ result.success = self._handler.getAPIVersion()
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.tenant.cpi.error.ttypes.TenantProfileServiceException as tpe:
msg_type = TMessageType.REPLY
result.tpe = tpe
- except airavata.api.error.ttypes.AuthorizationException as ae:
- msg_type = TMessageType.REPLY
- result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
@@ -618,19 +604,10 @@ class Processor(Iface, TProcessor):
class getAPIVersion_args(object):
- """
- Attributes:
- - authzToken
- """
thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
)
- def __init__(self, authzToken=None,):
- self.authzToken = authzToken
-
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
@@ -640,12 +617,6 @@ class getAPIVersion_args(object):
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.authzToken = airavata.model.security.ttypes.AuthzToken()
- self.authzToken.read(iprot)
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -656,16 +627,10 @@ class getAPIVersion_args(object):
oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('getAPIVersion_args')
- if self.authzToken is not None:
- oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
- self.authzToken.write(oprot)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
- if self.authzToken is None:
- raise TProtocolException(message='Required field authzToken is unset!')
return
def __repr__(self):
@@ -685,19 +650,16 @@ class getAPIVersion_result(object):
Attributes:
- success
- tpe
- - ae
"""
thrift_spec = (
(0, TType.STRING, 'success', 'UTF8', None, ), # 0
(1, TType.STRUCT, 'tpe', (airavata.service.profile.tenant.cpi.error.ttypes.TenantProfileServiceException, airavata.service.profile.tenant.cpi.error.ttypes.TenantProfileServiceException.thrift_spec), None, ), # 1
- (2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 2
)
- def __init__(self, success=None, tpe=None, ae=None,):
+ def __init__(self, success=None, tpe=None,):
self.success = success
self.tpe = tpe
- self.ae = ae
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -719,12 +681,6 @@ class getAPIVersion_result(object):
self.tpe.read(iprot)
else:
iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.ae = airavata.api.error.ttypes.AuthorizationException()
- self.ae.read(iprot)
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -743,10 +699,6 @@ class getAPIVersion_result(object):
oprot.writeFieldBegin('tpe', TType.STRUCT, 1)
self.tpe.write(oprot)
oprot.writeFieldEnd()
- if self.ae is not None:
- oprot.writeFieldBegin('ae', TType.STRUCT, 2)
- self.ae.write(oprot)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/user/cpi/UserProfileService-remote b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/user/cpi/UserProfileService-remote
index 7e14fc4..3883c1b 100755
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/user/cpi/UserProfileService-remote
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/user/cpi/UserProfileService-remote
@@ -24,6 +24,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
print('')
print('Functions:')
+ print(' string getAPIVersion()')
print(' string initializeUserProfile(AuthzToken authzToken)')
print(' string addUserProfile(AuthzToken authzToken, UserProfile userProfile)')
print(' bool updateUserProfile(AuthzToken authzToken, UserProfile userProfile)')
@@ -110,7 +111,13 @@ protocol = TBinaryProtocol(transport)
client = UserProfileService.Client(protocol)
transport.open()
-if cmd == 'initializeUserProfile':
+if cmd == 'getAPIVersion':
+ if len(args) != 0:
+ print('getAPIVersion requires 0 args')
+ sys.exit(1)
+ pp.pprint(client.getAPIVersion())
+
+elif cmd == 'initializeUserProfile':
if len(args) != 1:
print('initializeUserProfile requires 1 args')
sys.exit(1)
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/user/cpi/UserProfileService.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/user/cpi/UserProfileService.py
index 7d64942..a5d06cb 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/user/cpi/UserProfileService.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/airavata/service/profile/user/cpi/UserProfileService.py
@@ -16,6 +16,9 @@ from thrift.transport import TTransport
class Iface(object):
+ def getAPIVersion(self):
+ pass
+
def initializeUserProfile(self, authzToken):
"""
Create an initial UserProfile based on information in the IAM service for this user.
@@ -86,6 +89,34 @@ class Client(Iface):
self._oprot = oprot
self._seqid = 0
+ def getAPIVersion(self):
+ self.send_getAPIVersion()
+ return self.recv_getAPIVersion()
+
+ def send_getAPIVersion(self):
+ self._oprot.writeMessageBegin('getAPIVersion', TMessageType.CALL, self._seqid)
+ args = getAPIVersion_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getAPIVersion(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getAPIVersion_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.upe is not None:
+ raise result.upe
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getAPIVersion failed: unknown result")
+
def initializeUserProfile(self, authzToken):
"""
Create an initial UserProfile based on information in the IAM service for this user.
@@ -360,6 +391,7 @@ class Processor(Iface, TProcessor):
def __init__(self, handler):
self._handler = handler
self._processMap = {}
+ self._processMap["getAPIVersion"] = Processor.process_getAPIVersion
self._processMap["initializeUserProfile"] = Processor.process_initializeUserProfile
self._processMap["addUserProfile"] = Processor.process_addUserProfile
self._processMap["updateUserProfile"] = Processor.process_updateUserProfile
@@ -383,6 +415,28 @@ class Processor(Iface, TProcessor):
self._processMap[name](self, seqid, iprot, oprot)
return True
+ def process_getAPIVersion(self, seqid, iprot, oprot):
+ args = getAPIVersion_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getAPIVersion_result()
+ try:
+ result.success = self._handler.getAPIVersion()
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except airavata.service.profile.user.cpi.error.ttypes.UserProfileServiceException as upe:
+ msg_type = TMessageType.REPLY
+ result.upe = upe
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("getAPIVersion", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
def process_initializeUserProfile(self, seqid, iprot, oprot):
args = initializeUserProfile_args()
args.read(iprot)
@@ -561,6 +615,120 @@ class Processor(Iface, TProcessor):
# HELPER FUNCTIONS AND STRUCTURES
+class getAPIVersion_args(object):
+
+ thrift_spec = (
+ )
+
+ def read(self, iprot):
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
+ iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
+ oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('getAPIVersion_args')
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.items()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+
+class getAPIVersion_result(object):
+ """
+ Attributes:
+ - success
+ - upe
+ """
+
+ thrift_spec = (
+ (0, TType.STRING, 'success', 'UTF8', None, ), # 0
+ (1, TType.STRUCT, 'upe', (airavata.service.profile.user.cpi.error.ttypes.UserProfileServiceException, airavata.service.profile.user.cpi.error.ttypes.UserProfileServiceException.thrift_spec), None, ), # 1
+ )
+
+ def __init__(self, success=None, upe=None,):
+ self.success = success
+ self.upe = upe
+
+ def read(self, iprot):
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
+ iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.STRING:
+ self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.upe = airavata.service.profile.user.cpi.error.ttypes.UserProfileServiceException()
+ self.upe.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
+ oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('getAPIVersion_result')
+ if self.success is not None:
+ oprot.writeFieldBegin('success', TType.STRING, 0)
+ oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success)
+ oprot.writeFieldEnd()
+ if self.upe is not None:
+ oprot.writeFieldBegin('upe', TType.STRUCT, 1)
+ self.upe.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.items()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+
class initializeUserProfile_args(object):
"""
Attributes:
diff --git a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/GroupManagerServiceHandler.java b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/GroupManagerServiceHandler.java
index 2d8a61a..cc591f5 100644
--- a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/GroupManagerServiceHandler.java
+++ b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/GroupManagerServiceHandler.java
@@ -7,6 +7,7 @@ import org.apache.airavata.model.error.AuthorizationException;
import org.apache.airavata.model.group.GroupModel;
import org.apache.airavata.model.security.AuthzToken;
import org.apache.airavata.service.profile.groupmanager.cpi.GroupManagerService;
+import org.apache.airavata.service.profile.groupmanager.cpi.group_manager_cpiConstants;
import org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException;
import org.apache.airavata.service.security.interceptor.SecurityCheck;
import org.apache.airavata.sharing.registry.client.SharingRegistryServiceClientFactory;
@@ -33,6 +34,11 @@ public class GroupManagerServiceHandler implements GroupManagerService.Iface {
}
@Override
+ public String getAPIVersion() throws GroupManagerServiceException, TException {
+ return group_manager_cpiConstants.GROUP_MANAGER_CPI_VERSION;
+ }
+
+ @Override
@SecurityCheck
public String createGroup(AuthzToken authzToken, GroupModel groupModel) throws GroupManagerServiceException, AuthorizationException, TException {
try {
diff --git a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/IamAdminServicesHandler.java b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/IamAdminServicesHandler.java
index 38ccf1d..b9a1775 100644
--- a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/IamAdminServicesHandler.java
+++ b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/IamAdminServicesHandler.java
@@ -53,15 +53,8 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
@Override
- public String getAPIVersion(AuthzToken authzToken) throws IamAdminServicesException, AuthorizationException {
- try {
- return iam_admin_services_cpiConstants.IAM_ADMIN_SERVICES_CPI_VERSION;
- } catch (Exception ex) {
- logger.error("Error getting API version, reason: " + ex.getMessage(), ex);
- IamAdminServicesException exception = new IamAdminServicesException();
- exception.setMessage("Error getting API version, reason: " + ex.getMessage());
- throw exception;
- }
+ public String getAPIVersion() throws IamAdminServicesException {
+ return iam_admin_services_cpiConstants.IAM_ADMIN_SERVICES_CPI_VERSION;
}
@Override
diff --git a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/TenantProfileServiceHandler.java b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/TenantProfileServiceHandler.java
index ba894b9..3f4a109 100644
--- a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/TenantProfileServiceHandler.java
+++ b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/TenantProfileServiceHandler.java
@@ -64,16 +64,8 @@ public class TenantProfileServiceHandler implements TenantProfileService.Iface {
}
@Override
- @SecurityCheck
- public String getAPIVersion(AuthzToken authzToken) throws TenantProfileServiceException, AuthorizationException, TException {
- try {
- return profile_tenant_cpiConstants.TENANT_PROFILE_CPI_VERSION;
- } catch (Exception ex) {
- logger.error("Error getting API version, reason: " + ex.getMessage(), ex);
- TenantProfileServiceException exception = new TenantProfileServiceException();
- exception.setMessage("Error getting API version, reason: " + ex.getMessage());
- throw exception;
- }
+ public String getAPIVersion() throws TenantProfileServiceException, TException {
+ return profile_tenant_cpiConstants.TENANT_PROFILE_CPI_VERSION;
}
@Override
diff --git a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/UserProfileServiceHandler.java b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/UserProfileServiceHandler.java
index 6c0dcba..3a6f137 100644
--- a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/UserProfileServiceHandler.java
+++ b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/UserProfileServiceHandler.java
@@ -32,6 +32,7 @@ import org.apache.airavata.model.error.AuthorizationException;
import org.apache.airavata.model.security.AuthzToken;
import org.apache.airavata.model.user.Status;
import org.apache.airavata.model.user.UserProfile;
+import org.apache.airavata.model.user.user_profile_modelConstants;
import org.apache.airavata.security.AiravataSecurityException;
import org.apache.airavata.service.profile.client.ProfileServiceClientFactory;
import org.apache.airavata.service.profile.iam.admin.services.cpi.IamAdminServices;
@@ -62,6 +63,11 @@ public class UserProfileServiceHandler implements UserProfileService.Iface {
}
@Override
+ public String getAPIVersion() throws UserProfileServiceException, TException {
+ return user_profile_modelConstants.USER_PROFILE_VERSION;
+ }
+
+ @Override
@SecurityCheck
public String initializeUserProfile(AuthzToken authzToken) throws UserProfileServiceException, AuthorizationException, TException {
String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
diff --git a/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/groupmanager/cpi/GroupManagerService.java b/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/groupmanager/cpi/GroupManagerService.java
index a51b4e6..699a219 100644
--- a/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/groupmanager/cpi/GroupManagerService.java
+++ b/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/groupmanager/cpi/GroupManagerService.java
@@ -28,6 +28,8 @@ public class GroupManagerService {
public interface Iface {
+ public java.lang.String getAPIVersion() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.thrift.TException;
+
public java.lang.String createGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
public boolean updateGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
@@ -58,6 +60,8 @@ public class GroupManagerService {
public interface AsyncIface {
+ public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
+
public void createGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
public void updateGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
@@ -106,6 +110,31 @@ public class GroupManagerService {
super(iprot, oprot);
}
+ public java.lang.String getAPIVersion() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.thrift.TException
+ {
+ send_getAPIVersion();
+ return recv_getAPIVersion();
+ }
+
+ public void send_getAPIVersion() throws org.apache.thrift.TException
+ {
+ getAPIVersion_args args = new getAPIVersion_args();
+ sendBase("getAPIVersion", args);
+ }
+
+ public java.lang.String recv_getAPIVersion() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.thrift.TException
+ {
+ getAPIVersion_result result = new getAPIVersion_result();
+ receiveBase(result, "getAPIVersion");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.gse != null) {
+ throw result.gse;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAPIVersion failed: unknown result");
+ }
+
public java.lang.String createGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel) throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_createGroup(authzToken, groupModel);
@@ -521,6 +550,35 @@ public class GroupManagerService {
super(protocolFactory, clientManager, transport);
}
+ public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getAPIVersion_call method_call = new getAPIVersion_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getAPIVersion_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
+ public getAPIVersion_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAPIVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getAPIVersion_args args = new getAPIVersion_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public java.lang.String getResult() throws org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new java.lang.IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getAPIVersion();
+ }
+ }
+
public void createGroup(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.group.GroupModel groupModel, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
createGroup_call method_call = new createGroup_call(authzToken, groupModel, resultHandler, this, ___protocolFactory, ___transport);
@@ -1010,6 +1068,7 @@ public class GroupManagerService {
}
private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ processMap.put("getAPIVersion", new getAPIVersion());
processMap.put("createGroup", new createGroup());
processMap.put("updateGroup", new updateGroup());
processMap.put("deleteGroup", new deleteGroup());
@@ -1026,6 +1085,30 @@ public class GroupManagerService {
return processMap;
}
+ public static class getAPIVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAPIVersion_args> {
+ public getAPIVersion() {
+ super("getAPIVersion");
+ }
+
+ public getAPIVersion_args getEmptyArgsInstance() {
+ return new getAPIVersion_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getAPIVersion_result getResult(I iface, getAPIVersion_args args) throws org.apache.thrift.TException {
+ getAPIVersion_result result = new getAPIVersion_result();
+ try {
+ result.success = iface.getAPIVersion();
+ } catch (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
+ result.gse = gse;
+ }
+ return result;
+ }
+ }
+
public static class createGroup<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createGroup_args> {
public createGroup() {
super("createGroup");
@@ -1386,6 +1469,7 @@ public class GroupManagerService {
}
private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ processMap.put("getAPIVersion", new getAPIVersion());
processMap.put("createGroup", new createGroup());
processMap.put("updateGroup", new updateGroup());
processMap.put("deleteGroup", new deleteGroup());
@@ -1402,6 +1486,71 @@ public class GroupManagerService {
return processMap;
}
+ public static class getAPIVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAPIVersion_args, java.lang.String> {
+ public getAPIVersion() {
+ super("getAPIVersion");
+ }
+
+ public getAPIVersion_args getEmptyArgsInstance() {
+ return new getAPIVersion_args();
+ }
+
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() {
+ public void onComplete(java.lang.String o) {
+ getAPIVersion_result result = new getAPIVersion_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
+ }
+ }
+ public void onError(java.lang.Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TSerializable msg;
+ getAPIVersion_result result = new getAPIVersion_result();
+ if (e instanceof org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) {
+ result.gse = (org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException) e;
+ result.setGseIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
+ }
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getAPIVersion_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
+ iface.getAPIVersion(resultHandler);
+ }
+ }
+
public static class createGroup<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createGroup_args, java.lang.String> {
public createGroup() {
super("createGroup");
@@ -2310,6 +2459,724 @@ public class GroupManagerService {
}
+ public static class getAPIVersion_args implements org.apache.thrift.TBase<getAPIVersion_args, getAPIVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_args");
+
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAPIVersion_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAPIVersion_argsTupleSchemeFactory();
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap);
+ }
+
+ public getAPIVersion_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getAPIVersion_args(getAPIVersion_args other) {
+ }
+
+ public getAPIVersion_args deepCopy() {
+ return new getAPIVersion_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, java.lang.Object value) {
+ switch (field) {
+ }
+ }
+
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getAPIVersion_args)
+ return this.equals((getAPIVersion_args)that);
+ return false;
+ }
+
+ public boolean equals(getAPIVersion_args that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(getAPIVersion_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getAPIVersion_args(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+ try {
+ 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);
+ }
+ }
+
+ private static class getAPIVersion_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ public getAPIVersion_argsStandardScheme getScheme() {
+ return new getAPIVersion_argsStandardScheme();
+ }
+ }
+
+ private static class getAPIVersion_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getAPIVersion_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getAPIVersion_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ public getAPIVersion_argsTupleScheme getScheme() {
+ return new getAPIVersion_argsTupleScheme();
+ }
+ }
+
+ private static class getAPIVersion_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAPIVersion_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
+ public static class getAPIVersion_result implements org.apache.thrift.TBase<getAPIVersion_result, getAPIVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
+ private static final org.apache.thrift.protocol.TField GSE_FIELD_DESC = new org.apache.thrift.protocol.TField("gse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAPIVersion_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAPIVersion_resultTupleSchemeFactory();
+
+ public java.lang.String success; // required
+ public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ GSE((short)1, "gse");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // GSE
+ return GSE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.GSE, new org.apache.thrift.meta_data.FieldMetaData("gse", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_result.class, metaDataMap);
+ }
+
+ public getAPIVersion_result() {
+ }
+
+ public getAPIVersion_result(
+ java.lang.String success,
+ org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse)
+ {
+ this();
+ this.success = success;
+ this.gse = gse;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getAPIVersion_result(getAPIVersion_result other) {
+ if (other.isSetSuccess()) {
+ this.success = other.success;
+ }
+ if (other.isSetGse()) {
+ this.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException(other.gse);
+ }
+ }
+
+ public getAPIVersion_result deepCopy() {
+ return new getAPIVersion_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.gse = null;
+ }
+
+ public java.lang.String getSuccess() {
+ return this.success;
+ }
+
+ public getAPIVersion_result setSuccess(java.lang.String success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException getGse() {
+ return this.gse;
+ }
+
+ public getAPIVersion_result setGse(org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException gse) {
+ this.gse = gse;
+ return this;
+ }
+
+ public void unsetGse() {
+ this.gse = null;
+ }
+
+ /** Returns true if field gse is set (has been assigned a value) and false otherwise */
+ public boolean isSetGse() {
+ return this.gse != null;
+ }
+
+ public void setGseIsSet(boolean value) {
+ if (!value) {
+ this.gse = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, java.lang.Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((java.lang.String)value);
+ }
+ break;
+
+ case GSE:
+ if (value == null) {
+ unsetGse();
+ } else {
+ setGse((org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException)value);
+ }
+ break;
+
+ }
+ }
+
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case GSE:
+ return getGse();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case GSE:
+ return isSetGse();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getAPIVersion_result)
+ return this.equals((getAPIVersion_result)that);
+ return false;
+ }
+
+ public boolean equals(getAPIVersion_result that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_gse = true && this.isSetGse();
+ boolean that_present_gse = true && that.isSetGse();
+ if (this_present_gse || that_present_gse) {
+ if (!(this_present_gse && that_present_gse))
+ return false;
+ if (!this.gse.equals(that.gse))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetGse()) ? 131071 : 524287);
+ if (isSetGse())
+ hashCode = hashCode * 8191 + gse.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(getAPIVersion_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.valueOf(isSetGse()).compareTo(other.isSetGse());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGse()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gse, other.gse);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getAPIVersion_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("gse:");
+ if (this.gse == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.gse);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+ try {
+ 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);
+ }
+ }
+
+ private static class getAPIVersion_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ public getAPIVersion_resultStandardScheme getScheme() {
+ return new getAPIVersion_resultStandardScheme();
+ }
+ }
+
+ private static class getAPIVersion_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getAPIVersion_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.success = iprot.readString();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // GSE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
+ struct.gse.read(iprot);
+ struct.setGseIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeString(struct.success);
+ oprot.writeFieldEnd();
+ }
+ if (struct.gse != null) {
+ oprot.writeFieldBegin(GSE_FIELD_DESC);
+ struct.gse.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getAPIVersion_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ public getAPIVersion_resultTupleScheme getScheme() {
+ return new getAPIVersion_resultTupleScheme();
+ }
+ }
+
+ private static class getAPIVersion_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAPIVersion_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetGse()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ oprot.writeString(struct.success);
+ }
+ if (struct.isSetGse()) {
+ struct.gse.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = iprot.readString();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.gse = new org.apache.airavata.service.profile.groupmanager.cpi.exception.GroupManagerServiceException();
+ struct.gse.read(iprot);
+ struct.setGseIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
public static class createGroup_args implements org.apache.thrift.TBase<createGroup_args, createGroup_args._Fields>, java.io.Serializable, Cloneable, Comparable<createGroup_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createGroup_args");
diff --git a/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/iam/admin/services/cpi/IamAdminServices.java b/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/iam/admin/services/cpi/IamAdminServices.java
index 9438f4e..68b4420 100644
--- a/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/iam/admin/services/cpi/IamAdminServices.java
+++ b/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/iam/admin/services/cpi/IamAdminServices.java
@@ -28,7 +28,7 @@ public class IamAdminServices {
public interface Iface {
- public java.lang.String getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+ public java.lang.String getAPIVersion() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.thrift.TException;
public org.apache.airavata.model.workspace.Gateway setUpGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
@@ -60,7 +60,7 @@ public class IamAdminServices {
public interface AsyncIface {
- public void getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
+ public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
public void setUpGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway> resultHandler) throws org.apache.thrift.TException;
@@ -110,20 +110,19 @@ public class IamAdminServices {
super(iprot, oprot);
}
- public java.lang.String getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+ public java.lang.String getAPIVersion() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.thrift.TException
{
- send_getAPIVersion(authzToken);
+ send_getAPIVersion();
return recv_getAPIVersion();
}
- public void send_getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.thrift.TException
+ public void send_getAPIVersion() throws org.apache.thrift.TException
{
getAPIVersion_args args = new getAPIVersion_args();
- args.setAuthzToken(authzToken);
sendBase("getAPIVersion", args);
}
- public java.lang.String recv_getAPIVersion() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+ public java.lang.String recv_getAPIVersion() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.thrift.TException
{
getAPIVersion_result result = new getAPIVersion_result();
receiveBase(result, "getAPIVersion");
@@ -133,9 +132,6 @@ public class IamAdminServices {
if (result.Idse != null) {
throw result.Idse;
}
- if (result.ae != null) {
- throw result.ae;
- }
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAPIVersion failed: unknown result");
}
@@ -552,29 +548,26 @@ public class IamAdminServices {
super(protocolFactory, clientManager, transport);
}
- public void getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
+ public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
- getAPIVersion_call method_call = new getAPIVersion_call(authzToken, resultHandler, this, ___protocolFactory, ___transport);
+ getAPIVersion_call method_call = new getAPIVersion_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getAPIVersion_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
- private org.apache.airavata.model.security.AuthzToken authzToken;
- public getAPIVersion_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public getAPIVersion_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
- this.authzToken = authzToken;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAPIVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
getAPIVersion_args args = new getAPIVersion_args();
- args.setAuthzToken(authzToken);
args.write(prot);
prot.writeMessageEnd();
}
- public java.lang.String getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
+ public java.lang.String getResult() throws org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
@@ -1109,11 +1102,9 @@ public class IamAdminServices {
public getAPIVersion_result getResult(I iface, getAPIVersion_args args) throws org.apache.thrift.TException {
getAPIVersion_result result = new getAPIVersion_result();
try {
- result.success = iface.getAPIVersion(args.authzToken);
+ result.success = iface.getAPIVersion();
} catch (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
result.Idse = Idse;
- } catch (org.apache.airavata.model.error.AuthorizationException ae) {
- result.ae = ae;
}
return result;
}
@@ -1528,10 +1519,6 @@ public class IamAdminServices {
result.Idse = (org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
result.setIdseIsSet(true);
msg = result;
- } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
- result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
- result.setAeIsSet(true);
- msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
@@ -1560,7 +1547,7 @@ public class IamAdminServices {
}
public void start(I iface, getAPIVersion_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
- iface.getAPIVersion(args.authzToken,resultHandler);
+ iface.getAPIVersion(resultHandler);
}
}
@@ -2473,16 +2460,14 @@ public class IamAdminServices {
public static class getAPIVersion_args implements org.apache.thrift.TBase<getAPIVersion_args, getAPIVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_args");
- private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAPIVersion_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAPIVersion_argsTupleSchemeFactory();
- public org.apache.airavata.model.security.AuthzToken authzToken; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- AUTHZ_TOKEN((short)1, "authzToken");
+;
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -2497,8 +2482,6 @@ public class IamAdminServices {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // AUTHZ_TOKEN
- return AUTHZ_TOKEN;
default:
return null;
}
@@ -2537,13 +2520,9 @@ public class IamAdminServices {
return _fieldName;
}
}
-
- // isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap);
}
@@ -2551,20 +2530,10 @@ public class IamAdminServices {
public getAPIVersion_args() {
}
- public getAPIVersion_args(
- org.apache.airavata.model.security.AuthzToken authzToken)
- {
- this();
- this.authzToken = authzToken;
- }
-
/**
* Performs a deep copy on <i>other</i>.
*/
public getAPIVersion_args(getAPIVersion_args other) {
- if (other.isSetAuthzToken()) {
- this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
- }
}
public getAPIVersion_args deepCopy() {
@@ -2573,51 +2542,15 @@ public class IamAdminServices {
@Override
public void clear() {
- this.authzToken = null;
- }
-
- public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
- return this.authzToken;
- }
-
- public getAPIVersion_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
- this.authzToken = authzToken;
- return this;
- }
-
- public void unsetAuthzToken() {
- this.authzToken = null;
- }
-
- /** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
- public boolean isSetAuthzToken() {
- return this.authzToken != null;
- }
-
- public void setAuthzTokenIsSet(boolean value) {
- if (!value) {
- this.authzToken = null;
- }
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
- case AUTHZ_TOKEN:
- if (value == null) {
- unsetAuthzToken();
- } else {
- setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
- }
- break;
-
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case AUTHZ_TOKEN:
- return getAuthzToken();
-
}
throw new java.lang.IllegalStateException();
}
@@ -2629,8 +2562,6 @@ public class IamAdminServices {
}
switch (field) {
- case AUTHZ_TOKEN:
- return isSetAuthzToken();
}
throw new java.lang.IllegalStateException();
}
@@ -2650,15 +2581,6 @@ public class IamAdminServices {
if (this == that)
return true;
- boolean this_present_authzToken = true && this.isSetAuthzToken();
- boolean that_present_authzToken = true && that.isSetAuthzToken();
- if (this_present_authzToken || that_present_authzToken) {
- if (!(this_present_authzToken && that_present_authzToken))
- return false;
- if (!this.authzToken.equals(that.authzToken))
- return false;
- }
-
return true;
}
@@ -2666,10 +2588,6 @@ public class IamAdminServices {
public int hashCode() {
int hashCode = 1;
- hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
- if (isSetAuthzToken())
- hashCode = hashCode * 8191 + authzToken.hashCode();
-
return hashCode;
}
@@ -2681,16 +2599,6 @@ public class IamAdminServices {
int lastComparison = 0;
- lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAuthzToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
return 0;
}
@@ -2711,26 +2619,13 @@ public class IamAdminServices {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getAPIVersion_args(");
boolean first = true;
- sb.append("authzToken:");
- if (this.authzToken == null) {
- sb.append("null");
- } else {
- sb.append(this.authzToken);
- }
- first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
- if (authzToken == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
- }
// check for sub-struct validity
- if (authzToken != null) {
- authzToken.validate();
- }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -2767,15 +2662,6 @@ public class IamAdminServices {
break;
}
switch (schemeField.id) {
- case 1: // AUTHZ_TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
- struct.authzToken.read(iprot);
- struct.setAuthzTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -2791,11 +2677,6 @@ public class IamAdminServices {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (struct.authzToken != null) {
- oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
- struct.authzToken.write(oprot);
- oprot.writeFieldEnd();
- }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -2813,15 +2694,11 @@ public class IamAdminServices {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
- struct.authzToken.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
- struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
- struct.authzToken.read(iprot);
- struct.setAuthzTokenIsSet(true);
}
}
@@ -2835,20 +2712,17 @@ public class IamAdminServices {
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField IDSE_FIELD_DESC = new org.apache.thrift.protocol.TField("Idse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAPIVersion_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAPIVersion_resultTupleSchemeFactory();
public java.lang.String success; // required
public org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
- public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
- IDSE((short)1, "Idse"),
- AE((short)2, "ae");
+ IDSE((short)1, "Idse");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -2867,8 +2741,6 @@ public class IamAdminServices {
return SUCCESS;
case 1: // IDSE
return IDSE;
- case 2: // AE
- return AE;
default:
return null;
}
@@ -2916,8 +2788,6 @@ public class IamAdminServices {
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
- tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_result.class, metaDataMap);
}
@@ -2927,13 +2797,11 @@ public class IamAdminServices {
public getAPIVersion_result(
java.lang.String success,
- org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
- org.apache.airavata.model.error.AuthorizationException ae)
+ org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse)
{
this();
this.success = success;
this.Idse = Idse;
- this.ae = ae;
}
/**
@@ -2946,9 +2814,6 @@ public class IamAdminServices {
if (other.isSetIdse()) {
this.Idse = new org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
}
- if (other.isSetAe()) {
- this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
- }
}
public getAPIVersion_result deepCopy() {
@@ -2959,7 +2824,6 @@ public class IamAdminServices {
public void clear() {
this.success = null;
this.Idse = null;
- this.ae = null;
}
public java.lang.String getSuccess() {
@@ -3010,30 +2874,6 @@ public class IamAdminServices {
}
}
- public org.apache.airavata.model.error.AuthorizationException getAe() {
- return this.ae;
- }
-
- public getAPIVersion_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
- this.ae = ae;
- return this;
- }
-
- public void unsetAe() {
- this.ae = null;
- }
-
- /** Returns true if field ae is set (has been assigned a value) and false otherwise */
- public boolean isSetAe() {
- return this.ae != null;
- }
-
- public void setAeIsSet(boolean value) {
- if (!value) {
- this.ae = null;
- }
- }
-
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
@@ -3052,14 +2892,6 @@ public class IamAdminServices {
}
break;
- case AE:
- if (value == null) {
- unsetAe();
- } else {
- setAe((org.apache.airavata.model.error.AuthorizationException)value);
- }
- break;
-
}
}
@@ -3071,9 +2903,6 @@ public class IamAdminServices {
case IDSE:
return getIdse();
- case AE:
- return getAe();
-
}
throw new java.lang.IllegalStateException();
}
@@ -3089,8 +2918,6 @@ public class IamAdminServices {
return isSetSuccess();
case IDSE:
return isSetIdse();
- case AE:
- return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@@ -3128,15 +2955,6 @@ public class IamAdminServices {
return false;
}
- boolean this_present_ae = true && this.isSetAe();
- boolean that_present_ae = true && that.isSetAe();
- if (this_present_ae || that_present_ae) {
- if (!(this_present_ae && that_present_ae))
- return false;
- if (!this.ae.equals(that.ae))
- return false;
- }
-
return true;
}
@@ -3152,10 +2970,6 @@ public class IamAdminServices {
if (isSetIdse())
hashCode = hashCode * 8191 + Idse.hashCode();
- hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
- if (isSetAe())
- hashCode = hashCode * 8191 + ae.hashCode();
-
return hashCode;
}
@@ -3187,16 +3001,6 @@ public class IamAdminServices {
return lastComparison;
}
}
- lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAe()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
return 0;
}
@@ -3232,14 +3036,6 @@ public class IamAdminServices {
sb.append(this.Idse);
}
first = false;
- if (!first) sb.append(", ");
- sb.append("ae:");
- if (this.ae == null) {
- sb.append("null");
- } else {
- sb.append(this.ae);
- }
- first = false;
sb.append(")");
return sb.toString();
}
@@ -3300,15 +3096,6 @@ public class IamAdminServices {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 2: // AE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.ae = new org.apache.airavata.model.error.AuthorizationException();
- struct.ae.read(iprot);
- struct.setAeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -3334,11 +3121,6 @@ public class IamAdminServices {
struct.Idse.write(oprot);
oprot.writeFieldEnd();
}
- if (struct.ae != null) {
- oprot.writeFieldBegin(AE_FIELD_DESC);
- struct.ae.write(oprot);
- oprot.writeFieldEnd();
- }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -3363,25 +3145,19 @@ public class IamAdminServices {
if (struct.isSetIdse()) {
optionals.set(1);
}
- if (struct.isSetAe()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
+ oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetIdse()) {
struct.Idse.write(oprot);
}
- if (struct.isSetAe()) {
- struct.ae.write(oprot);
- }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(3);
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
@@ -3391,11 +3167,6 @@ public class IamAdminServices {
struct.Idse.read(iprot);
struct.setIdseIsSet(true);
}
- if (incoming.get(2)) {
- struct.ae = new org.apache.airavata.model.error.AuthorizationException();
- struct.ae.read(iprot);
- struct.setAeIsSet(true);
- }
}
}
diff --git a/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/tenant/cpi/TenantProfileService.java b/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/tenant/cpi/TenantProfileService.java
index 25fdd7e..2e45ba7 100644
--- a/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/tenant/cpi/TenantProfileService.java
+++ b/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/tenant/cpi/TenantProfileService.java
@@ -28,7 +28,7 @@ public class TenantProfileService {
public interface Iface {
- public java.lang.String getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.service.profile.tenant.cpi.exception.TenantProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+ public java.lang.String getAPIVersion() throws org.apache.airavata.service.profile.tenant.cpi.exception.TenantProfileServiceException, org.apache.thrift.TException;
/**
* Return the airavataInternalGatewayId assigned to given gateway.
@@ -54,7 +54,7 @@ public class TenantProfileService {
public interface AsyncIface {
- public void getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
+ public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
public void addGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
@@ -92,20 +92,19 @@ public class TenantProfileService {
super(iprot, oprot);
}
- public java.lang.String getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.service.profile.tenant.cpi.exception.TenantProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+ public java.lang.String getAPIVersion() throws org.apache.airavata.service.profile.tenant.cpi.exception.TenantProfileServiceException, org.apache.thrift.TException
{
- send_getAPIVersion(authzToken);
+ send_getAPIVersion();
return recv_getAPIVersion();
}
- public void send_getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.thrift.TException
+ public void send_getAPIVersion() throws org.apache.thrift.TException
{
getAPIVersion_args args = new getAPIVersion_args();
- args.setAuthzToken(authzToken);
sendBase("getAPIVersion", args);
}
- public java.lang.String recv_getAPIVersion() throws org.apache.airavata.service.profile.tenant.cpi.exception.TenantProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+ public java.lang.String recv_getAPIVersion() throws org.apache.airavata.service.profile.tenant.cpi.exception.TenantProfileServiceException, org.apache.thrift.TException
{
getAPIVersion_result result = new getAPIVersion_result();
receiveBase(result, "getAPIVersion");
@@ -115,9 +114,6 @@ public class TenantProfileService {
if (result.tpe != null) {
throw result.tpe;
}
- if (result.ae != null) {
- throw result.ae;
- }
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAPIVersion failed: unknown result");
}
@@ -349,29 +345,26 @@ public class TenantProfileService {
super(protocolFactory, clientManager, transport);
}
- public void getAPIVersion(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
+ public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
- getAPIVersion_call method_call = new getAPIVersion_call(authzToken, resultHandler, this, ___protocolFactory, ___transport);
+ getAPIVersion_call method_call = new getAPIVersion_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getAPIVersion_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
- private org.apache.airavata.model.security.AuthzToken authzToken;
- public getAPIVersion_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public getAPIVersion_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
- this.authzToken = authzToken;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAPIVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
getAPIVersion_args args = new getAPIVersion_args();
- args.setAuthzToken(authzToken);
args.write(prot);
prot.writeMessageEnd();
}
- public java.lang.String getResult() throws org.apache.airavata.service.profile.tenant.cpi.exception.TenantProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
+ public java.lang.String getResult() throws org.apache.airavata.service.profile.tenant.cpi.exception.TenantProfileServiceException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
@@ -666,11 +659,9 @@ public class TenantProfileService {
public getAPIVersion_result getResult(I iface, getAPIVersion_args args) throws org.apache.thrift.TException {
getAPIVersion_result result = new getAPIVersion_result();
try {
- result.success = iface.getAPIVersion(args.authzToken);
+ result.success = iface.getAPIVersion();
} catch (org.apache.airavata.service.profile.tenant.cpi.exception.TenantProfileServiceException tpe) {
result.tpe = tpe;
- } catch (org.apache.airavata.model.error.AuthorizationException ae) {
- result.ae = ae;
}
return result;
}
@@ -918,10 +909,6 @@ public class TenantProfileService {
result.tpe = (org.apache.airavata.service.profile.tenant.cpi.exception.TenantProfileServiceException) e;
result.setTpeIsSet(true);
msg = result;
- } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
- result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
- result.setAeIsSet(true);
- msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
@@ -950,7 +937,7 @@ public class TenantProfileService {
}
public void start(I iface, getAPIVersion_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
- iface.getAPIVersion(args.authzToken,resultHandler);
+ iface.getAPIVersion(resultHandler);
}
}
@@ -1445,16 +1432,14 @@ public class TenantProfileService {
public static class getAPIVersion_args implements org.apache.thrift.TBase<getAPIVersion_args, getAPIVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_args");
- private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAPIVersion_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAPIVersion_argsTupleSchemeFactory();
- public org.apache.airavata.model.security.AuthzToken authzToken; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- AUTHZ_TOKEN((short)1, "authzToken");
+;
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -1469,8 +1454,6 @@ public class TenantProfileService {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // AUTHZ_TOKEN
- return AUTHZ_TOKEN;
default:
return null;
}
@@ -1509,13 +1492,9 @@ public class TenantProfileService {
return _fieldName;
}
}
-
- // isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap);
}
@@ -1523,20 +1502,10 @@ public class TenantProfileService {
public getAPIVersion_args() {
}
- public getAPIVersion_args(
- org.apache.airavata.model.security.AuthzToken authzToken)
- {
- this();
- this.authzToken = authzToken;
- }
-
/**
* Performs a deep copy on <i>other</i>.
*/
public getAPIVersion_args(getAPIVersion_args other) {
- if (other.isSetAuthzToken()) {
- this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
- }
}
public getAPIVersion_args deepCopy() {
@@ -1545,51 +1514,15 @@ public class TenantProfileService {
@Override
public void clear() {
- this.authzToken = null;
- }
-
- public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
- return this.authzToken;
- }
-
- public getAPIVersion_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
- this.authzToken = authzToken;
- return this;
- }
-
- public void unsetAuthzToken() {
- this.authzToken = null;
- }
-
- /** Returns true if field authzToken is set (has been assigned a value) and false otherwise */
- public boolean isSetAuthzToken() {
- return this.authzToken != null;
- }
-
- public void setAuthzTokenIsSet(boolean value) {
- if (!value) {
- this.authzToken = null;
- }
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
- case AUTHZ_TOKEN:
- if (value == null) {
- unsetAuthzToken();
- } else {
- setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
- }
- break;
-
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case AUTHZ_TOKEN:
- return getAuthzToken();
-
}
throw new java.lang.IllegalStateException();
}
@@ -1601,8 +1534,6 @@ public class TenantProfileService {
}
switch (field) {
- case AUTHZ_TOKEN:
- return isSetAuthzToken();
}
throw new java.lang.IllegalStateException();
}
@@ -1622,15 +1553,6 @@ public class TenantProfileService {
if (this == that)
return true;
- boolean this_present_authzToken = true && this.isSetAuthzToken();
- boolean that_present_authzToken = true && that.isSetAuthzToken();
- if (this_present_authzToken || that_present_authzToken) {
- if (!(this_present_authzToken && that_present_authzToken))
- return false;
- if (!this.authzToken.equals(that.authzToken))
- return false;
- }
-
return true;
}
@@ -1638,10 +1560,6 @@ public class TenantProfileService {
public int hashCode() {
int hashCode = 1;
- hashCode = hashCode * 8191 + ((isSetAuthzToken()) ? 131071 : 524287);
- if (isSetAuthzToken())
- hashCode = hashCode * 8191 + authzToken.hashCode();
-
return hashCode;
}
@@ -1653,16 +1571,6 @@ public class TenantProfileService {
int lastComparison = 0;
- lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAuthzToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzToken, other.authzToken);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
return 0;
}
@@ -1683,26 +1591,13 @@ public class TenantProfileService {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getAPIVersion_args(");
boolean first = true;
- sb.append("authzToken:");
- if (this.authzToken == null) {
- sb.append("null");
- } else {
- sb.append(this.authzToken);
- }
- first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
- if (authzToken == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
- }
// check for sub-struct validity
- if (authzToken != null) {
- authzToken.validate();
- }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -1739,15 +1634,6 @@ public class TenantProfileService {
break;
}
switch (schemeField.id) {
- case 1: // AUTHZ_TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
- struct.authzToken.read(iprot);
- struct.setAuthzTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -1763,11 +1649,6 @@ public class TenantProfileService {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (struct.authzToken != null) {
- oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
- struct.authzToken.write(oprot);
- oprot.writeFieldEnd();
- }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -1785,15 +1666,11 @@ public class TenantProfileService {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
- struct.authzToken.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
- struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
- struct.authzToken.read(iprot);
- struct.setAuthzTokenIsSet(true);
}
}
@@ -1807,20 +1684,17 @@ public class TenantProfileService {
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField TPE_FIELD_DESC = new org.apache.thrift.protocol.TField("tpe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAPIVersion_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAPIVersion_resultTupleSchemeFactory();
public java.lang.String success; // required
public org.apache.airavata.service.profile.tenant.cpi.exception.TenantProfileServiceException tpe; // required
- public org.apache.airavata.model.error.AuthorizationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
- TPE((short)1, "tpe"),
- AE((short)2, "ae");
+ TPE((short)1, "tpe");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
@@ -1839,8 +1713,6 @@ public class TenantProfileService {
return SUCCESS;
case 1: // TPE
return TPE;
- case 2: // AE
- return AE;
default:
return null;
}
@@ -1888,8 +1760,6 @@ public class TenantProfileService {
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TPE, new org.apache.thrift.meta_data.FieldMetaData("tpe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.tenant.cpi.exception.TenantProfileServiceException.class)));
- tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_result.class, metaDataMap);
}
@@ -1899,13 +1769,11 @@ public class TenantProfileService {
public getAPIVersion_result(
java.lang.String success,
- org.apache.airavata.service.profile.tenant.cpi.exception.TenantProfileServiceException tpe,
- org.apache.airavata.model.error.AuthorizationException ae)
+ org.apache.airavata.service.profile.tenant.cpi.exception.TenantProfileServiceException tpe)
{
this();
this.success = success;
this.tpe = tpe;
- this.ae = ae;
}
/**
@@ -1918,9 +1786,6 @@ public class TenantProfileService {
if (other.isSetTpe()) {
this.tpe = new org.apache.airavata.service.profile.tenant.cpi.exception.TenantProfileServiceException(other.tpe);
}
- if (other.isSetAe()) {
- this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
- }
}
public getAPIVersion_result deepCopy() {
@@ -1931,7 +1796,6 @@ public class TenantProfileService {
public void clear() {
this.success = null;
this.tpe = null;
- this.ae = null;
}
public java.lang.String getSuccess() {
@@ -1982,30 +1846,6 @@ public class TenantProfileService {
}
}
- public org.apache.airavata.model.error.AuthorizationException getAe() {
- return this.ae;
- }
-
- public getAPIVersion_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
- this.ae = ae;
- return this;
- }
-
- public void unsetAe() {
- this.ae = null;
- }
-
- /** Returns true if field ae is set (has been assigned a value) and false otherwise */
- public boolean isSetAe() {
- return this.ae != null;
- }
-
- public void setAeIsSet(boolean value) {
- if (!value) {
- this.ae = null;
- }
- }
-
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
@@ -2024,14 +1864,6 @@ public class TenantProfileService {
}
break;
- case AE:
- if (value == null) {
- unsetAe();
- } else {
- setAe((org.apache.airavata.model.error.AuthorizationException)value);
- }
- break;
-
}
}
@@ -2043,9 +1875,6 @@ public class TenantProfileService {
case TPE:
return getTpe();
- case AE:
- return getAe();
-
}
throw new java.lang.IllegalStateException();
}
@@ -2061,8 +1890,6 @@ public class TenantProfileService {
return isSetSuccess();
case TPE:
return isSetTpe();
- case AE:
- return isSetAe();
}
throw new java.lang.IllegalStateException();
}
@@ -2100,15 +1927,6 @@ public class TenantProfileService {
return false;
}
- boolean this_present_ae = true && this.isSetAe();
- boolean that_present_ae = true && that.isSetAe();
- if (this_present_ae || that_present_ae) {
- if (!(this_present_ae && that_present_ae))
- return false;
- if (!this.ae.equals(that.ae))
- return false;
- }
-
return true;
}
@@ -2124,10 +1942,6 @@ public class TenantProfileService {
if (isSetTpe())
hashCode = hashCode * 8191 + tpe.hashCode();
- hashCode = hashCode * 8191 + ((isSetAe()) ? 131071 : 524287);
- if (isSetAe())
- hashCode = hashCode * 8191 + ae.hashCode();
-
return hashCode;
}
@@ -2159,16 +1973,6 @@ public class TenantProfileService {
return lastComparison;
}
}
- lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAe()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
return 0;
}
@@ -2204,14 +2008,6 @@ public class TenantProfileService {
sb.append(this.tpe);
}
first = false;
- if (!first) sb.append(", ");
- sb.append("ae:");
- if (this.ae == null) {
- sb.append("null");
- } else {
- sb.append(this.ae);
- }
- first = false;
sb.append(")");
return sb.toString();
}
@@ -2272,15 +2068,6 @@ public class TenantProfileService {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 2: // AE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.ae = new org.apache.airavata.model.error.AuthorizationException();
- struct.ae.read(iprot);
- struct.setAeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -2306,11 +2093,6 @@ public class TenantProfileService {
struct.tpe.write(oprot);
oprot.writeFieldEnd();
}
- if (struct.ae != null) {
- oprot.writeFieldBegin(AE_FIELD_DESC);
- struct.ae.write(oprot);
- oprot.writeFieldEnd();
- }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -2335,25 +2117,19 @@ public class TenantProfileService {
if (struct.isSetTpe()) {
optionals.set(1);
}
- if (struct.isSetAe()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
+ oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetTpe()) {
struct.tpe.write(oprot);
}
- if (struct.isSetAe()) {
- struct.ae.write(oprot);
- }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(3);
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
@@ -2363,11 +2139,6 @@ public class TenantProfileService {
struct.tpe.read(iprot);
struct.setTpeIsSet(true);
}
- if (incoming.get(2)) {
- struct.ae = new org.apache.airavata.model.error.AuthorizationException();
- struct.ae.read(iprot);
- struct.setAeIsSet(true);
- }
}
}
diff --git a/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/user/cpi/UserProfileService.java b/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/user/cpi/UserProfileService.java
index 1d394df..65bbcd0 100644
--- a/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/user/cpi/UserProfileService.java
+++ b/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/user/cpi/UserProfileService.java
@@ -28,6 +28,8 @@ public class UserProfileService {
public interface Iface {
+ public java.lang.String getAPIVersion() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.thrift.TException;
+
/**
* Create an initial UserProfile based on information in the IAM service for this user.
*
@@ -51,6 +53,8 @@ public class UserProfileService {
public interface AsyncIface {
+ public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
+
public void initializeUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
public void addUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
@@ -87,6 +91,31 @@ public class UserProfileService {
super(iprot, oprot);
}
+ public java.lang.String getAPIVersion() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.thrift.TException
+ {
+ send_getAPIVersion();
+ return recv_getAPIVersion();
+ }
+
+ public void send_getAPIVersion() throws org.apache.thrift.TException
+ {
+ getAPIVersion_args args = new getAPIVersion_args();
+ sendBase("getAPIVersion", args);
+ }
+
+ public java.lang.String recv_getAPIVersion() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.thrift.TException
+ {
+ getAPIVersion_result result = new getAPIVersion_result();
+ receiveBase(result, "getAPIVersion");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.upe != null) {
+ throw result.upe;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAPIVersion failed: unknown result");
+ }
+
public java.lang.String initializeUserProfile(org.apache.airavata.model.security.AuthzToken authzToken) throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
{
send_initializeUserProfile(authzToken);
@@ -319,6 +348,35 @@ public class UserProfileService {
super(protocolFactory, clientManager, transport);
}
+ public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getAPIVersion_call method_call = new getAPIVersion_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getAPIVersion_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
+ public getAPIVersion_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAPIVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getAPIVersion_args args = new getAPIVersion_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public java.lang.String getResult() throws org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new java.lang.IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getAPIVersion();
+ }
+ }
+
public void initializeUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
initializeUserProfile_call method_call = new initializeUserProfile_call(authzToken, resultHandler, this, ___protocolFactory, ___transport);
@@ -589,6 +647,7 @@ public class UserProfileService {
}
private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ processMap.put("getAPIVersion", new getAPIVersion());
processMap.put("initializeUserProfile", new initializeUserProfile());
processMap.put("addUserProfile", new addUserProfile());
processMap.put("updateUserProfile", new updateUserProfile());
@@ -599,6 +658,30 @@ public class UserProfileService {
return processMap;
}
+ public static class getAPIVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAPIVersion_args> {
+ public getAPIVersion() {
+ super("getAPIVersion");
+ }
+
+ public getAPIVersion_args getEmptyArgsInstance() {
+ return new getAPIVersion_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getAPIVersion_result getResult(I iface, getAPIVersion_args args) throws org.apache.thrift.TException {
+ getAPIVersion_result result = new getAPIVersion_result();
+ try {
+ result.success = iface.getAPIVersion();
+ } catch (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
+ result.upe = upe;
+ }
+ return result;
+ }
+ }
+
public static class initializeUserProfile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, initializeUserProfile_args> {
public initializeUserProfile() {
super("initializeUserProfile");
@@ -797,6 +880,7 @@ public class UserProfileService {
}
private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ processMap.put("getAPIVersion", new getAPIVersion());
processMap.put("initializeUserProfile", new initializeUserProfile());
processMap.put("addUserProfile", new addUserProfile());
processMap.put("updateUserProfile", new updateUserProfile());
@@ -807,6 +891,71 @@ public class UserProfileService {
return processMap;
}
+ public static class getAPIVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAPIVersion_args, java.lang.String> {
+ public getAPIVersion() {
+ super("getAPIVersion");
+ }
+
+ public getAPIVersion_args getEmptyArgsInstance() {
+ return new getAPIVersion_args();
+ }
+
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() {
+ public void onComplete(java.lang.String o) {
+ getAPIVersion_result result = new getAPIVersion_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
+ }
+ }
+ public void onError(java.lang.Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TSerializable msg;
+ getAPIVersion_result result = new getAPIVersion_result();
+ if (e instanceof org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) {
+ result.upe = (org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException) e;
+ result.setUpeIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
+ }
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getAPIVersion_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
+ iface.getAPIVersion(resultHandler);
+ }
+ }
+
public static class initializeUserProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, initializeUserProfile_args, java.lang.String> {
public initializeUserProfile() {
super("initializeUserProfile");
@@ -1295,6 +1444,724 @@ public class UserProfileService {
}
+ public static class getAPIVersion_args implements org.apache.thrift.TBase<getAPIVersion_args, getAPIVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_args");
+
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAPIVersion_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAPIVersion_argsTupleSchemeFactory();
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap);
+ }
+
+ public getAPIVersion_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getAPIVersion_args(getAPIVersion_args other) {
+ }
+
+ public getAPIVersion_args deepCopy() {
+ return new getAPIVersion_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, java.lang.Object value) {
+ switch (field) {
+ }
+ }
+
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getAPIVersion_args)
+ return this.equals((getAPIVersion_args)that);
+ return false;
+ }
+
+ public boolean equals(getAPIVersion_args that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(getAPIVersion_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getAPIVersion_args(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+ try {
+ 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);
+ }
+ }
+
+ private static class getAPIVersion_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ public getAPIVersion_argsStandardScheme getScheme() {
+ return new getAPIVersion_argsStandardScheme();
+ }
+ }
+
+ private static class getAPIVersion_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getAPIVersion_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getAPIVersion_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ public getAPIVersion_argsTupleScheme getScheme() {
+ return new getAPIVersion_argsTupleScheme();
+ }
+ }
+
+ private static class getAPIVersion_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAPIVersion_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
+ public static class getAPIVersion_result implements org.apache.thrift.TBase<getAPIVersion_result, getAPIVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
+ private static final org.apache.thrift.protocol.TField UPE_FIELD_DESC = new org.apache.thrift.protocol.TField("upe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAPIVersion_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAPIVersion_resultTupleSchemeFactory();
+
+ public java.lang.String success; // required
+ public org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ UPE((short)1, "upe");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // UPE
+ return UPE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.UPE, new org.apache.thrift.meta_data.FieldMetaData("upe", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_result.class, metaDataMap);
+ }
+
+ public getAPIVersion_result() {
+ }
+
+ public getAPIVersion_result(
+ java.lang.String success,
+ org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe)
+ {
+ this();
+ this.success = success;
+ this.upe = upe;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getAPIVersion_result(getAPIVersion_result other) {
+ if (other.isSetSuccess()) {
+ this.success = other.success;
+ }
+ if (other.isSetUpe()) {
+ this.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException(other.upe);
+ }
+ }
+
+ public getAPIVersion_result deepCopy() {
+ return new getAPIVersion_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.upe = null;
+ }
+
+ public java.lang.String getSuccess() {
+ return this.success;
+ }
+
+ public getAPIVersion_result setSuccess(java.lang.String success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException getUpe() {
+ return this.upe;
+ }
+
+ public getAPIVersion_result setUpe(org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException upe) {
+ this.upe = upe;
+ return this;
+ }
+
+ public void unsetUpe() {
+ this.upe = null;
+ }
+
+ /** Returns true if field upe is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpe() {
+ return this.upe != null;
+ }
+
+ public void setUpeIsSet(boolean value) {
+ if (!value) {
+ this.upe = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, java.lang.Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((java.lang.String)value);
+ }
+ break;
+
+ case UPE:
+ if (value == null) {
+ unsetUpe();
+ } else {
+ setUpe((org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException)value);
+ }
+ break;
+
+ }
+ }
+
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case UPE:
+ return getUpe();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case UPE:
+ return isSetUpe();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getAPIVersion_result)
+ return this.equals((getAPIVersion_result)that);
+ return false;
+ }
+
+ public boolean equals(getAPIVersion_result that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_upe = true && this.isSetUpe();
+ boolean that_present_upe = true && that.isSetUpe();
+ if (this_present_upe || that_present_upe) {
+ if (!(this_present_upe && that_present_upe))
+ return false;
+ if (!this.upe.equals(that.upe))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetUpe()) ? 131071 : 524287);
+ if (isSetUpe())
+ hashCode = hashCode * 8191 + upe.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(getAPIVersion_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.valueOf(isSetUpe()).compareTo(other.isSetUpe());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpe()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.upe, other.upe);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getAPIVersion_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("upe:");
+ if (this.upe == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.upe);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+ try {
+ 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);
+ }
+ }
+
+ private static class getAPIVersion_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ public getAPIVersion_resultStandardScheme getScheme() {
+ return new getAPIVersion_resultStandardScheme();
+ }
+ }
+
+ private static class getAPIVersion_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getAPIVersion_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.success = iprot.readString();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // UPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
+ struct.upe.read(iprot);
+ struct.setUpeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeString(struct.success);
+ oprot.writeFieldEnd();
+ }
+ if (struct.upe != null) {
+ oprot.writeFieldBegin(UPE_FIELD_DESC);
+ struct.upe.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getAPIVersion_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ public getAPIVersion_resultTupleScheme getScheme() {
+ return new getAPIVersion_resultTupleScheme();
+ }
+ }
+
+ private static class getAPIVersion_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAPIVersion_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetUpe()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ oprot.writeString(struct.success);
+ }
+ if (struct.isSetUpe()) {
+ struct.upe.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = iprot.readString();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.upe = new org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException();
+ struct.upe.read(iprot);
+ struct.setUpeIsSet(true);
+ }
+ }
+ }
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ }
+
public static class initializeUserProfile_args implements org.apache.thrift.TBase<initializeUserProfile_args, initializeUserProfile_args._Fields>, java.io.Serializable, Cloneable, Comparable<initializeUserProfile_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeUserProfile_args");
diff --git a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
index 705211b..185d09f 100644
--- a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
+++ b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift
@@ -81,11 +81,10 @@ service Airavata {
/**
* Fetch Apache Airavata API version
**/
- string getAPIVersion(1: required security_model.AuthzToken authzToken)
+ string getAPIVersion()
throws (1: airavata_errors.InvalidRequestException ire,
2: airavata_errors.AiravataClientException ace,
- 3: airavata_errors.AiravataSystemException ase,
- 4: airavata_errors.AuthorizationException ae)
+ 3: airavata_errors.AiravataSystemException ase)
/**
* Verify if User Exists within Airavata.
diff --git a/thrift-interface-descriptions/service-cpis/profile-service/group-manager/group-manager-cpi.thrift b/thrift-interface-descriptions/service-cpis/profile-service/group-manager/group-manager-cpi.thrift
index 4adab43..90aec3a 100644
--- a/thrift-interface-descriptions/service-cpis/profile-service/group-manager/group-manager-cpi.thrift
+++ b/thrift-interface-descriptions/service-cpis/profile-service/group-manager/group-manager-cpi.thrift
@@ -37,6 +37,9 @@ const string GROUP_MANAGER_CPI_NAME = "GroupManagerService"
service GroupManagerService {
+ string getAPIVersion ()
+ throws (1: group_manager_cpi_errors.GroupManagerServiceException gse)
+
string createGroup(1: required security_model.AuthzToken authzToken, 2: required group_manager_model.GroupModel groupModel)
throws (1: group_manager_cpi_errors.GroupManagerServiceException gse,
2: airavata_errors.AuthorizationException ae);
diff --git a/thrift-interface-descriptions/service-cpis/profile-service/iam-admin-services/iam-admin-services-cpi.thrift b/thrift-interface-descriptions/service-cpis/profile-service/iam-admin-services/iam-admin-services-cpi.thrift
index 4bc68e5..9598716 100644
--- a/thrift-interface-descriptions/service-cpis/profile-service/iam-admin-services/iam-admin-services-cpi.thrift
+++ b/thrift-interface-descriptions/service-cpis/profile-service/iam-admin-services/iam-admin-services-cpi.thrift
@@ -39,9 +39,9 @@ const string IAM_ADMIN_SERVICES_CPI_NAME = "IamAdminServices"
service IamAdminServices {
- string getAPIVersion (1: required security_model.AuthzToken authzToken)
- throws (1: iam_admin_services_cpi_errors.IamAdminServicesException Idse,
- 2: airavata_errors.AuthorizationException ae)
+ string getAPIVersion ()
+ throws (1: iam_admin_services_cpi_errors.IamAdminServicesException Idse)
+
workspace_model.Gateway setUpGateway (1: required security_model.AuthzToken authzToken,
diff --git a/thrift-interface-descriptions/service-cpis/profile-service/profile-tenant/profile-tenant-cpi.thrift b/thrift-interface-descriptions/service-cpis/profile-service/profile-tenant/profile-tenant-cpi.thrift
index c7e457d..1131a20 100644
--- a/thrift-interface-descriptions/service-cpis/profile-service/profile-tenant/profile-tenant-cpi.thrift
+++ b/thrift-interface-descriptions/service-cpis/profile-service/profile-tenant/profile-tenant-cpi.thrift
@@ -37,9 +37,8 @@ const string TENANT_PROFILE_CPI_NAME = "TenantProfileService"
service TenantProfileService {
- string getAPIVersion (1: required security_model.AuthzToken authzToken)
- throws (1: profile_tenant_cpi_errors.TenantProfileServiceException tpe,
- 2: airavata_errors.AuthorizationException ae)
+ string getAPIVersion ()
+ throws (1: profile_tenant_cpi_errors.TenantProfileServiceException tpe)
/**
* Return the airavataInternalGatewayId assigned to given gateway.
diff --git a/thrift-interface-descriptions/service-cpis/profile-service/profile-user/profile-user-cpi.thrift b/thrift-interface-descriptions/service-cpis/profile-service/profile-user/profile-user-cpi.thrift
index 653d365..c85055e 100644
--- a/thrift-interface-descriptions/service-cpis/profile-service/profile-user/profile-user-cpi.thrift
+++ b/thrift-interface-descriptions/service-cpis/profile-service/profile-user/profile-user-cpi.thrift
@@ -38,6 +38,9 @@ const string USER_PROFILE_CPI_NAME = "UserProfileService"
service UserProfileService {
+ string getAPIVersion ()
+ throws (1: profile_user_cpi_errors.UserProfileServiceException upe)
+
/**
* Create an initial UserProfile based on information in the IAM service for this user.
*/
|