You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2017/05/24 21:34:43 UTC
[33/61] [abbrv] airavata git commit: Remove references to userName
and instead use userId
Remove references to userName and instead use userId
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/f5a4e9dd
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/f5a4e9dd
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/f5a4e9dd
Branch: refs/heads/master
Commit: f5a4e9dd574b2dafa6a070951f6f6cd5f3fa1b20
Parents: d0f3f5c
Author: Gourav Shenoy <go...@apache.org>
Authored: Mon May 8 13:58:26 2017 -0400
Committer: Gourav Shenoy <go...@apache.org>
Committed: Mon May 8 13:58:26 2017 -0400
----------------------------------------------------------------------
.../server/handler/AiravataServerHandler.java | 16 -
.../java/org/apache/airavata/api/Airavata.java | 1710 +-----------------
.../apache/airavata/model/user/UserProfile.java | 274 +--
.../core/impl/TenantManagementKeycloakImpl.java | 3 +-
.../services/core/tests/SetupNewGateway.java | 3 +-
.../client/samples/UserProfileSample.java | 18 +-
.../profile/commons/utils/QueryConstants.java | 4 -
.../handlers/UserProfileServiceHandler.java | 26 +-
.../profile/user/cpi/UserProfileService.java | 1500 +--------------
.../repositories/UserProfileRepository.java | 16 -
.../service/handler/RegistryServerHandler.java | 8 +-
.../utils/ThriftDataModelConversion.java | 2 +-
.../org/apache/airavata/MigrationManager.java | 3 +-
.../airavata-apis/airavata_api.thrift | 8 +-
.../user_profile_model.thrift | 31 +-
.../profile-user/profile-user-cpi.thrift | 8 +-
16 files changed, 306 insertions(+), 3324 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/f5a4e9dd/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------
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 e69f773..14fc841 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
@@ -4871,22 +4871,6 @@ public class AiravataServerHandler implements Airavata.Iface {
@Override
@SecurityCheck
- public UserProfile getUserProfileByName(AuthzToken authzToken, String userName, String gatewayId)
- throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
-
- try {
- return getUserProfileServiceClient().getUserProfileByName(authzToken, userName, gatewayId);
- } catch (Exception e) {
- String msg = MessageFormat.format("Error getting user profile for [{0}] in [{1}]", userName, gatewayId);
- logger.error(msg, e);
- AiravataSystemException exception = new AiravataSystemException(AiravataErrorType.INTERNAL_ERROR);
- exception.setMessage(msg + " More info : " + e.getMessage());
- throw exception;
- }
- }
-
- @Override
- @SecurityCheck
public boolean doesUserProfileExist(AuthzToken authzToken, String userName, String gatewayId)
throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
http://git-wip-us.apache.org/repos/asf/airavata/blob/f5a4e9dd/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/Airavata.java
----------------------------------------------------------------------
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 14e75c4..cc00868 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
@@ -3031,9 +3031,7 @@ public class Airavata {
public List<org.apache.airavata.model.user.UserProfile> getAllUserProfilesInGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, int offset, int limit) 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 org.apache.airavata.model.user.UserProfile getUserProfileByName(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId) 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 boolean doesUserProfileExist(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId) 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 boolean doesUserProfileExist(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayId) 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;
}
@@ -3387,9 +3385,7 @@ public class Airavata {
public void getAllUserProfilesInGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, int offset, int limit, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void getUserProfileByName(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void doesUserProfileExist(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void doesUserProfileExist(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
}
@@ -9811,54 +9807,17 @@ public class Airavata {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllUserProfilesInGateway failed: unknown result");
}
- public org.apache.airavata.model.user.UserProfile getUserProfileByName(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId) 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
- {
- send_getUserProfileByName(authzToken, userName, gatewayId);
- return recv_getUserProfileByName();
- }
-
- public void send_getUserProfileByName(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId) throws org.apache.thrift.TException
+ public boolean doesUserProfileExist(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayId) 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
{
- getUserProfileByName_args args = new getUserProfileByName_args();
- args.setAuthzToken(authzToken);
- args.setUserName(userName);
- args.setGatewayId(gatewayId);
- sendBase("getUserProfileByName", args);
- }
-
- public org.apache.airavata.model.user.UserProfile recv_getUserProfileByName() 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
- {
- getUserProfileByName_result result = new getUserProfileByName_result();
- receiveBase(result, "getUserProfileByName");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.ire != null) {
- throw result.ire;
- }
- if (result.ace != null) {
- throw result.ace;
- }
- if (result.ase != null) {
- throw result.ase;
- }
- if (result.ae != null) {
- throw result.ae;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserProfileByName failed: unknown result");
- }
-
- public boolean doesUserProfileExist(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId) 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
- {
- send_doesUserProfileExist(authzToken, userName, gatewayId);
+ send_doesUserProfileExist(authzToken, userId, gatewayId);
return recv_doesUserProfileExist();
}
- public void send_doesUserProfileExist(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId) throws org.apache.thrift.TException
+ public void send_doesUserProfileExist(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayId) throws org.apache.thrift.TException
{
doesUserProfileExist_args args = new doesUserProfileExist_args();
args.setAuthzToken(authzToken);
- args.setUserName(userName);
+ args.setUserId(userId);
args.setGatewayId(gatewayId);
sendBase("doesUserProfileExist", args);
}
@@ -16422,59 +16381,21 @@ public class Airavata {
}
}
- public void getUserProfileByName(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void doesUserProfileExist(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
- getUserProfileByName_call method_call = new getUserProfileByName_call(authzToken, userName, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getUserProfileByName_call extends org.apache.thrift.async.TAsyncMethodCall {
- private org.apache.airavata.model.security.AuthzToken authzToken;
- private String userName;
- private String gatewayId;
- public getUserProfileByName_call(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId, org.apache.thrift.async.AsyncMethodCallback 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;
- this.userName = userName;
- this.gatewayId = gatewayId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserProfileByName", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getUserProfileByName_args args = new getUserProfileByName_args();
- args.setAuthzToken(authzToken);
- args.setUserName(userName);
- args.setGatewayId(gatewayId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public org.apache.airavata.model.user.UserProfile 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 {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new 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_getUserProfileByName();
- }
- }
-
- public void doesUserProfileExist(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- doesUserProfileExist_call method_call = new doesUserProfileExist_call(authzToken, userName, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
+ doesUserProfileExist_call method_call = new doesUserProfileExist_call(authzToken, userId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class doesUserProfileExist_call extends org.apache.thrift.async.TAsyncMethodCall {
private org.apache.airavata.model.security.AuthzToken authzToken;
- private String userName;
+ private String userId;
private String gatewayId;
- public doesUserProfileExist_call(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId, org.apache.thrift.async.AsyncMethodCallback 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 doesUserProfileExist_call(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback 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;
- this.userName = userName;
+ this.userId = userId;
this.gatewayId = gatewayId;
}
@@ -16482,7 +16403,7 @@ public class Airavata {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("doesUserProfileExist", org.apache.thrift.protocol.TMessageType.CALL, 0));
doesUserProfileExist_args args = new doesUserProfileExist_args();
args.setAuthzToken(authzToken);
- args.setUserName(userName);
+ args.setUserId(userId);
args.setGatewayId(gatewayId);
args.write(prot);
prot.writeMessageEnd();
@@ -16685,7 +16606,6 @@ public class Airavata {
processMap.put("getUserProfileById", new getUserProfileById());
processMap.put("deleteUserProfile", new deleteUserProfile());
processMap.put("getAllUserProfilesInGateway", new getAllUserProfilesInGateway());
- processMap.put("getUserProfileByName", new getUserProfileByName());
processMap.put("doesUserProfileExist", new doesUserProfileExist());
return processMap;
}
@@ -21982,36 +21902,6 @@ public class Airavata {
}
}
- public static class getUserProfileByName<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserProfileByName_args> {
- public getUserProfileByName() {
- super("getUserProfileByName");
- }
-
- public getUserProfileByName_args getEmptyArgsInstance() {
- return new getUserProfileByName_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getUserProfileByName_result getResult(I iface, getUserProfileByName_args args) throws org.apache.thrift.TException {
- getUserProfileByName_result result = new getUserProfileByName_result();
- try {
- result.success = iface.getUserProfileByName(args.authzToken, args.userName, args.gatewayId);
- } 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;
- }
- }
-
public static class doesUserProfileExist<I extends Iface> extends org.apache.thrift.ProcessFunction<I, doesUserProfileExist_args> {
public doesUserProfileExist() {
super("doesUserProfileExist");
@@ -22028,7 +21918,7 @@ public class Airavata {
public doesUserProfileExist_result getResult(I iface, doesUserProfileExist_args args) throws org.apache.thrift.TException {
doesUserProfileExist_result result = new doesUserProfileExist_result();
try {
- result.success = iface.doesUserProfileExist(args.authzToken, args.userName, args.gatewayId);
+ result.success = iface.doesUserProfileExist(args.authzToken, args.userId, args.gatewayId);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.model.error.InvalidRequestException ire) {
result.ire = ire;
@@ -22230,7 +22120,6 @@ public class Airavata {
processMap.put("getUserProfileById", new getUserProfileById());
processMap.put("deleteUserProfile", new deleteUserProfile());
processMap.put("getAllUserProfilesInGateway", new getAllUserProfilesInGateway());
- processMap.put("getUserProfileByName", new getUserProfileByName());
processMap.put("doesUserProfileExist", new doesUserProfileExist());
return processMap;
}
@@ -34842,78 +34731,6 @@ public class Airavata {
}
}
- public static class getUserProfileByName<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserProfileByName_args, org.apache.airavata.model.user.UserProfile> {
- public getUserProfileByName() {
- super("getUserProfileByName");
- }
-
- public getUserProfileByName_args getEmptyArgsInstance() {
- return new getUserProfileByName_args();
- }
-
- public AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<org.apache.airavata.model.user.UserProfile>() {
- public void onComplete(org.apache.airavata.model.user.UserProfile o) {
- getUserProfileByName_result result = new getUserProfileByName_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getUserProfileByName_result result = new getUserProfileByName_result();
- if (e instanceof org.apache.airavata.model.error.InvalidRequestException) {
- result.ire = (org.apache.airavata.model.error.InvalidRequestException) e;
- result.setIreIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.airavata.model.error.AiravataClientException) {
- result.ace = (org.apache.airavata.model.error.AiravataClientException) e;
- result.setAceIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.airavata.model.error.AiravataSystemException) {
- 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
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, getUserProfileByName_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> resultHandler) throws TException {
- iface.getUserProfileByName(args.authzToken, args.userName, args.gatewayId,resultHandler);
- }
- }
-
public static class doesUserProfileExist<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, doesUserProfileExist_args, Boolean> {
public doesUserProfileExist() {
super("doesUserProfileExist");
@@ -34983,7 +34800,7 @@ public class Airavata {
}
public void start(I iface, doesUserProfileExist_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.doesUserProfileExist(args.authzToken, args.userName, args.gatewayId,resultHandler);
+ iface.doesUserProfileExist(args.authzToken, args.userId, args.gatewayId,resultHandler);
}
}
@@ -269549,27 +269366,27 @@ public class Airavata {
}
- public static class getUserProfileByName_args implements org.apache.thrift.TBase<getUserProfileByName_args, getUserProfileByName_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserProfileByName_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserProfileByName_args");
+ public static class doesUserProfileExist_args implements org.apache.thrift.TBase<doesUserProfileExist_args, doesUserProfileExist_args._Fields>, java.io.Serializable, Cloneable, Comparable<doesUserProfileExist_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("doesUserProfileExist_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.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
- schemes.put(StandardScheme.class, new getUserProfileByName_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getUserProfileByName_argsTupleSchemeFactory());
+ schemes.put(StandardScheme.class, new doesUserProfileExist_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new doesUserProfileExist_argsTupleSchemeFactory());
}
public org.apache.airavata.model.security.AuthzToken authzToken; // required
- public String userName; // required
+ public String userId; // required
public String gatewayId; // 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"),
- USER_NAME((short)2, "userName"),
+ USER_ID((short)2, "userId"),
GATEWAY_ID((short)3, "gatewayId");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -269587,8 +269404,8 @@ public class Airavata {
switch(fieldId) {
case 1: // AUTHZ_TOKEN
return AUTHZ_TOKEN;
- case 2: // USER_NAME
- return USER_NAME;
+ case 2: // USER_ID
+ return USER_ID;
case 3: // GATEWAY_ID
return GATEWAY_ID;
default:
@@ -269636,51 +269453,51 @@ public class Airavata {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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)));
- tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserProfileByName_args.class, metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(doesUserProfileExist_args.class, metaDataMap);
}
- public getUserProfileByName_args() {
+ public doesUserProfileExist_args() {
}
- public getUserProfileByName_args(
+ public doesUserProfileExist_args(
org.apache.airavata.model.security.AuthzToken authzToken,
- String userName,
+ String userId,
String gatewayId)
{
this();
this.authzToken = authzToken;
- this.userName = userName;
+ this.userId = userId;
this.gatewayId = gatewayId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
- public getUserProfileByName_args(getUserProfileByName_args other) {
+ public doesUserProfileExist_args(doesUserProfileExist_args other) {
if (other.isSetAuthzToken()) {
this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
}
- if (other.isSetUserName()) {
- this.userName = other.userName;
+ if (other.isSetUserId()) {
+ this.userId = other.userId;
}
if (other.isSetGatewayId()) {
this.gatewayId = other.gatewayId;
}
}
- public getUserProfileByName_args deepCopy() {
- return new getUserProfileByName_args(this);
+ public doesUserProfileExist_args deepCopy() {
+ return new doesUserProfileExist_args(this);
}
@Override
public void clear() {
this.authzToken = null;
- this.userName = null;
+ this.userId = null;
this.gatewayId = null;
}
@@ -269688,7 +269505,7 @@ public class Airavata {
return this.authzToken;
}
- public getUserProfileByName_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
+ public doesUserProfileExist_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
this.authzToken = authzToken;
return this;
}
@@ -269708,27 +269525,27 @@ public class Airavata {
}
}
- public String getUserName() {
- return this.userName;
+ public String getUserId() {
+ return this.userId;
}
- public getUserProfileByName_args setUserName(String userName) {
- this.userName = userName;
+ public doesUserProfileExist_args setUserId(String userId) {
+ this.userId = userId;
return this;
}
- public void unsetUserName() {
- this.userName = null;
+ public void unsetUserId() {
+ this.userId = null;
}
- /** Returns true if field userName is set (has been assigned a value) and false otherwise */
- public boolean isSetUserName() {
- return this.userName != null;
+ /** Returns true if field userId is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserId() {
+ return this.userId != null;
}
- public void setUserNameIsSet(boolean value) {
+ public void setUserIdIsSet(boolean value) {
if (!value) {
- this.userName = null;
+ this.userId = null;
}
}
@@ -269736,7 +269553,7 @@ public class Airavata {
return this.gatewayId;
}
- public getUserProfileByName_args setGatewayId(String gatewayId) {
+ public doesUserProfileExist_args setGatewayId(String gatewayId) {
this.gatewayId = gatewayId;
return this;
}
@@ -269766,11 +269583,11 @@ public class Airavata {
}
break;
- case USER_NAME:
+ case USER_ID:
if (value == null) {
- unsetUserName();
+ unsetUserId();
} else {
- setUserName((String)value);
+ setUserId((String)value);
}
break;
@@ -269790,8 +269607,8 @@ public class Airavata {
case AUTHZ_TOKEN:
return getAuthzToken();
- case USER_NAME:
- return getUserName();
+ case USER_ID:
+ return getUserId();
case GATEWAY_ID:
return getGatewayId();
@@ -269809,8 +269626,8 @@ public class Airavata {
switch (field) {
case AUTHZ_TOKEN:
return isSetAuthzToken();
- case USER_NAME:
- return isSetUserName();
+ case USER_ID:
+ return isSetUserId();
case GATEWAY_ID:
return isSetGatewayId();
}
@@ -269821,12 +269638,12 @@ public class Airavata {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof getUserProfileByName_args)
- return this.equals((getUserProfileByName_args)that);
+ if (that instanceof doesUserProfileExist_args)
+ return this.equals((doesUserProfileExist_args)that);
return false;
}
- public boolean equals(getUserProfileByName_args that) {
+ public boolean equals(doesUserProfileExist_args that) {
if (that == null)
return false;
@@ -269839,12 +269656,12 @@ public class Airavata {
return false;
}
- boolean this_present_userName = true && this.isSetUserName();
- boolean that_present_userName = true && that.isSetUserName();
- if (this_present_userName || that_present_userName) {
- if (!(this_present_userName && that_present_userName))
+ boolean this_present_userId = true && this.isSetUserId();
+ boolean that_present_userId = true && that.isSetUserId();
+ if (this_present_userId || that_present_userId) {
+ if (!(this_present_userId && that_present_userId))
return false;
- if (!this.userName.equals(that.userName))
+ if (!this.userId.equals(that.userId))
return false;
}
@@ -269869,10 +269686,10 @@ public class Airavata {
if (present_authzToken)
list.add(authzToken);
- boolean present_userName = true && (isSetUserName());
- list.add(present_userName);
- if (present_userName)
- list.add(userName);
+ boolean present_userId = true && (isSetUserId());
+ list.add(present_userId);
+ if (present_userId)
+ list.add(userId);
boolean present_gatewayId = true && (isSetGatewayId());
list.add(present_gatewayId);
@@ -269883,7 +269700,7 @@ public class Airavata {
}
@Override
- public int compareTo(getUserProfileByName_args other) {
+ public int compareTo(doesUserProfileExist_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
@@ -269900,12 +269717,12 @@ public class Airavata {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
+ lastComparison = Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetUserName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
+ if (isSetUserId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId);
if (lastComparison != 0) {
return lastComparison;
}
@@ -269937,7 +269754,7 @@ public class Airavata {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("getUserProfileByName_args(");
+ StringBuilder sb = new StringBuilder("doesUserProfileExist_args(");
boolean first = true;
sb.append("authzToken:");
@@ -269948,11 +269765,11 @@ public class Airavata {
}
first = false;
if (!first) sb.append(", ");
- sb.append("userName:");
- if (this.userName == null) {
+ sb.append("userId:");
+ if (this.userId == null) {
sb.append("null");
} else {
- sb.append(this.userName);
+ sb.append(this.userId);
}
first = false;
if (!first) sb.append(", ");
@@ -269972,1363 +269789,8 @@ public class Airavata {
if (authzToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString());
}
- if (userName == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'userName' was not present! Struct: " + toString());
- }
- if (gatewayId == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' 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 {
- 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, 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 getUserProfileByName_argsStandardSchemeFactory implements SchemeFactory {
- public getUserProfileByName_argsStandardScheme getScheme() {
- return new getUserProfileByName_argsStandardScheme();
- }
- }
-
- private static class getUserProfileByName_argsStandardScheme extends StandardScheme<getUserProfileByName_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getUserProfileByName_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) {
- 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;
- case 2: // USER_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userName = iprot.readString();
- struct.setUserNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // GATEWAY_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.gatewayId = iprot.readString();
- struct.setGatewayIdIsSet(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, getUserProfileByName_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.authzToken != null) {
- oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC);
- struct.authzToken.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.userName != null) {
- oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
- oprot.writeString(struct.userName);
- oprot.writeFieldEnd();
- }
- if (struct.gatewayId != null) {
- oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
- oprot.writeString(struct.gatewayId);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getUserProfileByName_argsTupleSchemeFactory implements SchemeFactory {
- public getUserProfileByName_argsTupleScheme getScheme() {
- return new getUserProfileByName_argsTupleScheme();
- }
- }
-
- private static class getUserProfileByName_argsTupleScheme extends TupleScheme<getUserProfileByName_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getUserProfileByName_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- struct.authzToken.write(oprot);
- oprot.writeString(struct.userName);
- oprot.writeString(struct.gatewayId);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getUserProfileByName_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
- struct.authzToken.read(iprot);
- struct.setAuthzTokenIsSet(true);
- struct.userName = iprot.readString();
- struct.setUserNameIsSet(true);
- struct.gatewayId = iprot.readString();
- struct.setGatewayIdIsSet(true);
- }
- }
-
- }
-
- public static class getUserProfileByName_result implements org.apache.thrift.TBase<getUserProfileByName_result, getUserProfileByName_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserProfileByName_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserProfileByName_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
- 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getUserProfileByName_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getUserProfileByName_resultTupleSchemeFactory());
- }
-
- public org.apache.airavata.model.user.UserProfile success; // required
- 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");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : 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: // IRE
- return IRE;
- case 2: // ACE
- return ACE;
- case 3: // ASE
- return ASE;
- case 4: // AE
- return AE;
- 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 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(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.user.UserProfile.class)));
- tmpMap.put(_Fields.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- tmpMap.put(_Fields.ACE, new org.apache.thrift.meta_data.FieldMetaData("ace", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- tmpMap.put(_Fields.ASE, new org.apache.thrift.meta_data.FieldMetaData("ase", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserProfileByName_result.class, metaDataMap);
- }
-
- public getUserProfileByName_result() {
- }
-
- public getUserProfileByName_result(
- org.apache.airavata.model.user.UserProfile 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)
- {
- this();
- this.success = success;
- this.ire = ire;
- this.ace = ace;
- this.ase = ase;
- this.ae = ae;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getUserProfileByName_result(getUserProfileByName_result other) {
- if (other.isSetSuccess()) {
- this.success = new org.apache.airavata.model.user.UserProfile(other.success);
- }
- if (other.isSetIre()) {
- this.ire = new org.apache.airavata.model.error.InvalidRequestException(other.ire);
- }
- if (other.isSetAce()) {
- this.ace = new org.apache.airavata.model.error.AiravataClientException(other.ace);
- }
- 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 getUserProfileByName_result deepCopy() {
- return new getUserProfileByName_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- this.ire = null;
- this.ace = null;
- this.ase = null;
- this.ae = null;
- }
-
- public org.apache.airavata.model.user.UserProfile getSuccess() {
- return this.success;
- }
-
- public getUserProfileByName_result setSuccess(org.apache.airavata.model.user.UserProfile 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.model.error.InvalidRequestException getIre() {
- return this.ire;
- }
-
- public getUserProfileByName_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) {
- this.ire = ire;
- return this;
- }
-
- public void unsetIre() {
- this.ire = null;
- }
-
- /** Returns true if field ire is set (has been assigned a value) and false otherwise */
- public boolean isSetIre() {
- return this.ire != null;
- }
-
- public void setIreIsSet(boolean value) {
- if (!value) {
- this.ire = null;
- }
- }
-
- public org.apache.airavata.model.error.AiravataClientException getAce() {
- return this.ace;
- }
-
- public getUserProfileByName_result setAce(org.apache.airavata.model.error.AiravataClientException ace) {
- this.ace = ace;
- return this;
- }
-
- public void unsetAce() {
- this.ace = null;
- }
-
- /** Returns true if field ace is set (has been assigned a value) and false otherwise */
- public boolean isSetAce() {
- return this.ace != null;
- }
-
- public void setAceIsSet(boolean value) {
- if (!value) {
- this.ace = null;
- }
- }
-
- public org.apache.airavata.model.error.AiravataSystemException getAse() {
- return this.ase;
- }
-
- public getUserProfileByName_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) {
- this.ase = ase;
- return this;
- }
-
- public void unsetAse() {
- this.ase = null;
- }
-
- /** Returns true if field ase is set (has been assigned a value) and false otherwise */
- public boolean isSetAse() {
- return this.ase != null;
- }
-
- public void setAseIsSet(boolean value) {
- if (!value) {
- this.ase = null;
- }
- }
-
- public org.apache.airavata.model.error.AuthorizationException getAe() {
- return this.ae;
- }
-
- public getUserProfileByName_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, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((org.apache.airavata.model.user.UserProfile)value);
- }
- break;
-
- case IRE:
- if (value == null) {
- unsetIre();
- } else {
- setIre((org.apache.airavata.model.error.InvalidRequestException)value);
- }
- break;
-
- case ACE:
- if (value == null) {
- unsetAce();
- } else {
- setAce((org.apache.airavata.model.error.AiravataClientException)value);
- }
- break;
-
- case ASE:
- if (value == null) {
- unsetAse();
- } else {
- setAse((org.apache.airavata.model.error.AiravataSystemException)value);
- }
- break;
-
- case AE:
- if (value == null) {
- unsetAe();
- } else {
- setAe((org.apache.airavata.model.error.AuthorizationException)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- case IRE:
- return getIre();
-
- case ACE:
- return getAce();
-
- case ASE:
- return getAse();
-
- case AE:
- return getAe();
-
- }
- throw new 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 IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- case IRE:
- return isSetIre();
- case ACE:
- return isSetAce();
- case ASE:
- return isSetAse();
- case AE:
- return isSetAe();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getUserProfileByName_result)
- return this.equals((getUserProfileByName_result)that);
- return false;
- }
-
- public boolean equals(getUserProfileByName_result that) {
- if (that == null)
- return false;
-
- 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_ire = true && this.isSetIre();
- boolean that_present_ire = true && that.isSetIre();
- if (this_present_ire || that_present_ire) {
- if (!(this_present_ire && that_present_ire))
- return false;
- if (!this.ire.equals(that.ire))
- return false;
- }
-
- boolean this_present_ace = true && this.isSetAce();
- boolean that_present_ace = true && that.isSetAce();
- if (this_present_ace || that_present_ace) {
- if (!(this_present_ace && that_present_ace))
- return false;
- if (!this.ace.equals(that.ace))
- return false;
- }
-
- boolean this_present_ase = true && this.isSetAse();
- boolean that_present_ase = true && that.isSetAse();
- if (this_present_ase || that_present_ase) {
- if (!(this_present_ase && that_present_ase))
- return false;
- if (!this.ase.equals(that.ase))
- 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;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
-
- boolean present_ire = true && (isSetIre());
- list.add(present_ire);
- if (present_ire)
- list.add(ire);
-
- boolean present_ace = true && (isSetAce());
- list.add(present_ace);
- if (present_ace)
- list.add(ace);
-
- boolean present_ase = true && (isSetAse());
- list.add(present_ase);
- if (present_ase)
- list.add(ase);
-
- boolean present_ae = true && (isSetAe());
- list.add(present_ae);
- if (present_ae)
- list.add(ae);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(getUserProfileByName_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = 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 = Boolean.valueOf(isSetIre()).compareTo(other.isSetIre());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIre()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, other.ire);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetAce()).compareTo(other.isSetAce());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAce()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ace, other.ace);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetAse()).compareTo(other.isSetAse());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAse()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ase, other.ase);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = 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;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getUserProfileByName_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("ire:");
- if (this.ire == null) {
- sb.append("null");
- } else {
- sb.append(this.ire);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("ace:");
- if (this.ace == null) {
- sb.append("null");
- } else {
- sb.append(this.ace);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("ase:");
- if (this.ase == null) {
- sb.append("null");
- } else {
- 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();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (success != null) {
- success.validate();
- }
- }
-
- 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, 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 getUserProfileByName_resultStandardSchemeFactory implements SchemeFactory {
- public getUserProfileByName_resultStandardScheme getScheme() {
- return new getUserProfileByName_resultStandardScheme();
- }
- }
-
- private static class getUserProfileByName_resultStandardScheme extends StandardScheme<getUserProfileByName_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getUserProfileByName_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.STRUCT) {
- struct.success = new org.apache.airavata.model.user.UserProfile();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 1: // IRE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.ire = new org.apache.airavata.model.error.InvalidRequestException();
- struct.ire.read(iprot);
- struct.setIreIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // ACE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.ace = new org.apache.airavata.model.error.AiravataClientException();
- struct.ace.read(iprot);
- struct.setAceIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // ASE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.ase = new org.apache.airavata.model.error.AiravataSystemException();
- struct.ase.read(iprot);
- struct.setAseIsSet(true);
- } else {
- 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);
- }
- 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, getUserProfileByName_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- struct.success.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.ire != null) {
- oprot.writeFieldBegin(IRE_FIELD_DESC);
- struct.ire.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.ace != null) {
- oprot.writeFieldBegin(ACE_FIELD_DESC);
- struct.ace.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.ase != null) {
- oprot.writeFieldBegin(ASE_FIELD_DESC);
- 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();
- }
-
- }
-
- private static class getUserProfileByName_resultTupleSchemeFactory implements SchemeFactory {
- public getUserProfileByName_resultTupleScheme getScheme() {
- return new getUserProfileByName_resultTupleScheme();
- }
- }
-
- private static class getUserProfileByName_resultTupleScheme extends TupleScheme<getUserProfileByName_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getUserProfileByName_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- if (struct.isSetIre()) {
- optionals.set(1);
- }
- if (struct.isSetAce()) {
- optionals.set(2);
- }
- if (struct.isSetAse()) {
- optionals.set(3);
- }
- if (struct.isSetAe()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
- if (struct.isSetSuccess()) {
- struct.success.write(oprot);
- }
- if (struct.isSetIre()) {
- struct.ire.write(oprot);
- }
- if (struct.isSetAce()) {
- struct.ace.write(oprot);
- }
- if (struct.isSetAse()) {
- struct.ase.write(oprot);
- }
- if (struct.isSetAe()) {
- struct.ae.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getUserProfileByName_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
- if (incoming.get(0)) {
- struct.success = new org.apache.airavata.model.user.UserProfile();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- }
- if (incoming.get(1)) {
- struct.ire = new org.apache.airavata.model.error.InvalidRequestException();
- struct.ire.read(iprot);
- struct.setIreIsSet(true);
- }
- if (incoming.get(2)) {
- struct.ace = new org.apache.airavata.model.error.AiravataClientException();
- struct.ace.read(iprot);
- struct.setAceIsSet(true);
- }
- if (incoming.get(3)) {
- struct.ase = new org.apache.airavata.model.error.AiravataSystemException();
- 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);
- }
- }
- }
-
- }
-
- public static class doesUserProfileExist_args implements org.apache.thrift.TBase<doesUserProfileExist_args, doesUserProfileExist_args._Fields>, java.io.Serializable, Cloneable, Comparable<doesUserProfileExist_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("doesUserProfileExist_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.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new doesUserProfileExist_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new doesUserProfileExist_argsTupleSchemeFactory());
- }
-
- public org.apache.airavata.model.security.AuthzToken authzToken; // required
- public String userName; // required
- public String gatewayId; // 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"),
- USER_NAME((short)2, "userName"),
- GATEWAY_ID((short)3, "gatewayId");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : 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 1: // AUTHZ_TOKEN
- return AUTHZ_TOKEN;
- case 2: // USER_NAME
- return USER_NAME;
- case 3: // GATEWAY_ID
- return GATEWAY_ID;
- 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 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(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- 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)));
- tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(doesUserProfileExist_args.class, metaDataMap);
- }
-
- public doesUserProfileExist_args() {
- }
-
- public doesUserProfileExist_args(
- org.apache.airavata.model.security.AuthzToken authzToken,
- String userName,
- String gatewayId)
- {
- this();
- this.authzToken = authzToken;
- this.userName = userName;
- this.gatewayId = gatewayId;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public doesUserProfileExist_args(doesUserProfileExist_args other) {
- if (other.isSetAuthzToken()) {
- this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
- }
- if (other.isSetUserName()) {
- this.userName = other.userName;
- }
- if (other.isSetGatewayId()) {
- this.gatewayId = other.gatewayId;
- }
- }
-
- public doesUserProfileExist_args deepCopy() {
- return new doesUserProfileExist_args(this);
- }
-
- @Override
- public void clear() {
- this.authzToken = null;
- this.userName = null;
- this.gatewayId = null;
- }
-
- public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
- return this.authzToken;
- }
-
- public doesUserProfileExist_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 String getUserName() {
- return this.userName;
- }
-
- public doesUserProfileExist_args setUserName(String userName) {
- this.userName = userName;
- return this;
- }
-
- public void unsetUserName() {
- this.userName = null;
- }
-
- /** Returns true if field userName is set (has been assigned a value) and false otherwise */
- public boolean isSetUserName() {
- return this.userName != null;
- }
-
- public void setUserNameIsSet(boolean value) {
- if (!value) {
- this.userName = null;
- }
- }
-
- public String getGatewayId() {
- return this.gatewayId;
- }
-
- public doesUserProfileExist_args setGatewayId(String gatewayId) {
- this.gatewayId = gatewayId;
- return this;
- }
-
- public void unsetGatewayId() {
- this.gatewayId = null;
- }
-
- /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
- public boolean isSetGatewayId() {
- return this.gatewayId != null;
- }
-
- public void setGatewayIdIsSet(boolean value) {
- if (!value) {
- this.gatewayId = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case AUTHZ_TOKEN:
- if (value == null) {
- unsetAuthzToken();
- } else {
- setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
- }
- break;
-
- case USER_NAME:
- if (value == null) {
- unsetUserName();
- } else {
- setUserName((String)value);
- }
- break;
-
- case GATEWAY_ID:
- if (value == null) {
- unsetGatewayId();
- } else {
- setGatewayId((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case AUTHZ_TOKEN:
- return getAuthzToken();
-
- case USER_NAME:
- return getUserName();
-
- case GATEWAY_ID:
- return getGatewayId();
-
- }
- throw new 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 IllegalArgumentException();
- }
-
- switch (field) {
- case AUTHZ_TOKEN:
- return isSetAuthzToken();
- case USER_NAME:
- return isSetUserName();
- case GATEWAY_ID:
- return isSetGatewayId();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof doesUserProfileExist_args)
- return this.equals((doesUserProfileExist_args)that);
- return false;
- }
-
- public boolean equals(doesUserProfileExist_args that) {
- if (that == null)
- return false;
-
- 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;
- }
-
- boolean this_present_userName = true && this.isSetUserName();
- boolean that_present_userName = true && that.isSetUserName();
- if (this_present_userName || that_present_userName) {
- if (!(this_present_userName && that_present_userName))
- return false;
- if (!this.userName.equals(that.userName))
- return false;
- }
-
- boolean this_present_gatewayId = true && this.isSetGatewayId();
- boolean that_present_gatewayId = true && that.isSetGatewayId();
- if (this_present_gatewayId || that_present_gatewayId) {
- if (!(this_present_gatewayId && that_present_gatewayId))
- return false;
- if (!this.gatewayId.equals(that.gatewayId))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_authzToken = true && (isSetAuthzToken());
- list.add(present_authzToken);
- if (present_authzToken)
- list.add(authzToken);
-
- boolean present_userName = true && (isSetUserName());
- list.add(present_userName);
- if (present_userName)
- list.add(userName);
-
- boolean present_gatewayId = true && (isSetGatewayId());
- list.add(present_gatewayId);
- if (present_gatewayId)
- list.add(gatewayId);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(doesUserProfileExist_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = 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;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGatewayId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
- 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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("doesUserProfileExist_args(");
- boolean first = true;
-
- sb.append("authzToken:");
- if (this.authzToken == null) {
- sb.append("null");
- } else {
- sb.append(this.authzToken);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("userName:");
- if (this.userName == null) {
- sb.append("null");
- } else {
- sb.append(this.userName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("gatewayId:");
- if (this.gatewayId == null) {
- sb.append("null");
- } else {
- sb.append(this.gatewayId);
- }
- 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());
- }
- if (userName == null) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'userName' was not present! Struct: " + toString());
+ if (userId == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'userId' was not present! Struct: " + toString());
}
if (gatewayId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
@@ -271382,10 +269844,10 @@ public class Airavata {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 2: // USER_NAME
+ case 2: // USER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userName = iprot.readString();
- struct.setUserNameIsSet(true);
+ struct.userId = iprot.readString();
+ struct.setUserIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -271418,9 +269880,9 @@ public class Airavata {
struct.authzToken.write(oprot);
oprot.writeFieldEnd();
}
- if (struct.userName != null) {
- oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
- oprot.writeString(struct.userName);
+ if (struct.userId != null) {
+ oprot.writeFieldBegin(USER_ID_FIELD_DESC);
+ oprot.writeString(struct.userId);
oprot.writeFieldEnd();
}
if (struct.gatewayId != null) {
@@ -271446,7 +269908,7 @@ public class Airavata {
public void write(org.apache.thrift.protocol.TProtocol prot, doesUserProfileExist_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
struct.authzToken.write(oprot);
- oprot.writeString(struct.userName);
+ oprot.writeString(struct.userId);
oprot.writeString(struct.gatewayId);
}
@@ -271456,8 +269918,8 @@ public class Airavata {
struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
struct.authzToken.read(iprot);
struct.setAuthzTokenIsSet(true);
- struct.userName = iprot.readString();
- struct.setUserNameIsSet(true);
+ struct.userId = iprot.readString();
+ struct.setUserIdIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}