http://git-wip-us.apache.org/repos/asf/airavata/blob/e0613616/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 cc00868..8f62c2d 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 @@ -3021,18 +3021,6 @@ public class Airavata { public List<org.apache.airavata.model.group.GroupModel> getAllGroupsUserBelongs(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 String addUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile) 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 updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile) 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 getUserProfileById(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; - - public boolean deleteUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, String userId) 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 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 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; - } public interface AsyncIface { @@ -3375,18 +3363,6 @@ public class Airavata { public void getAllGroupsUserBelongs(org.apache.airavata.model.security.AuthzToken authzToken, String userName, String gatewayId, org.apache.thrift.async.AsyncMethodCallback 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 resultHandler) throws org.apache.thrift.TException; - - public void updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getUserProfileById(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void deleteUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - 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 doesUserProfileExist(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - } public static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -9624,226 +9600,6 @@ public class Airavata { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllGroupsUserBelongs failed: unknown result"); } - public String addUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile) 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_addUserProfile(authzToken, userProfile); - return recv_addUserProfile(); - } - - public void send_addUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile) throws org.apache.thrift.TException - { - addUserProfile_args args = new addUserProfile_args(); - args.setAuthzToken(authzToken); - args.setUserProfile(userProfile); - sendBase("addUserProfile", args); - } - - public String recv_addUserProfile() 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 - { - addUserProfile_result result = new addUserProfile_result(); - receiveBase(result, "addUserProfile"); - 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, "addUserProfile failed: unknown result"); - } - - public boolean updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile) 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_updateUserProfile(authzToken, userProfile); - return recv_updateUserProfile(); - } - - public void send_updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile) throws org.apache.thrift.TException - { - updateUserProfile_args args = new updateUserProfile_args(); - args.setAuthzToken(authzToken); - args.setUserProfile(userProfile); - sendBase("updateUserProfile", args); - } - - public boolean recv_updateUserProfile() 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 - { - updateUserProfile_result result = new updateUserProfile_result(); - receiveBase(result, "updateUserProfile"); - 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, "updateUserProfile failed: unknown result"); - } - - public org.apache.airavata.model.user.UserProfile getUserProfileById(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 - { - send_getUserProfileById(authzToken, userId, gatewayId); - return recv_getUserProfileById(); - } - - public void send_getUserProfileById(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayId) throws org.apache.thrift.TException - { - getUserProfileById_args args = new getUserProfileById_args(); - args.setAuthzToken(authzToken); - args.setUserId(userId); - args.setGatewayId(gatewayId); - sendBase("getUserProfileById", args); - } - - public org.apache.airavata.model.user.UserProfile recv_getUserProfileById() 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 - { - getUserProfileById_result result = new getUserProfileById_result(); - receiveBase(result, "getUserProfileById"); - 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, "getUserProfileById failed: unknown result"); - } - - public boolean deleteUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, String userId) 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_deleteUserProfile(authzToken, userId); - return recv_deleteUserProfile(); - } - - public void send_deleteUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, String userId) throws org.apache.thrift.TException - { - deleteUserProfile_args args = new deleteUserProfile_args(); - args.setAuthzToken(authzToken); - args.setUserId(userId); - sendBase("deleteUserProfile", args); - } - - public boolean recv_deleteUserProfile() 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 - { - deleteUserProfile_result result = new deleteUserProfile_result(); - receiveBase(result, "deleteUserProfile"); - 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, "deleteUserProfile failed: unknown result"); - } - - 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 - { - send_getAllUserProfilesInGateway(authzToken, gatewayId, offset, limit); - return recv_getAllUserProfilesInGateway(); - } - - public void send_getAllUserProfilesInGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, int offset, int limit) throws org.apache.thrift.TException - { - getAllUserProfilesInGateway_args args = new getAllUserProfilesInGateway_args(); - args.setAuthzToken(authzToken); - args.setGatewayId(gatewayId); - args.setOffset(offset); - args.setLimit(limit); - sendBase("getAllUserProfilesInGateway", args); - } - - public List<org.apache.airavata.model.user.UserProfile> recv_getAllUserProfilesInGateway() 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 - { - getAllUserProfilesInGateway_result result = new getAllUserProfilesInGateway_result(); - receiveBase(result, "getAllUserProfilesInGateway"); - 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, "getAllUserProfilesInGateway failed: unknown result"); - } - - 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 - { - send_doesUserProfileExist(authzToken, userId, gatewayId); - return recv_doesUserProfileExist(); - } - - 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.setUserId(userId); - args.setGatewayId(gatewayId); - sendBase("doesUserProfileExist", args); - } - - public boolean recv_doesUserProfileExist() 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 - { - doesUserProfileExist_result result = new doesUserProfileExist_result(); - receiveBase(result, "doesUserProfileExist"); - 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, "doesUserProfileExist failed: unknown result"); - } - } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> { @@ -16197,228 +15953,6 @@ public class Airavata { } } - public void addUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - addUserProfile_call method_call = new addUserProfile_call(authzToken, userProfile, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class addUserProfile_call extends org.apache.thrift.async.TAsyncMethodCall { - private org.apache.airavata.model.security.AuthzToken authzToken; - private org.apache.airavata.model.user.UserProfile userProfile; - public addUserProfile_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile, 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.userProfile = userProfile; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addUserProfile", org.apache.thrift.protocol.TMessageType.CALL, 0)); - addUserProfile_args args = new addUserProfile_args(); - args.setAuthzToken(authzToken); - args.setUserProfile(userProfile); - args.write(prot); - prot.writeMessageEnd(); - } - - public 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 { - 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_addUserProfile(); - } - } - - public void updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - updateUserProfile_call method_call = new updateUserProfile_call(authzToken, userProfile, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class updateUserProfile_call extends org.apache.thrift.async.TAsyncMethodCall { - private org.apache.airavata.model.security.AuthzToken authzToken; - private org.apache.airavata.model.user.UserProfile userProfile; - public updateUserProfile_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userProfile, 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.userProfile = userProfile; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateUserProfile", org.apache.thrift.protocol.TMessageType.CALL, 0)); - updateUserProfile_args args = new updateUserProfile_args(); - args.setAuthzToken(authzToken); - args.setUserProfile(userProfile); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean 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_updateUserProfile(); - } - } - - public void getUserProfileById(org.apache.airavata.model.security.AuthzToken authzToken, String userId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getUserProfileById_call method_call = new getUserProfileById_call(authzToken, userId, gatewayId, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getUserProfileById_call extends org.apache.thrift.async.TAsyncMethodCall { - private org.apache.airavata.model.security.AuthzToken authzToken; - private String userId; - private String gatewayId; - public getUserProfileById_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.userId = userId; - 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("getUserProfileById", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getUserProfileById_args args = new getUserProfileById_args(); - args.setAuthzToken(authzToken); - args.setUserId(userId); - 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_getUserProfileById(); - } - } - - public void deleteUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - deleteUserProfile_call method_call = new deleteUserProfile_call(authzToken, userId, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class deleteUserProfile_call extends org.apache.thrift.async.TAsyncMethodCall { - private org.apache.airavata.model.security.AuthzToken authzToken; - private String userId; - public deleteUserProfile_call(org.apache.airavata.model.security.AuthzToken authzToken, String userId, 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.userId = userId; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteUserProfile", org.apache.thrift.protocol.TMessageType.CALL, 0)); - deleteUserProfile_args args = new deleteUserProfile_args(); - args.setAuthzToken(authzToken); - args.setUserId(userId); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean 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_deleteUserProfile(); - } - } - - 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 { - checkReady(); - getAllUserProfilesInGateway_call method_call = new getAllUserProfilesInGateway_call(authzToken, gatewayId, offset, limit, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getAllUserProfilesInGateway_call extends org.apache.thrift.async.TAsyncMethodCall { - private org.apache.airavata.model.security.AuthzToken authzToken; - private String gatewayId; - private int offset; - private int limit; - public getAllUserProfilesInGateway_call(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, int offset, int limit, 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.gatewayId = gatewayId; - this.offset = offset; - this.limit = limit; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllUserProfilesInGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getAllUserProfilesInGateway_args args = new getAllUserProfilesInGateway_args(); - args.setAuthzToken(authzToken); - args.setGatewayId(gatewayId); - args.setOffset(offset); - args.setLimit(limit); - args.write(prot); - prot.writeMessageEnd(); - } - - public List<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_getAllUserProfilesInGateway(); - } - } - - 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(); - 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 userId; - private String gatewayId; - 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.userId = userId; - 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("doesUserProfileExist", org.apache.thrift.protocol.TMessageType.CALL, 0)); - doesUserProfileExist_args args = new doesUserProfileExist_args(); - args.setAuthzToken(authzToken); - args.setUserId(userId); - args.setGatewayId(gatewayId); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean 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_doesUserProfileExist(); - } - } - } public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { @@ -16601,12 +16135,6 @@ public class Airavata { processMap.put("deleteGroup", new deleteGroup()); processMap.put("getGroup", new getGroup()); processMap.put("getAllGroupsUserBelongs", new getAllGroupsUserBelongs()); - processMap.put("addUserProfile", new addUserProfile()); - processMap.put("updateUserProfile", new updateUserProfile()); - processMap.put("getUserProfileById", new getUserProfileById()); - processMap.put("deleteUserProfile", new deleteUserProfile()); - processMap.put("getAllUserProfilesInGateway", new getAllUserProfilesInGateway()); - processMap.put("doesUserProfileExist", new doesUserProfileExist()); return processMap; } @@ -21750,189 +21278,6 @@ public class Airavata { } } - public static class addUserProfile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addUserProfile_args> { - public addUserProfile() { - super("addUserProfile"); - } - - public addUserProfile_args getEmptyArgsInstance() { - return new addUserProfile_args(); - } - - protected boolean isOneway() { - return false; - } - - public addUserProfile_result getResult(I iface, addUserProfile_args args) throws org.apache.thrift.TException { - addUserProfile_result result = new addUserProfile_result(); - try { - result.success = iface.addUserProfile(args.authzToken, args.userProfile); - } 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 updateUserProfile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateUserProfile_args> { - public updateUserProfile() { - super("updateUserProfile"); - } - - public updateUserProfile_args getEmptyArgsInstance() { - return new updateUserProfile_args(); - } - - protected boolean isOneway() { - return false; - } - - public updateUserProfile_result getResult(I iface, updateUserProfile_args args) throws org.apache.thrift.TException { - updateUserProfile_result result = new updateUserProfile_result(); - try { - result.success = iface.updateUserProfile(args.authzToken, args.userProfile); - result.setSuccessIsSet(true); - } 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 getUserProfileById<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserProfileById_args> { - public getUserProfileById() { - super("getUserProfileById"); - } - - public getUserProfileById_args getEmptyArgsInstance() { - return new getUserProfileById_args(); - } - - protected boolean isOneway() { - return false; - } - - public getUserProfileById_result getResult(I iface, getUserProfileById_args args) throws org.apache.thrift.TException { - getUserProfileById_result result = new getUserProfileById_result(); - try { - result.success = iface.getUserProfileById(args.authzToken, args.userId, 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 deleteUserProfile<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteUserProfile_args> { - public deleteUserProfile() { - super("deleteUserProfile"); - } - - public deleteUserProfile_args getEmptyArgsInstance() { - return new deleteUserProfile_args(); - } - - protected boolean isOneway() { - return false; - } - - public deleteUserProfile_result getResult(I iface, deleteUserProfile_args args) throws org.apache.thrift.TException { - deleteUserProfile_result result = new deleteUserProfile_result(); - try { - result.success = iface.deleteUserProfile(args.authzToken, args.userId); - result.setSuccessIsSet(true); - } 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 getAllUserProfilesInGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllUserProfilesInGateway_args> { - public getAllUserProfilesInGateway() { - super("getAllUserProfilesInGateway"); - } - - public getAllUserProfilesInGateway_args getEmptyArgsInstance() { - return new getAllUserProfilesInGateway_args(); - } - - protected boolean isOneway() { - return false; - } - - public getAllUserProfilesInGateway_result getResult(I iface, getAllUserProfilesInGateway_args args) throws org.apache.thrift.TException { - getAllUserProfilesInGateway_result result = new getAllUserProfilesInGateway_result(); - try { - result.success = iface.getAllUserProfilesInGateway(args.authzToken, args.gatewayId, args.offset, args.limit); - } 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"); - } - - public doesUserProfileExist_args getEmptyArgsInstance() { - return new doesUserProfileExist_args(); - } - - protected boolean isOneway() { - return false; - } - - 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.userId, args.gatewayId); - result.setSuccessIsSet(true); - } 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 AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> { @@ -22115,12 +21460,6 @@ public class Airavata { processMap.put("deleteGroup", new deleteGroup()); processMap.put("getGroup", new getGroup()); processMap.put("getAllGroupsUserBelongs", new getAllGroupsUserBelongs()); - processMap.put("addUserProfile", new addUserProfile()); - processMap.put("updateUserProfile", new updateUserProfile()); - processMap.put("getUserProfileById", new getUserProfileById()); - processMap.put("deleteUserProfile", new deleteUserProfile()); - processMap.put("getAllUserProfilesInGateway", new getAllUserProfilesInGateway()); - processMap.put("doesUserProfileExist", new doesUserProfileExist()); return processMap; } @@ -34369,459 +33708,395 @@ public class Airavata { } } - public static class addUserProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addUserProfile_args, String> { - public addUserProfile() { - super("addUserProfile"); + } + + 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getAPIVersion_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, 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 Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } } - public addUserProfile_args getEmptyArgsInstance() { - return new addUserProfile_args(); + /** + * 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; + default: + return null; + } } - public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<String>() { - public void onComplete(String o) { - addUserProfile_result result = new addUserProfile_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; - addUserProfile_result result = new addUserProfile_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(); - } - }; + /** + * 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; } - protected boolean isOneway() { - return false; + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); } - public void start(I iface, addUserProfile_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { - iface.addUserProfile(args.authzToken, args.userProfile,resultHandler); + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; } - } - public static class updateUserProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateUserProfile_args, Boolean> { - public updateUserProfile() { - super("updateUserProfile"); + public short getThriftFieldId() { + return _thriftId; } - public updateUserProfile_args getEmptyArgsInstance() { - return new updateUserProfile_args(); + public String getFieldName() { + return _fieldName; } + } - public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<Boolean>() { - public void onComplete(Boolean o) { - updateUserProfile_result result = new updateUserProfile_result(); - result.success = o; - result.setSuccessIsSet(true); - 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; - updateUserProfile_result result = new updateUserProfile_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(); - } - }; + // 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))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap); + } + + 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); } + } - protected boolean isOneway() { - return false; + public getAPIVersion_args deepCopy() { + return new getAPIVersion_args(this); + } + + @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, Object value) { + switch (field) { + case AUTHZ_TOKEN: + if (value == null) { + unsetAuthzToken(); + } else { + setAuthzToken((org.apache.airavata.model.security.AuthzToken)value); + } + break; - public void start(I iface, updateUserProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.updateUserProfile(args.authzToken, args.userProfile,resultHandler); } } - public static class getUserProfileById<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserProfileById_args, org.apache.airavata.model.user.UserProfile> { - public getUserProfileById() { - super("getUserProfileById"); + public Object getFieldValue(_Fields field) { + switch (field) { + case AUTHZ_TOKEN: + return getAuthzToken(); + } + throw new IllegalStateException(); + } - public getUserProfileById_args getEmptyArgsInstance() { - return new getUserProfileById_args(); + /** 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(); } - 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) { - getUserProfileById_result result = new getUserProfileById_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; - getUserProfileById_result result = new getUserProfileById_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(); - } - }; + switch (field) { + case AUTHZ_TOKEN: + return isSetAuthzToken(); } + throw new IllegalStateException(); + } - protected boolean isOneway() { + @Override + public boolean equals(Object that) { + if (that == null) return false; - } + if (that instanceof getAPIVersion_args) + return this.equals((getAPIVersion_args)that); + return false; + } - public void start(I iface, getUserProfileById_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> resultHandler) throws TException { - iface.getUserProfileById(args.authzToken, args.userId, args.gatewayId,resultHandler); + public boolean equals(getAPIVersion_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; } + + 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); + + return list.hashCode(); } - public static class deleteUserProfile<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteUserProfile_args, Boolean> { - public deleteUserProfile() { - super("deleteUserProfile"); + @Override + public int compareTo(getAPIVersion_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); } - public deleteUserProfile_args getEmptyArgsInstance() { - return new deleteUserProfile_args(); + 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; + } } + return 0; + } - public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<Boolean>() { - public void onComplete(Boolean o) { - deleteUserProfile_result result = new deleteUserProfile_result(); - result.success = o; - result.setSuccessIsSet(true); - 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; - deleteUserProfile_result result = new deleteUserProfile_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(); - } - }; + 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("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(); + } - protected boolean isOneway() { - return false; + 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(); } + } - public void start(I iface, deleteUserProfile_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.deleteUserProfile(args.authzToken, args.userId,resultHandler); + 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); } } - public static class getAllUserProfilesInGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserProfilesInGateway_args, List<org.apache.airavata.model.user.UserProfile>> { - public getAllUserProfilesInGateway() { - super("getAllUserProfilesInGateway"); + 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); } + } - public getAllUserProfilesInGateway_args getEmptyArgsInstance() { - return new getAllUserProfilesInGateway_args(); + private static class getAPIVersion_argsStandardSchemeFactory implements SchemeFactory { + public getAPIVersion_argsStandardScheme getScheme() { + return new getAPIVersion_argsStandardScheme(); } + } - public AsyncMethodCallback<List<org.apache.airavata.model.user.UserProfile>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<List<org.apache.airavata.model.user.UserProfile>>() { - public void onComplete(List<org.apache.airavata.model.user.UserProfile> o) { - getAllUserProfilesInGateway_result result = new getAllUserProfilesInGateway_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(); + private static class getAPIVersion_argsStandardScheme extends 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; } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getAllUserProfilesInGateway_result result = new getAllUserProfilesInGateway_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(); + 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); } - }; - } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); - protected boolean isOneway() { - return false; + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); } - public void start(I iface, getAllUserProfilesInGateway_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws TException { - iface.getAllUserProfilesInGateway(args.authzToken, args.gatewayId, args.offset, args.limit,resultHandler); - } - } + public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_args struct) throws org.apache.thrift.TException { + struct.validate(); - public static class doesUserProfileExist<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, doesUserProfileExist_args, Boolean> { - public doesUserProfileExist() { - super("doesUserProfileExist"); + oprot.writeStructBegin(STRUCT_DESC); + if (struct.authzToken != null) { + oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC); + struct.authzToken.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); } - public doesUserProfileExist_args getEmptyArgsInstance() { - return new doesUserProfileExist_args(); - } + } - public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<Boolean>() { - public void onComplete(Boolean o) { - doesUserProfileExist_result result = new doesUserProfileExist_result(); - result.success = o; - result.setSuccessIsSet(true); - 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; - doesUserProfileExist_result result = new doesUserProfileExist_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(); - } - }; + private static class getAPIVersion_argsTupleSchemeFactory implements SchemeFactory { + public getAPIVersion_argsTupleScheme getScheme() { + return new getAPIVersion_argsTupleScheme(); } + } - protected boolean isOneway() { - return false; + private static class getAPIVersion_argsTupleScheme extends TupleScheme<getAPIVersion_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + struct.authzToken.write(oprot); } - public void start(I iface, doesUserProfileExist_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.doesUserProfileExist(args.authzToken, args.userId, args.gatewayId,resultHandler); + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_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); } } } - 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"); + 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 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 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 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 getAPIVersion_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAPIVersion_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getAPIVersion_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAPIVersion_resultTupleSchemeFactory()); } - public org.apache.airavata.model.security.AuthzToken authzToken; // required + public String 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 { - AUTHZ_TOKEN((short)1, "authzToken"); + 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>(); @@ -34836,387 +34111,16 @@ public class Airavata { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // AUTHZ_TOKEN - return AUTHZ_TOKEN; - 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))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap); - } - - 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() { - return new getAPIVersion_args(this); - } - - @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, Object value) { - switch (field) { - case AUTHZ_TOKEN: - if (value == null) { - unsetAuthzToken(); - } else { - setAuthzToken((org.apache.airavata.model.security.AuthzToken)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case AUTHZ_TOKEN: - return getAuthzToken(); - - } - 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(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(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; - - 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; - } - - @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); - - return list.hashCode(); - } - - @Override - public int compareTo(getAPIVersion_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; - } - } - 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("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 { - 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 getAPIVersion_argsStandardSchemeFactory implements SchemeFactory { - public getAPIVersion_argsStandardScheme getScheme() { - return new getAPIVersion_argsStandardScheme(); - } - } - - private static class getAPIVersion_argsStandardScheme extends 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) { - 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); - } - 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); - if (struct.authzToken != null) { - oprot.writeFieldBegin(AUTHZ_TOKEN_FIELD_DESC); - struct.authzToken.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getAPIVersion_argsTupleSchemeFactory implements SchemeFactory { - public getAPIVersion_argsTupleScheme getScheme() { - return new getAPIVersion_argsTupleScheme(); - } - } - - private static class getAPIVersion_argsTupleScheme extends TupleScheme<getAPIVersion_args> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct
<TRUNCATED>
