From ef2966ff8f2c7fb4ebb768ac4b72aadb193590a9 Mon Sep 17 00:00:00 2001 From: Anuj Bhandar Date: Fri, 4 Nov 2016 13:26:32 -0400 Subject: [PATCH 1/2] AIRAVATA-2163: Optimising the cred store data model --- .../server/handler/AiravataServerHandler.java | 64 +- .../DefaultAiravataSecurityManager.java | 2 +- .../org/apache/airavata/api/Airavata.java | 754 ++++++---- .../store}/CertificateCredential.java | 89 +- .../credential/store}/CommunityUser.java | 69 +- .../store}/CredentialSummary.java | 321 ++-- .../credential/store}/PasswordCredential.java | 94 +- .../credential/store}/SSHCredential.java | 89 +- .../store}/SSHCredentialSummary.java | 245 +++- .../model/credential/store/SummaryType.java | 69 + ...credential_store_data_modelsConstants.java | 35 +- .../server/CredentialStoreServerHandler.java | 146 +- .../credential-store-stubs/pom.xml | 25 + .../store/client/TestSSLClient.java | 6 +- .../store/cpi/CredentialStoreService.java | 1299 +++++++++++------ .../store/datamodel/APICredential.java | 723 --------- .../exception/CredentialStoreException.java | 2 +- .../airavata-apis/airavata_api.thrift | 14 +- .../credential-store-cpi.thrift | 13 +- .../data-models/airavata_data_models.thrift | 1 + .../credential_store_data_models.thrift | 27 +- .../credential_summary.thrift | 33 - .../resource_catalog_models.thrift | 3 +- .../generate-thrift-stubs.sh | 10 +- 24 files changed, 2153 insertions(+), 1980 deletions(-) rename {modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel => airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/credential/store}/CertificateCredential.java (94%) rename {modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel => airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/credential/store}/CommunityUser.java (91%) rename airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/{appcatalog/credentialsummary => credential/store}/CredentialSummary.java (88%) rename {modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel => airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/credential/store}/PasswordCredential.java (93%) rename {modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel => airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/credential/store}/SSHCredential.java (94%) rename {modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel => airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/credential/store}/SSHCredentialSummary.java (82%) create mode 100644 airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/credential/store/SummaryType.java rename {modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel => airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/credential/store}/credential_store_data_modelsConstants.java (56%) delete mode 100644 modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/APICredential.java delete mode 100644 thrift-interface-descriptions/data-models/resource-catalog-models/credential_summary.thrift 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 f90517a3c5..c488053dbe 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 @@ -31,9 +31,10 @@ import org.apache.airavata.common.utils.ServerSettings; import org.apache.airavata.credential.store.client.CredentialStoreClientFactory; import org.apache.airavata.credential.store.cpi.CredentialStoreService; -import org.apache.airavata.credential.store.datamodel.PasswordCredential; -import org.apache.airavata.credential.store.datamodel.SSHCredential; -import org.apache.airavata.credential.store.datamodel.SSHCredentialSummary; +import org.apache.airavata.model.credential.store.PasswordCredential; +import org.apache.airavata.model.credential.store.SSHCredential; +import org.apache.airavata.model.credential.store.CredentialSummary; +import org.apache.airavata.model.credential.store.SummaryType; import org.apache.airavata.credential.store.exception.CredentialStoreException; import org.apache.airavata.messaging.core.MessageContext; import org.apache.airavata.messaging.core.MessagingFactory; @@ -44,7 +45,6 @@ import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule; import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription; import org.apache.airavata.model.appcatalog.computeresource.*; -import org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary; import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference; import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile; import org.apache.airavata.model.appcatalog.gatewayprofile.StoragePreference; @@ -563,25 +563,18 @@ public Map getAllGatewaySSHPubKeys(AuthzToken authzToken, String @Override @SecurityCheck - public List getAllGatewaySSHPubKeysSummary(AuthzToken authzToken, String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public List getAllCredentialSummaryForGateway(AuthzToken authzToken, SummaryType type, String gatewayId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { try { - List allCredentialSummaries = new ArrayList<>(); - if (csClient == null){ - csClient = getCredentialStoreServiceClient(); - } - List sshSummaryList = csClient.getAllGatewaySSHCredentialSummary(gatewayId); - for(SSHCredentialSummary key : sshSummaryList){ - CredentialSummary summary = new CredentialSummary(); - summary.setGatewayId(key.getGatewayId()); - summary.setUsername(key.getUsername()); - summary.setPublicKey(key.getPublicKey()); - summary.setToken(key.getToken()); - summary.setDescription(key.getDescription()); - summary.setPersistedTime(key.getPersistedTime()); - allCredentialSummaries.add(summary); + if(type.equals(SummaryType.SSH)){ + if (csClient == null){ + csClient = getCredentialStoreServiceClient(); + } + logger.debug("Airavata will retrieve all SSH pub keys summaries for gateway Id : " + gatewayId); + return csClient.getAllCredentialSummaryForGateway(type, gatewayId); + } else { + logger.info("Summay Type"+ type.toString() + " not supported for - gateway id - " + gatewayId); + return null; } - logger.debug("Airavata retrieved all SSH pub keys summaries for gateway Id : " + gatewayId); - return allCredentialSummaries; }catch (Exception e){ logger.error("Error occurred while retrieving SSH public keys summaries for gateway : " + gatewayId , e); AiravataSystemException exception = new AiravataSystemException(); @@ -592,25 +585,18 @@ public List getAllGatewaySSHPubKeysSummary(AuthzToken authzTo } @Override - public List getAllSSHPubKeysSummaryForUserInGateway(AuthzToken authzToken, String gatewayId, String userId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { + public List getAllCredentialSummaryForUsersInGateway(AuthzToken authzToken,SummaryType type, String gatewayId, String userId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException { try { - List allCredentialSummaries = new ArrayList<>(); - if (csClient == null){ - csClient = getCredentialStoreServiceClient(); - } - List sshSummaryListForUser = csClient.getAllSSHCredentialSummaryForUserInGateway(gatewayId,userId); - for(SSHCredentialSummary key : sshSummaryListForUser){ - CredentialSummary userPubKeySummary = new CredentialSummary(); - userPubKeySummary.setGatewayId(key.getGatewayId()); - userPubKeySummary.setUsername(key.getUsername()); - userPubKeySummary.setPublicKey(key.getPublicKey()); - userPubKeySummary.setToken(key.getToken()); - userPubKeySummary.setDescription(key.getDescription()); - userPubKeySummary.setPersistedTime(key.getPersistedTime()); - allCredentialSummaries.add(userPubKeySummary); + if(type.equals(SummaryType.SSH)){ + if (csClient == null){ + csClient = getCredentialStoreServiceClient(); + } + logger.debug("Airavata will retrieve all SSH pub keys summaries for gateway Id : " + gatewayId); + return csClient.getAllCredentialSummaryForUserInGateway(type, gatewayId, userId); + } else { + logger.info("Summay Type"+ type.toString() + " not supported for - gateway id - " + gatewayId + " and user Id:" + userId); + return null; } - logger.debug("Airavata retrieved all SSH pub keys summaries for gateway Id : " + gatewayId + " & user ID : " +userId); - return allCredentialSummaries; }catch (Exception e){ logger.error("Error occurred while retrieving SSH public keys summaries for user : " + userId , e); AiravataSystemException exception = new AiravataSystemException(); @@ -3419,7 +3405,7 @@ public boolean deleteGatewayStoragePreference(AuthzToken authzToken, String gate /** * Register a User Resource Profile. * - * @param UserResourceProfile User Resource Profile Object. + * @param userResourceProfile User Resource Profile Object. * The userId should be obtained from Airavata user profile registration and passed to register a corresponding * resource profile. * @return status. diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/DefaultAiravataSecurityManager.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/DefaultAiravataSecurityManager.java index 3dbab868b1..1201a9a3d3 100644 --- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/DefaultAiravataSecurityManager.java +++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/security/DefaultAiravataSecurityManager.java @@ -29,7 +29,7 @@ import org.apache.airavata.common.utils.ServerSettings; import org.apache.airavata.credential.store.client.CredentialStoreClientFactory; import org.apache.airavata.credential.store.cpi.CredentialStoreService; -import org.apache.airavata.credential.store.datamodel.PasswordCredential; +import org.apache.airavata.model.credential.store.PasswordCredential; import org.apache.airavata.credential.store.exception.CredentialStoreException; import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile; import org.apache.airavata.model.security.AuthzToken; 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 1b5a878b69..e7ecee1878 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 @@ -338,9 +338,10 @@ public interface Iface { * * * @param authzToken + * @param type * @param gatewayId */ - public List getAllGatewaySSHPubKeysSummary(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException; + public List getAllCredentialSummaryForGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException; /** * @@ -360,10 +361,11 @@ public interface Iface { * * * @param authzToken + * @param type * @param gatewayId * @param userId */ - public List getAllSSHPubKeysSummaryForUserInGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException; + public List getAllCredentialSummaryForUsersInGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException; public Map getAllGatewayPWDCredentials(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException; @@ -3061,9 +3063,9 @@ public interface AsyncIface { public void getAllGatewaySSHPubKeys(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getAllGatewaySSHPubKeysSummary(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getAllCredentialSummaryForGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getAllSSHPubKeysSummaryForUserInGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getAllCredentialSummaryForUsersInGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getAllGatewayPWDCredentials(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -4064,24 +4066,25 @@ public Map recv_getAllGatewaySSHPubKeys() throws org.apache.airav throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllGatewaySSHPubKeys failed: unknown result"); } - public List getAllGatewaySSHPubKeysSummary(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException + public List getAllCredentialSummaryForGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException { - send_getAllGatewaySSHPubKeysSummary(authzToken, gatewayId); - return recv_getAllGatewaySSHPubKeysSummary(); + send_getAllCredentialSummaryForGateway(authzToken, type, gatewayId); + return recv_getAllCredentialSummaryForGateway(); } - public void send_getAllGatewaySSHPubKeysSummary(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId) throws org.apache.thrift.TException + public void send_getAllCredentialSummaryForGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, String gatewayId) throws org.apache.thrift.TException { - getAllGatewaySSHPubKeysSummary_args args = new getAllGatewaySSHPubKeysSummary_args(); + getAllCredentialSummaryForGateway_args args = new getAllCredentialSummaryForGateway_args(); args.setAuthzToken(authzToken); + args.setType(type); args.setGatewayId(gatewayId); - sendBase("getAllGatewaySSHPubKeysSummary", args); + sendBase("getAllCredentialSummaryForGateway", args); } - public List recv_getAllGatewaySSHPubKeysSummary() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException + public List recv_getAllCredentialSummaryForGateway() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException { - getAllGatewaySSHPubKeysSummary_result result = new getAllGatewaySSHPubKeysSummary_result(); - receiveBase(result, "getAllGatewaySSHPubKeysSummary"); + getAllCredentialSummaryForGateway_result result = new getAllCredentialSummaryForGateway_result(); + receiveBase(result, "getAllCredentialSummaryForGateway"); if (result.isSetSuccess()) { return result.success; } @@ -4094,28 +4097,29 @@ public List getAllSSHPubKeysSummaryForUserInGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException + public List getAllCredentialSummaryForUsersInGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException { - send_getAllSSHPubKeysSummaryForUserInGateway(authzToken, gatewayId, userId); - return recv_getAllSSHPubKeysSummaryForUserInGateway(); + send_getAllCredentialSummaryForUsersInGateway(authzToken, type, gatewayId, userId); + return recv_getAllCredentialSummaryForUsersInGateway(); } - public void send_getAllSSHPubKeysSummaryForUserInGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userId) throws org.apache.thrift.TException + public void send_getAllCredentialSummaryForUsersInGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId) throws org.apache.thrift.TException { - getAllSSHPubKeysSummaryForUserInGateway_args args = new getAllSSHPubKeysSummaryForUserInGateway_args(); + getAllCredentialSummaryForUsersInGateway_args args = new getAllCredentialSummaryForUsersInGateway_args(); args.setAuthzToken(authzToken); + args.setType(type); args.setGatewayId(gatewayId); args.setUserId(userId); - sendBase("getAllSSHPubKeysSummaryForUserInGateway", args); + sendBase("getAllCredentialSummaryForUsersInGateway", args); } - public List recv_getAllSSHPubKeysSummaryForUserInGateway() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException + public List recv_getAllCredentialSummaryForUsersInGateway() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException { - getAllSSHPubKeysSummaryForUserInGateway_result result = new getAllSSHPubKeysSummaryForUserInGateway_result(); - receiveBase(result, "getAllSSHPubKeysSummaryForUserInGateway"); + getAllCredentialSummaryForUsersInGateway_result result = new getAllCredentialSummaryForUsersInGateway_result(); + receiveBase(result, "getAllCredentialSummaryForUsersInGateway"); if (result.isSetSuccess()) { return result.success; } @@ -4128,7 +4132,7 @@ public List getAllGatewayPWDCredentials(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException @@ -10341,76 +10345,82 @@ public Map getResult() throws org.apache.airavata.model.error.Inv } } - public void getAllGatewaySSHPubKeysSummary(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getAllCredentialSummaryForGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getAllGatewaySSHPubKeysSummary_call method_call = new getAllGatewaySSHPubKeysSummary_call(authzToken, gatewayId, resultHandler, this, ___protocolFactory, ___transport); + getAllCredentialSummaryForGateway_call method_call = new getAllCredentialSummaryForGateway_call(authzToken, type, gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getAllGatewaySSHPubKeysSummary_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class getAllCredentialSummaryForGateway_call extends org.apache.thrift.async.TAsyncMethodCall { private org.apache.airavata.model.security.AuthzToken authzToken; + private org.apache.airavata.model.credential.store.SummaryType type; private String gatewayId; - public getAllGatewaySSHPubKeysSummary_call(org.apache.airavata.model.security.AuthzToken authzToken, 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 getAllCredentialSummaryForGateway_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, 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.type = type; 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("getAllGatewaySSHPubKeysSummary", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getAllGatewaySSHPubKeysSummary_args args = new getAllGatewaySSHPubKeysSummary_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllCredentialSummaryForGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getAllCredentialSummaryForGateway_args args = new getAllCredentialSummaryForGateway_args(); args.setAuthzToken(authzToken); + args.setType(type); args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } - public List getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException { + public List getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new 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_getAllGatewaySSHPubKeysSummary(); + return (new Client(prot)).recv_getAllCredentialSummaryForGateway(); } } - public void getAllSSHPubKeysSummaryForUserInGateway(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getAllCredentialSummaryForUsersInGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getAllSSHPubKeysSummaryForUserInGateway_call method_call = new getAllSSHPubKeysSummaryForUserInGateway_call(authzToken, gatewayId, userId, resultHandler, this, ___protocolFactory, ___transport); + getAllCredentialSummaryForUsersInGateway_call method_call = new getAllCredentialSummaryForUsersInGateway_call(authzToken, type, gatewayId, userId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getAllSSHPubKeysSummaryForUserInGateway_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class getAllCredentialSummaryForUsersInGateway_call extends org.apache.thrift.async.TAsyncMethodCall { private org.apache.airavata.model.security.AuthzToken authzToken; + private org.apache.airavata.model.credential.store.SummaryType type; private String gatewayId; private String userId; - public getAllSSHPubKeysSummaryForUserInGateway_call(org.apache.airavata.model.security.AuthzToken authzToken, String gatewayId, 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 { + public getAllCredentialSummaryForUsersInGateway_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, 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.type = type; this.gatewayId = gatewayId; 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("getAllSSHPubKeysSummaryForUserInGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getAllSSHPubKeysSummaryForUserInGateway_args args = new getAllSSHPubKeysSummaryForUserInGateway_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllCredentialSummaryForUsersInGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getAllCredentialSummaryForUsersInGateway_args args = new getAllCredentialSummaryForUsersInGateway_args(); args.setAuthzToken(authzToken); + args.setType(type); args.setGatewayId(gatewayId); args.setUserId(userId); args.write(prot); prot.writeMessageEnd(); } - public List getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException { + public List getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new 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_getAllSSHPubKeysSummaryForUserInGateway(); + return (new Client(prot)).recv_getAllCredentialSummaryForUsersInGateway(); } } @@ -16033,8 +16043,8 @@ protected Processor(I iface, Map extends org.apache.thrift.ProcessFunction { - public getAllGatewaySSHPubKeysSummary() { - super("getAllGatewaySSHPubKeysSummary"); + public static class getAllCredentialSummaryForGateway extends org.apache.thrift.ProcessFunction { + public getAllCredentialSummaryForGateway() { + super("getAllCredentialSummaryForGateway"); } - public getAllGatewaySSHPubKeysSummary_args getEmptyArgsInstance() { - return new getAllGatewaySSHPubKeysSummary_args(); + public getAllCredentialSummaryForGateway_args getEmptyArgsInstance() { + return new getAllCredentialSummaryForGateway_args(); } protected boolean isOneway() { return false; } - public getAllGatewaySSHPubKeysSummary_result getResult(I iface, getAllGatewaySSHPubKeysSummary_args args) throws org.apache.thrift.TException { - getAllGatewaySSHPubKeysSummary_result result = new getAllGatewaySSHPubKeysSummary_result(); + public getAllCredentialSummaryForGateway_result getResult(I iface, getAllCredentialSummaryForGateway_args args) throws org.apache.thrift.TException { + getAllCredentialSummaryForGateway_result result = new getAllCredentialSummaryForGateway_result(); try { - result.success = iface.getAllGatewaySSHPubKeysSummary(args.authzToken, args.gatewayId); + result.success = iface.getAllCredentialSummaryForGateway(args.authzToken, args.type, args.gatewayId); } catch (org.apache.airavata.model.error.InvalidRequestException ire) { result.ire = ire; } catch (org.apache.airavata.model.error.AiravataClientException ace) { @@ -16781,23 +16791,23 @@ public getAllGatewaySSHPubKeysSummary_result getResult(I iface, getAllGatewaySSH } } - public static class getAllSSHPubKeysSummaryForUserInGateway extends org.apache.thrift.ProcessFunction { - public getAllSSHPubKeysSummaryForUserInGateway() { - super("getAllSSHPubKeysSummaryForUserInGateway"); + public static class getAllCredentialSummaryForUsersInGateway extends org.apache.thrift.ProcessFunction { + public getAllCredentialSummaryForUsersInGateway() { + super("getAllCredentialSummaryForUsersInGateway"); } - public getAllSSHPubKeysSummaryForUserInGateway_args getEmptyArgsInstance() { - return new getAllSSHPubKeysSummaryForUserInGateway_args(); + public getAllCredentialSummaryForUsersInGateway_args getEmptyArgsInstance() { + return new getAllCredentialSummaryForUsersInGateway_args(); } protected boolean isOneway() { return false; } - public getAllSSHPubKeysSummaryForUserInGateway_result getResult(I iface, getAllSSHPubKeysSummaryForUserInGateway_args args) throws org.apache.thrift.TException { - getAllSSHPubKeysSummaryForUserInGateway_result result = new getAllSSHPubKeysSummaryForUserInGateway_result(); + public getAllCredentialSummaryForUsersInGateway_result getResult(I iface, getAllCredentialSummaryForUsersInGateway_args args) throws org.apache.thrift.TException { + getAllCredentialSummaryForUsersInGateway_result result = new getAllCredentialSummaryForUsersInGateway_result(); try { - result.success = iface.getAllSSHPubKeysSummaryForUserInGateway(args.authzToken, args.gatewayId, args.userId); + result.success = iface.getAllCredentialSummaryForUsersInGateway(args.authzToken, args.type, args.gatewayId, args.userId); } catch (org.apache.airavata.model.error.InvalidRequestException ire) { result.ire = ire; } catch (org.apache.airavata.model.error.AiravataClientException ace) { @@ -21387,8 +21397,8 @@ protected AsyncProcessor(I iface, Map extends org.apache.thrift.AsyncProcessFunction> { - public getAllGatewaySSHPubKeysSummary() { - super("getAllGatewaySSHPubKeysSummary"); + public static class getAllCredentialSummaryForGateway extends org.apache.thrift.AsyncProcessFunction> { + public getAllCredentialSummaryForGateway() { + super("getAllCredentialSummaryForGateway"); } - public getAllGatewaySSHPubKeysSummary_args getEmptyArgsInstance() { - return new getAllGatewaySSHPubKeysSummary_args(); + public getAllCredentialSummaryForGateway_args getEmptyArgsInstance() { + return new getAllCredentialSummaryForGateway_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - getAllGatewaySSHPubKeysSummary_result result = new getAllGatewaySSHPubKeysSummary_result(); + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getAllCredentialSummaryForGateway_result result = new getAllCredentialSummaryForGateway_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); @@ -22916,7 +22926,7 @@ public void onComplete(List> resultHandler) throws TException { - iface.getAllGatewaySSHPubKeysSummary(args.authzToken, args.gatewayId,resultHandler); + public void start(I iface, getAllCredentialSummaryForGateway_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getAllCredentialSummaryForGateway(args.authzToken, args.type, args.gatewayId,resultHandler); } } - public static class getAllSSHPubKeysSummaryForUserInGateway extends org.apache.thrift.AsyncProcessFunction> { - public getAllSSHPubKeysSummaryForUserInGateway() { - super("getAllSSHPubKeysSummaryForUserInGateway"); + public static class getAllCredentialSummaryForUsersInGateway extends org.apache.thrift.AsyncProcessFunction> { + public getAllCredentialSummaryForUsersInGateway() { + super("getAllCredentialSummaryForUsersInGateway"); } - public getAllSSHPubKeysSummaryForUserInGateway_args getEmptyArgsInstance() { - return new getAllSSHPubKeysSummaryForUserInGateway_args(); + public getAllCredentialSummaryForUsersInGateway_args getEmptyArgsInstance() { + return new getAllCredentialSummaryForUsersInGateway_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - getAllSSHPubKeysSummaryForUserInGateway_result result = new getAllSSHPubKeysSummaryForUserInGateway_result(); + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getAllCredentialSummaryForUsersInGateway_result result = new getAllCredentialSummaryForUsersInGateway_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); @@ -22983,7 +22993,7 @@ public void onComplete(List> resultHandler) throws TException { - iface.getAllSSHPubKeysSummaryForUserInGateway(args.authzToken, args.gatewayId, args.userId,resultHandler); + public void start(I iface, getAllCredentialSummaryForUsersInGateway_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getAllCredentialSummaryForUsersInGateway(args.authzToken, args.type, args.gatewayId, args.userId,resultHandler); } } @@ -58300,25 +58310,36 @@ public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHPubK } - public static class getAllGatewaySSHPubKeysSummary_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllGatewaySSHPubKeysSummary_args"); + public static class getAllCredentialSummaryForGateway_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCredentialSummaryForGateway_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 GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getAllGatewaySSHPubKeysSummary_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAllGatewaySSHPubKeysSummary_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getAllCredentialSummaryForGateway_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllCredentialSummaryForGateway_argsTupleSchemeFactory()); } public org.apache.airavata.model.security.AuthzToken authzToken; // required + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + public org.apache.airavata.model.credential.store.SummaryType type; // 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"), - GATEWAY_ID((short)2, "gatewayId"); + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + TYPE((short)2, "type"), + GATEWAY_ID((short)3, "gatewayId"); private static final Map byName = new HashMap(); @@ -58335,7 +58356,9 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTHZ_TOKEN return AUTHZ_TOKEN; - case 2: // GATEWAY_ID + case 2: // TYPE + return TYPE; + case 3: // GATEWAY_ID return GATEWAY_ID; default: return null; @@ -58382,43 +58405,51 @@ public String getFieldName() { 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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.credential.store.SummaryType.class))); 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(getAllGatewaySSHPubKeysSummary_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaryForGateway_args.class, metaDataMap); } - public getAllGatewaySSHPubKeysSummary_args() { + public getAllCredentialSummaryForGateway_args() { } - public getAllGatewaySSHPubKeysSummary_args( + public getAllCredentialSummaryForGateway_args( org.apache.airavata.model.security.AuthzToken authzToken, + org.apache.airavata.model.credential.store.SummaryType type, String gatewayId) { this(); this.authzToken = authzToken; + this.type = type; this.gatewayId = gatewayId; } /** * Performs a deep copy on other. */ - public getAllGatewaySSHPubKeysSummary_args(getAllGatewaySSHPubKeysSummary_args other) { + public getAllCredentialSummaryForGateway_args(getAllCredentialSummaryForGateway_args other) { if (other.isSetAuthzToken()) { this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken); } + if (other.isSetType()) { + this.type = other.type; + } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } } - public getAllGatewaySSHPubKeysSummary_args deepCopy() { - return new getAllGatewaySSHPubKeysSummary_args(this); + public getAllCredentialSummaryForGateway_args deepCopy() { + return new getAllCredentialSummaryForGateway_args(this); } @Override public void clear() { this.authzToken = null; + this.type = null; this.gatewayId = null; } @@ -58426,7 +58457,7 @@ public org.apache.airavata.model.security.AuthzToken getAuthzToken() { return this.authzToken; } - public getAllGatewaySSHPubKeysSummary_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) { + public getAllCredentialSummaryForGateway_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) { this.authzToken = authzToken; return this; } @@ -58446,11 +58477,43 @@ public void setAuthzTokenIsSet(boolean value) { } } + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + public org.apache.airavata.model.credential.store.SummaryType getType() { + return this.type; + } + + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + public getAllCredentialSummaryForGateway_args setType(org.apache.airavata.model.credential.store.SummaryType type) { + this.type = type; + return this; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + public String getGatewayId() { return this.gatewayId; } - public getAllGatewaySSHPubKeysSummary_args setGatewayId(String gatewayId) { + public getAllCredentialSummaryForGateway_args setGatewayId(String gatewayId) { this.gatewayId = gatewayId; return this; } @@ -58480,6 +58543,14 @@ public void setFieldValue(_Fields field, Object value) { } break; + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((org.apache.airavata.model.credential.store.SummaryType)value); + } + break; + case GATEWAY_ID: if (value == null) { unsetGatewayId(); @@ -58496,6 +58567,9 @@ public Object getFieldValue(_Fields field) { case AUTHZ_TOKEN: return getAuthzToken(); + case TYPE: + return getType(); + case GATEWAY_ID: return getGatewayId(); @@ -58512,6 +58586,8 @@ public boolean isSet(_Fields field) { switch (field) { case AUTHZ_TOKEN: return isSetAuthzToken(); + case TYPE: + return isSetType(); case GATEWAY_ID: return isSetGatewayId(); } @@ -58522,12 +58598,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getAllGatewaySSHPubKeysSummary_args) - return this.equals((getAllGatewaySSHPubKeysSummary_args)that); + if (that instanceof getAllCredentialSummaryForGateway_args) + return this.equals((getAllCredentialSummaryForGateway_args)that); return false; } - public boolean equals(getAllGatewaySSHPubKeysSummary_args that) { + public boolean equals(getAllCredentialSummaryForGateway_args that) { if (that == null) return false; @@ -58540,6 +58616,15 @@ public boolean equals(getAllGatewaySSHPubKeysSummary_args that) { return false; } + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + boolean this_present_gatewayId = true && this.isSetGatewayId(); boolean that_present_gatewayId = true && that.isSetGatewayId(); if (this_present_gatewayId || that_present_gatewayId) { @@ -58561,6 +58646,11 @@ public int hashCode() { if (present_authzToken) list.add(authzToken); + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type.getValue()); + boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) @@ -58570,7 +58660,7 @@ public int hashCode() { } @Override - public int compareTo(getAllGatewaySSHPubKeysSummary_args other) { + public int compareTo(getAllCredentialSummaryForGateway_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -58587,6 +58677,16 @@ public int compareTo(getAllGatewaySSHPubKeysSummary_args other) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); if (lastComparison != 0) { return lastComparison; @@ -58614,7 +58714,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getAllGatewaySSHPubKeysSummary_args("); + StringBuilder sb = new StringBuilder("getAllCredentialSummaryForGateway_args("); boolean first = true; sb.append("authzToken:"); @@ -58625,6 +58725,14 @@ public String toString() { } first = false; if (!first) sb.append(", "); + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (!first) sb.append(", "); sb.append("gatewayId:"); if (this.gatewayId == null) { sb.append("null"); @@ -58641,6 +58749,9 @@ public void validate() throws org.apache.thrift.TException { if (authzToken == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString()); } + if (type == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString()); + } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } @@ -58666,15 +58777,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getAllGatewaySSHPubKeysSummary_argsStandardSchemeFactory implements SchemeFactory { - public getAllGatewaySSHPubKeysSummary_argsStandardScheme getScheme() { - return new getAllGatewaySSHPubKeysSummary_argsStandardScheme(); + private static class getAllCredentialSummaryForGateway_argsStandardSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForGateway_argsStandardScheme getScheme() { + return new getAllCredentialSummaryForGateway_argsStandardScheme(); } } - private static class getAllGatewaySSHPubKeysSummary_argsStandardScheme extends StandardScheme { + private static class getAllCredentialSummaryForGateway_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewaySSHPubKeysSummary_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllCredentialSummaryForGateway_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -58693,7 +58804,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewaySSHPub org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // GATEWAY_ID + case 2: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); + struct.setTypeIsSet(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); @@ -58712,7 +58831,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewaySSHPub struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getAllGatewaySSHPubKeysSummary_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getAllCredentialSummaryForGateway_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -58721,6 +58840,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getAllGatewaySSHPu struct.authzToken.write(oprot); oprot.writeFieldEnd(); } + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } if (struct.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); @@ -58732,27 +58856,30 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getAllGatewaySSHPu } - private static class getAllGatewaySSHPubKeysSummary_argsTupleSchemeFactory implements SchemeFactory { - public getAllGatewaySSHPubKeysSummary_argsTupleScheme getScheme() { - return new getAllGatewaySSHPubKeysSummary_argsTupleScheme(); + private static class getAllCredentialSummaryForGateway_argsTupleSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForGateway_argsTupleScheme getScheme() { + return new getAllCredentialSummaryForGateway_argsTupleScheme(); } } - private static class getAllGatewaySSHPubKeysSummary_argsTupleScheme extends TupleScheme { + private static class getAllCredentialSummaryForGateway_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHPubKeysSummary_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; struct.authzToken.write(oprot); + oprot.writeI32(struct.type.getValue()); oprot.writeString(struct.gatewayId); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHPubKeysSummary_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForGateway_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.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } @@ -58760,8 +58887,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHPubK } - public static class getAllGatewaySSHPubKeysSummary_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllGatewaySSHPubKeysSummary_result"); + public static class getAllCredentialSummaryForGateway_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCredentialSummaryForGateway_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (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); @@ -58770,11 +58897,11 @@ public static class getAllGatewaySSHPubKeysSummary_result implements org.apache. private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getAllGatewaySSHPubKeysSummary_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAllGatewaySSHPubKeysSummary_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getAllCredentialSummaryForGateway_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllCredentialSummaryForGateway_resultTupleSchemeFactory()); } - public List success; // required + public List 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 @@ -58852,7 +58979,7 @@ public String getFieldName() { 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.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary.class)))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.CredentialSummary.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, @@ -58860,14 +58987,14 @@ public String getFieldName() { 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))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllGatewaySSHPubKeysSummary_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaryForGateway_result.class, metaDataMap); } - public getAllGatewaySSHPubKeysSummary_result() { + public getAllCredentialSummaryForGateway_result() { } - public getAllGatewaySSHPubKeysSummary_result( - List success, + public getAllCredentialSummaryForGateway_result( + List success, org.apache.airavata.model.error.InvalidRequestException ire, org.apache.airavata.model.error.AiravataClientException ace, org.apache.airavata.model.error.AiravataSystemException ase) @@ -58882,11 +59009,11 @@ public getAllGatewaySSHPubKeysSummary_result( /** * Performs a deep copy on other. */ - public getAllGatewaySSHPubKeysSummary_result(getAllGatewaySSHPubKeysSummary_result other) { + public getAllCredentialSummaryForGateway_result(getAllCredentialSummaryForGateway_result other) { if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary other_element : other.success) { - __this__success.add(new org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary(other_element)); + List __this__success = new ArrayList(other.success.size()); + for (org.apache.airavata.model.credential.store.CredentialSummary other_element : other.success) { + __this__success.add(new org.apache.airavata.model.credential.store.CredentialSummary(other_element)); } this.success = __this__success; } @@ -58901,8 +59028,8 @@ public getAllGatewaySSHPubKeysSummary_result(getAllGatewaySSHPubKeysSummary_resu } } - public getAllGatewaySSHPubKeysSummary_result deepCopy() { - return new getAllGatewaySSHPubKeysSummary_result(this); + public getAllCredentialSummaryForGateway_result deepCopy() { + return new getAllCredentialSummaryForGateway_result(this); } @Override @@ -58917,22 +59044,22 @@ public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } - public java.util.Iterator getSuccessIterator() { + public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } - public void addToSuccess(org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary elem) { + public void addToSuccess(org.apache.airavata.model.credential.store.CredentialSummary elem) { if (this.success == null) { - this.success = new ArrayList(); + this.success = new ArrayList(); } this.success.add(elem); } - public List getSuccess() { + public List getSuccess() { return this.success; } - public getAllGatewaySSHPubKeysSummary_result setSuccess(List success) { + public getAllCredentialSummaryForGateway_result setSuccess(List success) { this.success = success; return this; } @@ -58956,7 +59083,7 @@ public org.apache.airavata.model.error.InvalidRequestException getIre() { return this.ire; } - public getAllGatewaySSHPubKeysSummary_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) { + public getAllCredentialSummaryForGateway_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) { this.ire = ire; return this; } @@ -58980,7 +59107,7 @@ public org.apache.airavata.model.error.AiravataClientException getAce() { return this.ace; } - public getAllGatewaySSHPubKeysSummary_result setAce(org.apache.airavata.model.error.AiravataClientException ace) { + public getAllCredentialSummaryForGateway_result setAce(org.apache.airavata.model.error.AiravataClientException ace) { this.ace = ace; return this; } @@ -59004,7 +59131,7 @@ public org.apache.airavata.model.error.AiravataSystemException getAse() { return this.ase; } - public getAllGatewaySSHPubKeysSummary_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) { + public getAllCredentialSummaryForGateway_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) { this.ase = ase; return this; } @@ -59030,7 +59157,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((List)value); } break; @@ -59102,12 +59229,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getAllGatewaySSHPubKeysSummary_result) - return this.equals((getAllGatewaySSHPubKeysSummary_result)that); + if (that instanceof getAllCredentialSummaryForGateway_result) + return this.equals((getAllCredentialSummaryForGateway_result)that); return false; } - public boolean equals(getAllGatewaySSHPubKeysSummary_result that) { + public boolean equals(getAllCredentialSummaryForGateway_result that) { if (that == null) return false; @@ -59178,7 +59305,7 @@ public int hashCode() { } @Override - public int compareTo(getAllGatewaySSHPubKeysSummary_result other) { + public int compareTo(getAllCredentialSummaryForGateway_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -59242,7 +59369,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getAllGatewaySSHPubKeysSummary_result("); + StringBuilder sb = new StringBuilder("getAllCredentialSummaryForGateway_result("); boolean first = true; sb.append("success:"); @@ -59301,15 +59428,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getAllGatewaySSHPubKeysSummary_resultStandardSchemeFactory implements SchemeFactory { - public getAllGatewaySSHPubKeysSummary_resultStandardScheme getScheme() { - return new getAllGatewaySSHPubKeysSummary_resultStandardScheme(); + private static class getAllCredentialSummaryForGateway_resultStandardSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForGateway_resultStandardScheme getScheme() { + return new getAllCredentialSummaryForGateway_resultStandardScheme(); } } - private static class getAllGatewaySSHPubKeysSummary_resultStandardScheme extends StandardScheme { + private static class getAllCredentialSummaryForGateway_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewaySSHPubKeysSummary_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllCredentialSummaryForGateway_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -59323,11 +59450,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewaySSHPub if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list34 = iprot.readListBegin(); - struct.success = new ArrayList(_list34.size); - org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary _elem35; + struct.success = new ArrayList(_list34.size); + org.apache.airavata.model.credential.store.CredentialSummary _elem35; for (int _i36 = 0; _i36 < _list34.size; ++_i36) { - _elem35 = new org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary(); + _elem35 = new org.apache.airavata.model.credential.store.CredentialSummary(); _elem35.read(iprot); struct.success.add(_elem35); } @@ -59376,7 +59503,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewaySSHPub struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getAllGatewaySSHPubKeysSummary_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getAllCredentialSummaryForGateway_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -59384,7 +59511,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getAllGatewaySSHPu oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary _iter37 : struct.success) + for (org.apache.airavata.model.credential.store.CredentialSummary _iter37 : struct.success) { _iter37.write(oprot); } @@ -59413,16 +59540,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getAllGatewaySSHPu } - private static class getAllGatewaySSHPubKeysSummary_resultTupleSchemeFactory implements SchemeFactory { - public getAllGatewaySSHPubKeysSummary_resultTupleScheme getScheme() { - return new getAllGatewaySSHPubKeysSummary_resultTupleScheme(); + private static class getAllCredentialSummaryForGateway_resultTupleSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForGateway_resultTupleScheme getScheme() { + return new getAllCredentialSummaryForGateway_resultTupleScheme(); } } - private static class getAllGatewaySSHPubKeysSummary_resultTupleScheme extends TupleScheme { + private static class getAllCredentialSummaryForGateway_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHPubKeysSummary_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -59441,7 +59568,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHPub if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary _iter38 : struct.success) + for (org.apache.airavata.model.credential.store.CredentialSummary _iter38 : struct.success) { _iter38.write(oprot); } @@ -59459,17 +59586,17 @@ public void write(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHPub } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHPubKeysSummary_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list39 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list39.size); - org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary _elem40; + struct.success = new ArrayList(_list39.size); + org.apache.airavata.model.credential.store.CredentialSummary _elem40; for (int _i41 = 0; _i41 < _list39.size; ++_i41) { - _elem40 = new org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary(); + _elem40 = new org.apache.airavata.model.credential.store.CredentialSummary(); _elem40.read(iprot); struct.success.add(_elem40); } @@ -59496,28 +59623,39 @@ public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHPubK } - public static class getAllSSHPubKeysSummaryForUserInGateway_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSSHPubKeysSummaryForUserInGateway_args"); + public static class getAllCredentialSummaryForUsersInGateway_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCredentialSummaryForUsersInGateway_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 GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", 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)3); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (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 org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getAllSSHPubKeysSummaryForUserInGateway_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAllSSHPubKeysSummaryForUserInGateway_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getAllCredentialSummaryForUsersInGateway_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllCredentialSummaryForUsersInGateway_argsTupleSchemeFactory()); } public org.apache.airavata.model.security.AuthzToken authzToken; // required + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + public org.apache.airavata.model.credential.store.SummaryType type; // required public String gatewayId; // required public String userId; // 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"), - GATEWAY_ID((short)2, "gatewayId"), - USER_ID((short)3, "userId"); + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + TYPE((short)2, "type"), + GATEWAY_ID((short)3, "gatewayId"), + USER_ID((short)4, "userId"); private static final Map byName = new HashMap(); @@ -59534,9 +59672,11 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTHZ_TOKEN return AUTHZ_TOKEN; - case 2: // GATEWAY_ID + case 2: // TYPE + return TYPE; + case 3: // GATEWAY_ID return GATEWAY_ID; - case 3: // USER_ID + case 4: // USER_ID return USER_ID; default: return null; @@ -59583,24 +59723,28 @@ public String getFieldName() { 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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.credential.store.SummaryType.class))); 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))); 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))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllSSHPubKeysSummaryForUserInGateway_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaryForUsersInGateway_args.class, metaDataMap); } - public getAllSSHPubKeysSummaryForUserInGateway_args() { + public getAllCredentialSummaryForUsersInGateway_args() { } - public getAllSSHPubKeysSummaryForUserInGateway_args( + public getAllCredentialSummaryForUsersInGateway_args( org.apache.airavata.model.security.AuthzToken authzToken, + org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId) { this(); this.authzToken = authzToken; + this.type = type; this.gatewayId = gatewayId; this.userId = userId; } @@ -59608,10 +59752,13 @@ public getAllSSHPubKeysSummaryForUserInGateway_args( /** * Performs a deep copy on other. */ - public getAllSSHPubKeysSummaryForUserInGateway_args(getAllSSHPubKeysSummaryForUserInGateway_args other) { + public getAllCredentialSummaryForUsersInGateway_args(getAllCredentialSummaryForUsersInGateway_args other) { if (other.isSetAuthzToken()) { this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken); } + if (other.isSetType()) { + this.type = other.type; + } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } @@ -59620,13 +59767,14 @@ public getAllSSHPubKeysSummaryForUserInGateway_args(getAllSSHPubKeysSummaryForUs } } - public getAllSSHPubKeysSummaryForUserInGateway_args deepCopy() { - return new getAllSSHPubKeysSummaryForUserInGateway_args(this); + public getAllCredentialSummaryForUsersInGateway_args deepCopy() { + return new getAllCredentialSummaryForUsersInGateway_args(this); } @Override public void clear() { this.authzToken = null; + this.type = null; this.gatewayId = null; this.userId = null; } @@ -59635,7 +59783,7 @@ public org.apache.airavata.model.security.AuthzToken getAuthzToken() { return this.authzToken; } - public getAllSSHPubKeysSummaryForUserInGateway_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) { + public getAllCredentialSummaryForUsersInGateway_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) { this.authzToken = authzToken; return this; } @@ -59655,11 +59803,43 @@ public void setAuthzTokenIsSet(boolean value) { } } + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + public org.apache.airavata.model.credential.store.SummaryType getType() { + return this.type; + } + + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + public getAllCredentialSummaryForUsersInGateway_args setType(org.apache.airavata.model.credential.store.SummaryType type) { + this.type = type; + return this; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + public String getGatewayId() { return this.gatewayId; } - public getAllSSHPubKeysSummaryForUserInGateway_args setGatewayId(String gatewayId) { + public getAllCredentialSummaryForUsersInGateway_args setGatewayId(String gatewayId) { this.gatewayId = gatewayId; return this; } @@ -59683,7 +59863,7 @@ public String getUserId() { return this.userId; } - public getAllSSHPubKeysSummaryForUserInGateway_args setUserId(String userId) { + public getAllCredentialSummaryForUsersInGateway_args setUserId(String userId) { this.userId = userId; return this; } @@ -59713,6 +59893,14 @@ public void setFieldValue(_Fields field, Object value) { } break; + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((org.apache.airavata.model.credential.store.SummaryType)value); + } + break; + case GATEWAY_ID: if (value == null) { unsetGatewayId(); @@ -59737,6 +59925,9 @@ public Object getFieldValue(_Fields field) { case AUTHZ_TOKEN: return getAuthzToken(); + case TYPE: + return getType(); + case GATEWAY_ID: return getGatewayId(); @@ -59756,6 +59947,8 @@ public boolean isSet(_Fields field) { switch (field) { case AUTHZ_TOKEN: return isSetAuthzToken(); + case TYPE: + return isSetType(); case GATEWAY_ID: return isSetGatewayId(); case USER_ID: @@ -59768,12 +59961,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getAllSSHPubKeysSummaryForUserInGateway_args) - return this.equals((getAllSSHPubKeysSummaryForUserInGateway_args)that); + if (that instanceof getAllCredentialSummaryForUsersInGateway_args) + return this.equals((getAllCredentialSummaryForUsersInGateway_args)that); return false; } - public boolean equals(getAllSSHPubKeysSummaryForUserInGateway_args that) { + public boolean equals(getAllCredentialSummaryForUsersInGateway_args that) { if (that == null) return false; @@ -59786,6 +59979,15 @@ public boolean equals(getAllSSHPubKeysSummaryForUserInGateway_args that) { return false; } + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + boolean this_present_gatewayId = true && this.isSetGatewayId(); boolean that_present_gatewayId = true && that.isSetGatewayId(); if (this_present_gatewayId || that_present_gatewayId) { @@ -59816,6 +60018,11 @@ public int hashCode() { if (present_authzToken) list.add(authzToken); + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type.getValue()); + boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) @@ -59830,7 +60037,7 @@ public int hashCode() { } @Override - public int compareTo(getAllSSHPubKeysSummaryForUserInGateway_args other) { + public int compareTo(getAllCredentialSummaryForUsersInGateway_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -59847,6 +60054,16 @@ public int compareTo(getAllSSHPubKeysSummaryForUserInGateway_args other) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); if (lastComparison != 0) { return lastComparison; @@ -59884,7 +60101,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getAllSSHPubKeysSummaryForUserInGateway_args("); + StringBuilder sb = new StringBuilder("getAllCredentialSummaryForUsersInGateway_args("); boolean first = true; sb.append("authzToken:"); @@ -59895,6 +60112,14 @@ public String toString() { } first = false; if (!first) sb.append(", "); + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (!first) sb.append(", "); sb.append("gatewayId:"); if (this.gatewayId == null) { sb.append("null"); @@ -59919,6 +60144,9 @@ public void validate() throws org.apache.thrift.TException { if (authzToken == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzToken' was not present! Struct: " + toString()); } + if (type == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString()); + } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } @@ -59947,15 +60175,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getAllSSHPubKeysSummaryForUserInGateway_argsStandardSchemeFactory implements SchemeFactory { - public getAllSSHPubKeysSummaryForUserInGateway_argsStandardScheme getScheme() { - return new getAllSSHPubKeysSummaryForUserInGateway_argsStandardScheme(); + private static class getAllCredentialSummaryForUsersInGateway_argsStandardSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForUsersInGateway_argsStandardScheme getScheme() { + return new getAllCredentialSummaryForUsersInGateway_argsStandardScheme(); } } - private static class getAllSSHPubKeysSummaryForUserInGateway_argsStandardScheme extends StandardScheme { + private static class getAllCredentialSummaryForUsersInGateway_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHPubKeysSummaryForUserInGateway_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllCredentialSummaryForUsersInGateway_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -59974,7 +60202,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHPubKeysSum org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // GATEWAY_ID + case 2: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); + struct.setTypeIsSet(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); @@ -59982,7 +60218,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHPubKeysSum org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // USER_ID + case 4: // USER_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userId = iprot.readString(); struct.setUserIdIsSet(true); @@ -60001,7 +60237,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHPubKeysSum struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getAllSSHPubKeysSummaryForUserInGateway_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getAllCredentialSummaryForUsersInGateway_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -60010,6 +60246,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getAllSSHPubKeysSu struct.authzToken.write(oprot); oprot.writeFieldEnd(); } + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } if (struct.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); @@ -60026,28 +60267,31 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getAllSSHPubKeysSu } - private static class getAllSSHPubKeysSummaryForUserInGateway_argsTupleSchemeFactory implements SchemeFactory { - public getAllSSHPubKeysSummaryForUserInGateway_argsTupleScheme getScheme() { - return new getAllSSHPubKeysSummaryForUserInGateway_argsTupleScheme(); + private static class getAllCredentialSummaryForUsersInGateway_argsTupleSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForUsersInGateway_argsTupleScheme getScheme() { + return new getAllCredentialSummaryForUsersInGateway_argsTupleScheme(); } } - private static class getAllSSHPubKeysSummaryForUserInGateway_argsTupleScheme extends TupleScheme { + private static class getAllCredentialSummaryForUsersInGateway_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHPubKeysSummaryForUserInGateway_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForUsersInGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; struct.authzToken.write(oprot); + oprot.writeI32(struct.type.getValue()); oprot.writeString(struct.gatewayId); oprot.writeString(struct.userId); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getAllSSHPubKeysSummaryForUserInGateway_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForUsersInGateway_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.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); struct.userId = iprot.readString(); @@ -60057,8 +60301,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, getAllSSHPubKeysSumm } - public static class getAllSSHPubKeysSummaryForUserInGateway_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSSHPubKeysSummaryForUserInGateway_result"); + public static class getAllCredentialSummaryForUsersInGateway_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCredentialSummaryForUsersInGateway_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (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); @@ -60067,11 +60311,11 @@ public static class getAllSSHPubKeysSummaryForUserInGateway_result implements or private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getAllSSHPubKeysSummaryForUserInGateway_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAllSSHPubKeysSummaryForUserInGateway_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getAllCredentialSummaryForUsersInGateway_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllCredentialSummaryForUsersInGateway_resultTupleSchemeFactory()); } - public List success; // required + public List 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 @@ -60149,7 +60393,7 @@ public String getFieldName() { 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.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary.class)))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.CredentialSummary.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, @@ -60157,14 +60401,14 @@ public String getFieldName() { 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))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllSSHPubKeysSummaryForUserInGateway_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaryForUsersInGateway_result.class, metaDataMap); } - public getAllSSHPubKeysSummaryForUserInGateway_result() { + public getAllCredentialSummaryForUsersInGateway_result() { } - public getAllSSHPubKeysSummaryForUserInGateway_result( - List success, + public getAllCredentialSummaryForUsersInGateway_result( + List success, org.apache.airavata.model.error.InvalidRequestException ire, org.apache.airavata.model.error.AiravataClientException ace, org.apache.airavata.model.error.AiravataSystemException ase) @@ -60179,11 +60423,11 @@ public getAllSSHPubKeysSummaryForUserInGateway_result( /** * Performs a deep copy on other. */ - public getAllSSHPubKeysSummaryForUserInGateway_result(getAllSSHPubKeysSummaryForUserInGateway_result other) { + public getAllCredentialSummaryForUsersInGateway_result(getAllCredentialSummaryForUsersInGateway_result other) { if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary other_element : other.success) { - __this__success.add(new org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary(other_element)); + List __this__success = new ArrayList(other.success.size()); + for (org.apache.airavata.model.credential.store.CredentialSummary other_element : other.success) { + __this__success.add(new org.apache.airavata.model.credential.store.CredentialSummary(other_element)); } this.success = __this__success; } @@ -60198,8 +60442,8 @@ public getAllSSHPubKeysSummaryForUserInGateway_result(getAllSSHPubKeysSummaryFor } } - public getAllSSHPubKeysSummaryForUserInGateway_result deepCopy() { - return new getAllSSHPubKeysSummaryForUserInGateway_result(this); + public getAllCredentialSummaryForUsersInGateway_result deepCopy() { + return new getAllCredentialSummaryForUsersInGateway_result(this); } @Override @@ -60214,22 +60458,22 @@ public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } - public java.util.Iterator getSuccessIterator() { + public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } - public void addToSuccess(org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary elem) { + public void addToSuccess(org.apache.airavata.model.credential.store.CredentialSummary elem) { if (this.success == null) { - this.success = new ArrayList(); + this.success = new ArrayList(); } this.success.add(elem); } - public List getSuccess() { + public List getSuccess() { return this.success; } - public getAllSSHPubKeysSummaryForUserInGateway_result setSuccess(List success) { + public getAllCredentialSummaryForUsersInGateway_result setSuccess(List success) { this.success = success; return this; } @@ -60253,7 +60497,7 @@ public org.apache.airavata.model.error.InvalidRequestException getIre() { return this.ire; } - public getAllSSHPubKeysSummaryForUserInGateway_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) { + public getAllCredentialSummaryForUsersInGateway_result setIre(org.apache.airavata.model.error.InvalidRequestException ire) { this.ire = ire; return this; } @@ -60277,7 +60521,7 @@ public org.apache.airavata.model.error.AiravataClientException getAce() { return this.ace; } - public getAllSSHPubKeysSummaryForUserInGateway_result setAce(org.apache.airavata.model.error.AiravataClientException ace) { + public getAllCredentialSummaryForUsersInGateway_result setAce(org.apache.airavata.model.error.AiravataClientException ace) { this.ace = ace; return this; } @@ -60301,7 +60545,7 @@ public org.apache.airavata.model.error.AiravataSystemException getAse() { return this.ase; } - public getAllSSHPubKeysSummaryForUserInGateway_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) { + public getAllCredentialSummaryForUsersInGateway_result setAse(org.apache.airavata.model.error.AiravataSystemException ase) { this.ase = ase; return this; } @@ -60327,7 +60571,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((List)value); } break; @@ -60399,12 +60643,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getAllSSHPubKeysSummaryForUserInGateway_result) - return this.equals((getAllSSHPubKeysSummaryForUserInGateway_result)that); + if (that instanceof getAllCredentialSummaryForUsersInGateway_result) + return this.equals((getAllCredentialSummaryForUsersInGateway_result)that); return false; } - public boolean equals(getAllSSHPubKeysSummaryForUserInGateway_result that) { + public boolean equals(getAllCredentialSummaryForUsersInGateway_result that) { if (that == null) return false; @@ -60475,7 +60719,7 @@ public int hashCode() { } @Override - public int compareTo(getAllSSHPubKeysSummaryForUserInGateway_result other) { + public int compareTo(getAllCredentialSummaryForUsersInGateway_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -60539,7 +60783,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getAllSSHPubKeysSummaryForUserInGateway_result("); + StringBuilder sb = new StringBuilder("getAllCredentialSummaryForUsersInGateway_result("); boolean first = true; sb.append("success:"); @@ -60598,15 +60842,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getAllSSHPubKeysSummaryForUserInGateway_resultStandardSchemeFactory implements SchemeFactory { - public getAllSSHPubKeysSummaryForUserInGateway_resultStandardScheme getScheme() { - return new getAllSSHPubKeysSummaryForUserInGateway_resultStandardScheme(); + private static class getAllCredentialSummaryForUsersInGateway_resultStandardSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForUsersInGateway_resultStandardScheme getScheme() { + return new getAllCredentialSummaryForUsersInGateway_resultStandardScheme(); } } - private static class getAllSSHPubKeysSummaryForUserInGateway_resultStandardScheme extends StandardScheme { + private static class getAllCredentialSummaryForUsersInGateway_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHPubKeysSummaryForUserInGateway_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllCredentialSummaryForUsersInGateway_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -60620,11 +60864,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHPubKeysSum if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list42 = iprot.readListBegin(); - struct.success = new ArrayList(_list42.size); - org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary _elem43; + struct.success = new ArrayList(_list42.size); + org.apache.airavata.model.credential.store.CredentialSummary _elem43; for (int _i44 = 0; _i44 < _list42.size; ++_i44) { - _elem43 = new org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary(); + _elem43 = new org.apache.airavata.model.credential.store.CredentialSummary(); _elem43.read(iprot); struct.success.add(_elem43); } @@ -60673,7 +60917,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHPubKeysSum struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getAllSSHPubKeysSummaryForUserInGateway_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getAllCredentialSummaryForUsersInGateway_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -60681,7 +60925,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getAllSSHPubKeysSu oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary _iter45 : struct.success) + for (org.apache.airavata.model.credential.store.CredentialSummary _iter45 : struct.success) { _iter45.write(oprot); } @@ -60710,16 +60954,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getAllSSHPubKeysSu } - private static class getAllSSHPubKeysSummaryForUserInGateway_resultTupleSchemeFactory implements SchemeFactory { - public getAllSSHPubKeysSummaryForUserInGateway_resultTupleScheme getScheme() { - return new getAllSSHPubKeysSummaryForUserInGateway_resultTupleScheme(); + private static class getAllCredentialSummaryForUsersInGateway_resultTupleSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForUsersInGateway_resultTupleScheme getScheme() { + return new getAllCredentialSummaryForUsersInGateway_resultTupleScheme(); } } - private static class getAllSSHPubKeysSummaryForUserInGateway_resultTupleScheme extends TupleScheme { + private static class getAllCredentialSummaryForUsersInGateway_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHPubKeysSummaryForUserInGateway_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForUsersInGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -60738,7 +60982,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHPubKeysSum if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary _iter46 : struct.success) + for (org.apache.airavata.model.credential.store.CredentialSummary _iter46 : struct.success) { _iter46.write(oprot); } @@ -60756,17 +61000,17 @@ public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHPubKeysSum } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getAllSSHPubKeysSummaryForUserInGateway_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForUsersInGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list47 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list47.size); - org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary _elem48; + struct.success = new ArrayList(_list47.size); + org.apache.airavata.model.credential.store.CredentialSummary _elem48; for (int _i49 = 0; _i49 < _list47.size; ++_i49) { - _elem48 = new org.apache.airavata.model.appcatalog.credentialsummary.CredentialSummary(); + _elem48 = new org.apache.airavata.model.credential.store.CredentialSummary(); _elem48.read(iprot); struct.success.add(_elem48); } diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/credential/store/CertificateCredential.java similarity index 94% rename from modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java rename to airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/credential/store/CertificateCredential.java index d2e5d8541a..c1d959c2b9 100644 --- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/CertificateCredential.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/credential/store/CertificateCredential.java @@ -1,26 +1,27 @@ - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ -package org.apache.airavata.credential.store.datamodel; +package org.apache.airavata.model.credential.store; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; @@ -50,7 +51,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-11-08") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") public class CertificateCredential implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CertificateCredential"); @@ -69,14 +70,14 @@ public class CertificateCredential implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CommunityUser"); @@ -64,9 +65,9 @@ public class CommunityUser implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CredentialSummary"); - 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)1); - private static final org.apache.thrift.protocol.TField USERNAME_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 TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); + 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)2); + private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField PUBLIC_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("publicKey", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField PERSISTED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("persistedTime", org.apache.thrift.protocol.TType.I64, (short)5); - private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)7); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -68,21 +69,27 @@ public class CredentialSummary implements org.apache.thrift.TBase byName = new HashMap(); @@ -97,17 +104,19 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // GATEWAY_ID + case 1: // TYPE + return TYPE; + case 2: // GATEWAY_ID return GATEWAY_ID; - case 2: // USERNAME + case 3: // USERNAME return USERNAME; - case 3: // TOKEN - return TOKEN; case 4: // PUBLIC_KEY return PUBLIC_KEY; case 5: // PERSISTED_TIME return PERSISTED_TIME; - case 6: // DESCRIPTION + case 6: // TOKEN + return TOKEN; + case 7: // DESCRIPTION return DESCRIPTION; default: return null; @@ -155,16 +164,18 @@ public String getFieldName() { 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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SummaryType.class))); 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))); tmpMap.put(_Fields.USERNAME, 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.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PUBLIC_KEY, new org.apache.thrift.meta_data.FieldMetaData("publicKey", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PERSISTED_TIME, new org.apache.thrift.meta_data.FieldMetaData("persistedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); @@ -175,11 +186,13 @@ public CredentialSummary() { } public CredentialSummary( + SummaryType type, String gatewayId, String username, String token) { this(); + this.type = type; this.gatewayId = gatewayId; this.username = username; this.token = token; @@ -190,19 +203,22 @@ public CredentialSummary( */ public CredentialSummary(CredentialSummary other) { __isset_bitfield = other.__isset_bitfield; + if (other.isSetType()) { + this.type = other.type; + } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } if (other.isSetUsername()) { this.username = other.username; } - if (other.isSetToken()) { - this.token = other.token; - } if (other.isSetPublicKey()) { this.publicKey = other.publicKey; } this.persistedTime = other.persistedTime; + if (other.isSetToken()) { + this.token = other.token; + } if (other.isSetDescription()) { this.description = other.description; } @@ -214,15 +230,47 @@ public CredentialSummary deepCopy() { @Override public void clear() { + this.type = null; this.gatewayId = null; this.username = null; - this.token = null; this.publicKey = null; setPersistedTimeIsSet(false); this.persistedTime = 0; + this.token = null; this.description = null; } + /** + * + * @see SummaryType + */ + public SummaryType getType() { + return this.type; + } + + /** + * + * @see SummaryType + */ + public void setType(SummaryType type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + public String getGatewayId() { return this.gatewayId; } @@ -269,29 +317,6 @@ public void setUsernameIsSet(boolean value) { } } - public String getToken() { - return this.token; - } - - public void setToken(String token) { - this.token = token; - } - - public void unsetToken() { - this.token = null; - } - - /** Returns true if field token is set (has been assigned a value) and false otherwise */ - public boolean isSetToken() { - return this.token != null; - } - - public void setTokenIsSet(boolean value) { - if (!value) { - this.token = null; - } - } - public String getPublicKey() { return this.publicKey; } @@ -337,6 +362,29 @@ public void setPersistedTimeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID, value); } + public String getToken() { + return this.token; + } + + public void setToken(String token) { + this.token = token; + } + + public void unsetToken() { + this.token = null; + } + + /** Returns true if field token is set (has been assigned a value) and false otherwise */ + public boolean isSetToken() { + return this.token != null; + } + + public void setTokenIsSet(boolean value) { + if (!value) { + this.token = null; + } + } + public String getDescription() { return this.description; } @@ -362,6 +410,14 @@ public void setDescriptionIsSet(boolean value) { public void setFieldValue(_Fields field, Object value) { switch (field) { + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((SummaryType)value); + } + break; + case GATEWAY_ID: if (value == null) { unsetGatewayId(); @@ -378,14 +434,6 @@ public void setFieldValue(_Fields field, Object value) { } break; - case TOKEN: - if (value == null) { - unsetToken(); - } else { - setToken((String)value); - } - break; - case PUBLIC_KEY: if (value == null) { unsetPublicKey(); @@ -402,6 +450,14 @@ public void setFieldValue(_Fields field, Object value) { } break; + case TOKEN: + if (value == null) { + unsetToken(); + } else { + setToken((String)value); + } + break; + case DESCRIPTION: if (value == null) { unsetDescription(); @@ -415,21 +471,24 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { + case TYPE: + return getType(); + case GATEWAY_ID: return getGatewayId(); case USERNAME: return getUsername(); - case TOKEN: - return getToken(); - case PUBLIC_KEY: return getPublicKey(); case PERSISTED_TIME: return getPersistedTime(); + case TOKEN: + return getToken(); + case DESCRIPTION: return getDescription(); @@ -444,16 +503,18 @@ public boolean isSet(_Fields field) { } switch (field) { + case TYPE: + return isSetType(); case GATEWAY_ID: return isSetGatewayId(); case USERNAME: return isSetUsername(); - case TOKEN: - return isSetToken(); case PUBLIC_KEY: return isSetPublicKey(); case PERSISTED_TIME: return isSetPersistedTime(); + case TOKEN: + return isSetToken(); case DESCRIPTION: return isSetDescription(); } @@ -473,6 +534,15 @@ public boolean equals(CredentialSummary that) { if (that == null) return false; + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + boolean this_present_gatewayId = true && this.isSetGatewayId(); boolean that_present_gatewayId = true && that.isSetGatewayId(); if (this_present_gatewayId || that_present_gatewayId) { @@ -491,15 +561,6 @@ public boolean equals(CredentialSummary that) { return false; } - boolean this_present_token = true && this.isSetToken(); - boolean that_present_token = true && that.isSetToken(); - if (this_present_token || that_present_token) { - if (!(this_present_token && that_present_token)) - return false; - if (!this.token.equals(that.token)) - return false; - } - boolean this_present_publicKey = true && this.isSetPublicKey(); boolean that_present_publicKey = true && that.isSetPublicKey(); if (this_present_publicKey || that_present_publicKey) { @@ -518,6 +579,15 @@ public boolean equals(CredentialSummary that) { return false; } + boolean this_present_token = true && this.isSetToken(); + boolean that_present_token = true && that.isSetToken(); + if (this_present_token || that_present_token) { + if (!(this_present_token && that_present_token)) + return false; + if (!this.token.equals(that.token)) + return false; + } + boolean this_present_description = true && this.isSetDescription(); boolean that_present_description = true && that.isSetDescription(); if (this_present_description || that_present_description) { @@ -534,6 +604,11 @@ public boolean equals(CredentialSummary that) { public int hashCode() { List list = new ArrayList(); + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type.getValue()); + boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) @@ -544,11 +619,6 @@ public int hashCode() { if (present_username) list.add(username); - boolean present_token = true && (isSetToken()); - list.add(present_token); - if (present_token) - list.add(token); - boolean present_publicKey = true && (isSetPublicKey()); list.add(present_publicKey); if (present_publicKey) @@ -559,6 +629,11 @@ public int hashCode() { if (present_persistedTime) list.add(persistedTime); + boolean present_token = true && (isSetToken()); + list.add(present_token); + if (present_token) + list.add(token); + boolean present_description = true && (isSetDescription()); list.add(present_description); if (present_description) @@ -575,32 +650,32 @@ public int compareTo(CredentialSummary other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); if (lastComparison != 0) { return lastComparison; } - if (isSetGatewayId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId); + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername()); + lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); if (lastComparison != 0) { return lastComparison; } - if (isSetUsername()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username); + if (isSetGatewayId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken()); + lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername()); if (lastComparison != 0) { return lastComparison; } - if (isSetToken()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token); + if (isSetUsername()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username); if (lastComparison != 0) { return lastComparison; } @@ -625,6 +700,16 @@ public int compareTo(CredentialSummary other) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription()); if (lastComparison != 0) { return lastComparison; @@ -655,6 +740,14 @@ public String toString() { StringBuilder sb = new StringBuilder("CredentialSummary("); boolean first = true; + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (!first) sb.append(", "); sb.append("gatewayId:"); if (this.gatewayId == null) { sb.append("null"); @@ -670,14 +763,6 @@ public String toString() { sb.append(this.username); } first = false; - if (!first) sb.append(", "); - sb.append("token:"); - if (this.token == null) { - sb.append("null"); - } else { - sb.append(this.token); - } - first = false; if (isSetPublicKey()) { if (!first) sb.append(", "); sb.append("publicKey:"); @@ -694,6 +779,14 @@ public String toString() { sb.append(this.persistedTime); first = false; } + if (!first) sb.append(", "); + sb.append("token:"); + if (this.token == null) { + sb.append("null"); + } else { + sb.append(this.token); + } + first = false; if (isSetDescription()) { if (!first) sb.append(", "); sb.append("description:"); @@ -710,6 +803,10 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields + if (!isSetType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString()); + } + if (!isSetGatewayId()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' is unset! Struct:" + toString()); } @@ -761,26 +858,26 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, CredentialSummary s break; } switch (schemeField.id) { - case 1: // GATEWAY_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.gatewayId = iprot.readString(); - struct.setGatewayIdIsSet(true); + case 1: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // USERNAME + case 2: // GATEWAY_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.username = iprot.readString(); - struct.setUsernameIsSet(true); + struct.gatewayId = iprot.readString(); + struct.setGatewayIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // TOKEN + case 3: // USERNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.token = iprot.readString(); - struct.setTokenIsSet(true); + struct.username = iprot.readString(); + struct.setUsernameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -801,7 +898,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, CredentialSummary s org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 6: // DESCRIPTION + case 6: // TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.token = iprot.readString(); + struct.setTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // DESCRIPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.description = iprot.readString(); struct.setDescriptionIsSet(true); @@ -822,6 +927,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, CredentialSummary struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } if (struct.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); @@ -832,11 +942,6 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, CredentialSummary oprot.writeString(struct.username); oprot.writeFieldEnd(); } - if (struct.token != null) { - oprot.writeFieldBegin(TOKEN_FIELD_DESC); - oprot.writeString(struct.token); - oprot.writeFieldEnd(); - } if (struct.publicKey != null) { if (struct.isSetPublicKey()) { oprot.writeFieldBegin(PUBLIC_KEY_FIELD_DESC); @@ -849,6 +954,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, CredentialSummary oprot.writeI64(struct.persistedTime); oprot.writeFieldEnd(); } + if (struct.token != null) { + oprot.writeFieldBegin(TOKEN_FIELD_DESC); + oprot.writeString(struct.token); + oprot.writeFieldEnd(); + } if (struct.description != null) { if (struct.isSetDescription()) { oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); @@ -873,6 +983,7 @@ private static class CredentialSummaryTupleScheme extends TupleScheme, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PasswordCredential"); @@ -68,13 +69,13 @@ public class PasswordCredential implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHCredential"); @@ -69,14 +70,14 @@ public class SSHCredential implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHCredentialSummary"); - 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)1); - private static final org.apache.thrift.protocol.TField USERNAME_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 PUBLIC_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("publicKey", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField PERSISTED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("persistedTime", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); + 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)2); + private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField PUBLIC_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("publicKey", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField PERSISTED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("persistedTime", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)7); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -67,21 +69,27 @@ public class SSHCredentialSummary implements org.apache.thrift.TBase byName = new HashMap(); @@ -96,17 +104,19 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // GATEWAY_ID + case 1: // TYPE + return TYPE; + case 2: // GATEWAY_ID return GATEWAY_ID; - case 2: // USERNAME + case 3: // USERNAME return USERNAME; - case 3: // PUBLIC_KEY + case 4: // PUBLIC_KEY return PUBLIC_KEY; - case 4: // PERSISTED_TIME + case 5: // PERSISTED_TIME return PERSISTED_TIME; - case 5: // TOKEN + case 6: // TOKEN return TOKEN; - case 6: // DESCRIPTION + case 7: // DESCRIPTION return DESCRIPTION; default: return null; @@ -154,6 +164,8 @@ public String getFieldName() { 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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SummaryType.class))); 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))); tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED, @@ -174,11 +186,13 @@ public SSHCredentialSummary() { } public SSHCredentialSummary( + SummaryType type, String gatewayId, String username, String token) { this(); + this.type = type; this.gatewayId = gatewayId; this.username = username; this.token = token; @@ -189,6 +203,9 @@ public SSHCredentialSummary( */ public SSHCredentialSummary(SSHCredentialSummary other) { __isset_bitfield = other.__isset_bitfield; + if (other.isSetType()) { + this.type = other.type; + } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } @@ -213,6 +230,7 @@ public SSHCredentialSummary deepCopy() { @Override public void clear() { + this.type = null; this.gatewayId = null; this.username = null; this.publicKey = null; @@ -222,13 +240,43 @@ public void clear() { this.description = null; } + /** + * + * @see SummaryType + */ + public SummaryType getType() { + return this.type; + } + + /** + * + * @see SummaryType + */ + public void setType(SummaryType type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + public String getGatewayId() { return this.gatewayId; } - public SSHCredentialSummary setGatewayId(String gatewayId) { + public void setGatewayId(String gatewayId) { this.gatewayId = gatewayId; - return this; } public void unsetGatewayId() { @@ -250,9 +298,8 @@ public String getUsername() { return this.username; } - public SSHCredentialSummary setUsername(String username) { + public void setUsername(String username) { this.username = username; - return this; } public void unsetUsername() { @@ -274,9 +321,8 @@ public String getPublicKey() { return this.publicKey; } - public SSHCredentialSummary setPublicKey(String publicKey) { + public void setPublicKey(String publicKey) { this.publicKey = publicKey; - return this; } public void unsetPublicKey() { @@ -298,10 +344,9 @@ public long getPersistedTime() { return this.persistedTime; } - public SSHCredentialSummary setPersistedTime(long persistedTime) { + public void setPersistedTime(long persistedTime) { this.persistedTime = persistedTime; setPersistedTimeIsSet(true); - return this; } public void unsetPersistedTime() { @@ -321,9 +366,8 @@ public String getToken() { return this.token; } - public SSHCredentialSummary setToken(String token) { + public void setToken(String token) { this.token = token; - return this; } public void unsetToken() { @@ -345,9 +389,8 @@ public String getDescription() { return this.description; } - public SSHCredentialSummary setDescription(String description) { + public void setDescription(String description) { this.description = description; - return this; } public void unsetDescription() { @@ -367,6 +410,14 @@ public void setDescriptionIsSet(boolean value) { public void setFieldValue(_Fields field, Object value) { switch (field) { + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((SummaryType)value); + } + break; + case GATEWAY_ID: if (value == null) { unsetGatewayId(); @@ -420,6 +471,9 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { + case TYPE: + return getType(); + case GATEWAY_ID: return getGatewayId(); @@ -449,6 +503,8 @@ public boolean isSet(_Fields field) { } switch (field) { + case TYPE: + return isSetType(); case GATEWAY_ID: return isSetGatewayId(); case USERNAME: @@ -478,6 +534,15 @@ public boolean equals(SSHCredentialSummary that) { if (that == null) return false; + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + boolean this_present_gatewayId = true && this.isSetGatewayId(); boolean that_present_gatewayId = true && that.isSetGatewayId(); if (this_present_gatewayId || that_present_gatewayId) { @@ -539,6 +604,11 @@ public boolean equals(SSHCredentialSummary that) { public int hashCode() { List list = new ArrayList(); + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type.getValue()); + boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) @@ -580,6 +650,16 @@ public int compareTo(SSHCredentialSummary other) { int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); if (lastComparison != 0) { return lastComparison; @@ -660,6 +740,14 @@ public String toString() { StringBuilder sb = new StringBuilder("SSHCredentialSummary("); boolean first = true; + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (!first) sb.append(", "); sb.append("gatewayId:"); if (this.gatewayId == null) { sb.append("null"); @@ -715,15 +803,22 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (gatewayId == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); + if (!isSetType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString()); + } + + if (!isSetGatewayId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' is unset! Struct:" + toString()); } - if (username == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString()); + + if (!isSetUsername()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' is unset! Struct:" + toString()); } - if (token == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'token' was not present! Struct: " + toString()); + + if (!isSetToken()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'token' is unset! Struct:" + toString()); } + // check for sub-struct validity } @@ -763,7 +858,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, SSHCredentialSummar break; } switch (schemeField.id) { - case 1: // GATEWAY_ID + case 1: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // GATEWAY_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); @@ -771,7 +874,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, SSHCredentialSummar org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // USERNAME + case 3: // USERNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.username = iprot.readString(); struct.setUsernameIsSet(true); @@ -779,7 +882,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, SSHCredentialSummar org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // PUBLIC_KEY + case 4: // PUBLIC_KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.publicKey = iprot.readString(); struct.setPublicKeyIsSet(true); @@ -787,7 +890,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, SSHCredentialSummar org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 4: // PERSISTED_TIME + case 5: // PERSISTED_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.persistedTime = iprot.readI64(); struct.setPersistedTimeIsSet(true); @@ -795,7 +898,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, SSHCredentialSummar org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 5: // TOKEN + case 6: // TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.token = iprot.readString(); struct.setTokenIsSet(true); @@ -803,7 +906,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, SSHCredentialSummar org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 6: // DESCRIPTION + case 7: // DESCRIPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.description = iprot.readString(); struct.setDescriptionIsSet(true); @@ -817,8 +920,6 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, SSHCredentialSummar iprot.readFieldEnd(); } iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -826,6 +927,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, SSHCredentialSumma struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } if (struct.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); @@ -877,6 +983,7 @@ private static class SSHCredentialSummaryTupleScheme extends TupleScheme getAllSSHKeysForGateway(String gatewayId) throws org. } @Override - public List getAllGatewaySSHCredentialSummary(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, TException { - Map sshKeyMap = new HashMap<>(); - List summaryList = new ArrayList<>(); - try { - List allCredentials = credentialReader.getAllCredentialsPerGateway(gatewayId); - if (allCredentials != null && !allCredentials.isEmpty()){ - for (Credential credential : allCredentials) { - if (credential instanceof org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) { - org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential sshCredential = (org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) credential; - SSHCredentialSummary sshCredentialSummary = new SSHCredentialSummary(); - sshCredentialSummary.setToken(sshCredential.getToken()); - sshCredentialSummary.setUsername(sshCredential.getPortalUserName()); - sshCredentialSummary.setGatewayId(sshCredential.getGateway()); - sshCredentialSummary.setDescription(sshCredential.getDescription()); - sshCredentialSummary.setPublicKey(new String(sshCredential.getPublicKey())); - summaryList.add(sshCredentialSummary); + public List getAllCredentialSummaryForGateway(SummaryType type, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, TException { + if(type.equals(SummaryType.SSH)){ + Map sshKeyMap = new HashMap<>(); + List summaryList = new ArrayList<>(); + try { + List allCredentials = credentialReader.getAllCredentialsPerGateway(gatewayId); + if (allCredentials != null && !allCredentials.isEmpty()){ + for (Credential credential : allCredentials) { + if (credential instanceof org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) { + org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential sshCredential = (org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) credential; + CredentialSummary sshCredentialSummary = new CredentialSummary(); + sshCredentialSummary.setToken(sshCredential.getToken()); + sshCredentialSummary.setUsername(sshCredential.getPortalUserName()); + sshCredentialSummary.setGatewayId(sshCredential.getGateway()); + sshCredentialSummary.setDescription(sshCredential.getDescription()); + sshCredentialSummary.setPublicKey(new String(sshCredential.getPublicKey())); + summaryList.add(sshCredentialSummary); + } } } + } catch (CredentialStoreException e) { + log.error("Error occurred while retrieving credential Summary", e); + throw new org.apache.airavata.credential.store.exception.CredentialStoreException("Error occurred while retrieving credential Summary"); } - } catch (CredentialStoreException e) { - log.error("Error occurred while retrieving credential Summary", e); - throw new org.apache.airavata.credential.store.exception.CredentialStoreException("Error occurred while retrieving credential Summary"); + return summaryList; + }else{ + log.info("Summay Type"+ type.toString() + " not supported for gateway id - " + gatewayId); + return null; } - return summaryList; } @Override - public List getAllSSHCredentialSummaryForUserInGateway(String gatewayId, String userId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, TException { - Map sshKeyMap = new HashMap<>(); - List summaryList = new ArrayList<>(); - try { - List allCredentials = credentialReader.getAllCredentials(); - if (allCredentials != null && !allCredentials.isEmpty()){ - for (Credential credential : allCredentials) { - if (credential instanceof org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) { - org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential sshCredential = (org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) credential; - String portalUserName = sshCredential.getPortalUserName(); - String gateway = sshCredential.getGateway(); - if (portalUserName != null && gateway != null){ - if (portalUserName.equals(userId) && gateway.equals(gatewayId)) { - org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential sshCredentialKey = (org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) credential; - SSHCredentialSummary sshCredentialSummary = new SSHCredentialSummary(); - sshCredentialSummary.setToken(sshCredentialKey.getToken()); - sshCredentialSummary.setUsername(sshCredentialKey.getPortalUserName()); - sshCredentialSummary.setGatewayId(sshCredentialKey.getGateway()); - sshCredentialSummary.setDescription(sshCredentialKey.getDescription()); - sshCredentialSummary.setPublicKey(new String(sshCredentialKey.getPublicKey())); - summaryList.add(sshCredentialSummary); + public List getAllCredentialSummaryForUserInGateway(SummaryType type, String gatewayId, String userId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, TException { + if(type.equals(SummaryType.SSH)){ + Map sshKeyMap = new HashMap<>(); + List summaryList = new ArrayList<>(); + try { + List allCredentials = credentialReader.getAllCredentials(); + if (allCredentials != null && !allCredentials.isEmpty()){ + for (Credential credential : allCredentials) { + if (credential instanceof org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) { + org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential sshCredential = (org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) credential; + String portalUserName = sshCredential.getPortalUserName(); + String gateway = sshCredential.getGateway(); + if (portalUserName != null && gateway != null){ + if (portalUserName.equals(userId) && gateway.equals(gatewayId)) { + org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential sshCredentialKey = (org.apache.airavata.credential.store.credential.impl.ssh.SSHCredential) credential; + CredentialSummary sshCredentialSummary = new CredentialSummary(); + sshCredentialSummary.setToken(sshCredentialKey.getToken()); + sshCredentialSummary.setUsername(sshCredentialKey.getPortalUserName()); + sshCredentialSummary.setGatewayId(sshCredentialKey.getGateway()); + sshCredentialSummary.setDescription(sshCredentialKey.getDescription()); + sshCredentialSummary.setPublicKey(new String(sshCredentialKey.getPublicKey())); + summaryList.add(sshCredentialSummary); + } } } } } + } catch (CredentialStoreException e) { + log.error("Error occurred while retrieving credential Summary", e); + throw new org.apache.airavata.credential.store.exception.CredentialStoreException("Error occurred while retrieving credential Summary"); } - } catch (CredentialStoreException e) { - log.error("Error occurred while retrieving credential Summary", e); - throw new org.apache.airavata.credential.store.exception.CredentialStoreException("Error occurred while retrieving credential Summary"); + return summaryList; + }else{ + log.info("Summay Type"+ type.toString() + " not supported for user Id - " + userId + " and " + + "gateway id - " + gatewayId); + return null; } - return summaryList; } @Override diff --git a/modules/credential-store/credential-store-stubs/pom.xml b/modules/credential-store/credential-store-stubs/pom.xml index 97ade9dc57..0de50383a5 100644 --- a/modules/credential-store/credential-store-stubs/pom.xml +++ b/modules/credential-store/credential-store-stubs/pom.xml @@ -52,4 +52,29 @@ UTF-8 + + + + com.google.code.maven-replacer-plugin + replacer + ${maven.replacer.plugin.version} + + + generate-sources + + replace + + + + + + ${basedir}/src/main/java/org/apache/airavata/**/*.java + + , date = ".*" + + + + + + \ No newline at end of file diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java index 39d56bea83..b3e2d856d0 100644 --- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java +++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/client/TestSSLClient.java @@ -25,9 +25,9 @@ import org.apache.airavata.common.utils.Constants; import org.apache.airavata.common.utils.ServerSettings; import org.apache.airavata.credential.store.cpi.CredentialStoreService; -import org.apache.airavata.credential.store.datamodel.CertificateCredential; -import org.apache.airavata.credential.store.datamodel.CommunityUser; -import org.apache.airavata.credential.store.datamodel.SSHCredential; +import org.apache.airavata.model.credential.store.CertificateCredential; +import org.apache.airavata.model.credential.store.CommunityUser; +import org.apache.airavata.model.credential.store.SSHCredential; import org.apache.thrift.TException; import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.protocol.TProtocol; diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java index 4d2a456e67..671d5102ce 100644 --- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java +++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java @@ -50,7 +50,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-11-08") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") public class CredentialStoreService { public interface Iface { @@ -66,27 +66,27 @@ public interface Iface { * * @param sshCredential */ - public String addSSHCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; + public String addSSHCredential(org.apache.airavata.model.credential.store.SSHCredential sshCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; - public String addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; + public String addCertificateCredential(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; - public String addPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; + public String addPasswordCredential(org.apache.airavata.model.credential.store.PasswordCredential passwordCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; - public org.apache.airavata.credential.store.datamodel.SSHCredential getSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; + public org.apache.airavata.model.credential.store.SSHCredential getSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; - public org.apache.airavata.credential.store.datamodel.SSHCredentialSummary getSSHCredentialSummary(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; + public org.apache.airavata.model.credential.store.CredentialSummary getCredentialSummary(org.apache.airavata.model.credential.store.SummaryType type, String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; - public org.apache.airavata.credential.store.datamodel.CertificateCredential getCertificateCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; + public org.apache.airavata.model.credential.store.CertificateCredential getCertificateCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; - public org.apache.airavata.credential.store.datamodel.PasswordCredential getPasswordCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; + public org.apache.airavata.model.credential.store.PasswordCredential getPasswordCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public Map getAllSSHKeysForUser(String username) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public Map getAllSSHKeysForGateway(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; - public List getAllGatewaySSHCredentialSummary(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; + public List getAllCredentialSummaryForGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; - public List getAllSSHCredentialSummaryForUserInGateway(String gatewayId, String userId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; + public List getAllCredentialSummaryForUserInGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public Map getAllPWDCredentialsForGateway(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; @@ -100,15 +100,15 @@ public interface AsyncIface { public void getCSServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void addSSHCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void addSSHCredential(org.apache.airavata.model.credential.store.SSHCredential sshCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void addCertificateCredential(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void addPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void addPasswordCredential(org.apache.airavata.model.credential.store.PasswordCredential passwordCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getSSHCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getSSHCredentialSummary(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getCredentialSummary(org.apache.airavata.model.credential.store.SummaryType type, String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getCertificateCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -118,9 +118,9 @@ public interface AsyncIface { public void getAllSSHKeysForGateway(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getAllGatewaySSHCredentialSummary(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getAllCredentialSummaryForGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getAllSSHCredentialSummaryForUserInGateway(String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getAllCredentialSummaryForUserInGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getAllPWDCredentialsForGateway(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -172,13 +172,13 @@ public String recv_getCSServiceVersion() throws org.apache.thrift.TException throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCSServiceVersion failed: unknown result"); } - public String addSSHCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException + public String addSSHCredential(org.apache.airavata.model.credential.store.SSHCredential sshCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_addSSHCredential(sshCredential); return recv_addSSHCredential(); } - public void send_addSSHCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential) throws org.apache.thrift.TException + public void send_addSSHCredential(org.apache.airavata.model.credential.store.SSHCredential sshCredential) throws org.apache.thrift.TException { addSSHCredential_args args = new addSSHCredential_args(); args.setSshCredential(sshCredential); @@ -198,13 +198,13 @@ public String recv_addSSHCredential() throws org.apache.airavata.credential.stor throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSSHCredential failed: unknown result"); } - public String addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException + public String addCertificateCredential(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_addCertificateCredential(certificateCredential); return recv_addCertificateCredential(); } - public void send_addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) throws org.apache.thrift.TException + public void send_addCertificateCredential(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential) throws org.apache.thrift.TException { addCertificateCredential_args args = new addCertificateCredential_args(); args.setCertificateCredential(certificateCredential); @@ -224,13 +224,13 @@ public String recv_addCertificateCredential() throws org.apache.airavata.credent throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addCertificateCredential failed: unknown result"); } - public String addPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException + public String addPasswordCredential(org.apache.airavata.model.credential.store.PasswordCredential passwordCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_addPasswordCredential(passwordCredential); return recv_addPasswordCredential(); } - public void send_addPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential) throws org.apache.thrift.TException + public void send_addPasswordCredential(org.apache.airavata.model.credential.store.PasswordCredential passwordCredential) throws org.apache.thrift.TException { addPasswordCredential_args args = new addPasswordCredential_args(); args.setPasswordCredential(passwordCredential); @@ -250,7 +250,7 @@ public String recv_addPasswordCredential() throws org.apache.airavata.credential throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addPasswordCredential failed: unknown result"); } - public org.apache.airavata.credential.store.datamodel.SSHCredential getSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException + public org.apache.airavata.model.credential.store.SSHCredential getSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_getSSHCredential(tokenId, gatewayId); return recv_getSSHCredential(); @@ -264,7 +264,7 @@ public void send_getSSHCredential(String tokenId, String gatewayId) throws org.a sendBase("getSSHCredential", args); } - public org.apache.airavata.credential.store.datamodel.SSHCredential recv_getSSHCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException + public org.apache.airavata.model.credential.store.SSHCredential recv_getSSHCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { getSSHCredential_result result = new getSSHCredential_result(); receiveBase(result, "getSSHCredential"); @@ -277,34 +277,35 @@ public org.apache.airavata.credential.store.datamodel.SSHCredential recv_getSSHC throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSSHCredential failed: unknown result"); } - public org.apache.airavata.credential.store.datamodel.SSHCredentialSummary getSSHCredentialSummary(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException + public org.apache.airavata.model.credential.store.CredentialSummary getCredentialSummary(org.apache.airavata.model.credential.store.SummaryType type, String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { - send_getSSHCredentialSummary(tokenId, gatewayId); - return recv_getSSHCredentialSummary(); + send_getCredentialSummary(type, tokenId, gatewayId); + return recv_getCredentialSummary(); } - public void send_getSSHCredentialSummary(String tokenId, String gatewayId) throws org.apache.thrift.TException + public void send_getCredentialSummary(org.apache.airavata.model.credential.store.SummaryType type, String tokenId, String gatewayId) throws org.apache.thrift.TException { - getSSHCredentialSummary_args args = new getSSHCredentialSummary_args(); + getCredentialSummary_args args = new getCredentialSummary_args(); + args.setType(type); args.setTokenId(tokenId); args.setGatewayId(gatewayId); - sendBase("getSSHCredentialSummary", args); + sendBase("getCredentialSummary", args); } - public org.apache.airavata.credential.store.datamodel.SSHCredentialSummary recv_getSSHCredentialSummary() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException + public org.apache.airavata.model.credential.store.CredentialSummary recv_getCredentialSummary() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { - getSSHCredentialSummary_result result = new getSSHCredentialSummary_result(); - receiveBase(result, "getSSHCredentialSummary"); + getCredentialSummary_result result = new getCredentialSummary_result(); + receiveBase(result, "getCredentialSummary"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSSHCredentialSummary failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCredentialSummary failed: unknown result"); } - public org.apache.airavata.credential.store.datamodel.CertificateCredential getCertificateCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException + public org.apache.airavata.model.credential.store.CertificateCredential getCertificateCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_getCertificateCredential(tokenId, gatewayId); return recv_getCertificateCredential(); @@ -318,7 +319,7 @@ public void send_getCertificateCredential(String tokenId, String gatewayId) thro sendBase("getCertificateCredential", args); } - public org.apache.airavata.credential.store.datamodel.CertificateCredential recv_getCertificateCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException + public org.apache.airavata.model.credential.store.CertificateCredential recv_getCertificateCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { getCertificateCredential_result result = new getCertificateCredential_result(); receiveBase(result, "getCertificateCredential"); @@ -331,7 +332,7 @@ public org.apache.airavata.credential.store.datamodel.CertificateCredential recv throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCertificateCredential failed: unknown result"); } - public org.apache.airavata.credential.store.datamodel.PasswordCredential getPasswordCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException + public org.apache.airavata.model.credential.store.PasswordCredential getPasswordCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_getPasswordCredential(tokenId, gatewayId); return recv_getPasswordCredential(); @@ -345,7 +346,7 @@ public void send_getPasswordCredential(String tokenId, String gatewayId) throws sendBase("getPasswordCredential", args); } - public org.apache.airavata.credential.store.datamodel.PasswordCredential recv_getPasswordCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException + public org.apache.airavata.model.credential.store.PasswordCredential recv_getPasswordCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { getPasswordCredential_result result = new getPasswordCredential_result(); receiveBase(result, "getPasswordCredential"); @@ -410,57 +411,59 @@ public Map recv_getAllSSHKeysForGateway() throws org.apache.airav throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllSSHKeysForGateway failed: unknown result"); } - public List getAllGatewaySSHCredentialSummary(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException + public List getAllCredentialSummaryForGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { - send_getAllGatewaySSHCredentialSummary(gatewayId); - return recv_getAllGatewaySSHCredentialSummary(); + send_getAllCredentialSummaryForGateway(type, gatewayId); + return recv_getAllCredentialSummaryForGateway(); } - public void send_getAllGatewaySSHCredentialSummary(String gatewayId) throws org.apache.thrift.TException + public void send_getAllCredentialSummaryForGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId) throws org.apache.thrift.TException { - getAllGatewaySSHCredentialSummary_args args = new getAllGatewaySSHCredentialSummary_args(); + getAllCredentialSummaryForGateway_args args = new getAllCredentialSummaryForGateway_args(); + args.setType(type); args.setGatewayId(gatewayId); - sendBase("getAllGatewaySSHCredentialSummary", args); + sendBase("getAllCredentialSummaryForGateway", args); } - public List recv_getAllGatewaySSHCredentialSummary() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException + public List recv_getAllCredentialSummaryForGateway() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { - getAllGatewaySSHCredentialSummary_result result = new getAllGatewaySSHCredentialSummary_result(); - receiveBase(result, "getAllGatewaySSHCredentialSummary"); + getAllCredentialSummaryForGateway_result result = new getAllCredentialSummaryForGateway_result(); + receiveBase(result, "getAllCredentialSummaryForGateway"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllGatewaySSHCredentialSummary failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllCredentialSummaryForGateway failed: unknown result"); } - public List getAllSSHCredentialSummaryForUserInGateway(String gatewayId, String userId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException + public List getAllCredentialSummaryForUserInGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { - send_getAllSSHCredentialSummaryForUserInGateway(gatewayId, userId); - return recv_getAllSSHCredentialSummaryForUserInGateway(); + send_getAllCredentialSummaryForUserInGateway(type, gatewayId, userId); + return recv_getAllCredentialSummaryForUserInGateway(); } - public void send_getAllSSHCredentialSummaryForUserInGateway(String gatewayId, String userId) throws org.apache.thrift.TException + public void send_getAllCredentialSummaryForUserInGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId) throws org.apache.thrift.TException { - getAllSSHCredentialSummaryForUserInGateway_args args = new getAllSSHCredentialSummaryForUserInGateway_args(); + getAllCredentialSummaryForUserInGateway_args args = new getAllCredentialSummaryForUserInGateway_args(); + args.setType(type); args.setGatewayId(gatewayId); args.setUserId(userId); - sendBase("getAllSSHCredentialSummaryForUserInGateway", args); + sendBase("getAllCredentialSummaryForUserInGateway", args); } - public List recv_getAllSSHCredentialSummaryForUserInGateway() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException + public List recv_getAllCredentialSummaryForUserInGateway() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { - getAllSSHCredentialSummaryForUserInGateway_result result = new getAllSSHCredentialSummaryForUserInGateway_result(); - receiveBase(result, "getAllSSHCredentialSummaryForUserInGateway"); + getAllCredentialSummaryForUserInGateway_result result = new getAllCredentialSummaryForUserInGateway_result(); + receiveBase(result, "getAllCredentialSummaryForUserInGateway"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllSSHCredentialSummaryForUserInGateway failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllCredentialSummaryForUserInGateway failed: unknown result"); } public Map getAllPWDCredentialsForGateway(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException @@ -590,7 +593,7 @@ public String getResult() throws org.apache.thrift.TException { } } - public void addSSHCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void addSSHCredential(org.apache.airavata.model.credential.store.SSHCredential sshCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); addSSHCredential_call method_call = new addSSHCredential_call(sshCredential, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -598,8 +601,8 @@ public void addSSHCredential(org.apache.airavata.credential.store.datamodel.SSHC } public static class addSSHCredential_call extends org.apache.thrift.async.TAsyncMethodCall { - private org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential; - public addSSHCredential_call(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential, 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 { + private org.apache.airavata.model.credential.store.SSHCredential sshCredential; + public addSSHCredential_call(org.apache.airavata.model.credential.store.SSHCredential sshCredential, 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.sshCredential = sshCredential; } @@ -622,7 +625,7 @@ public String getResult() throws org.apache.airavata.credential.store.exception. } } - public void addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void addCertificateCredential(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); addCertificateCredential_call method_call = new addCertificateCredential_call(certificateCredential, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -630,8 +633,8 @@ public void addCertificateCredential(org.apache.airavata.credential.store.datamo } public static class addCertificateCredential_call extends org.apache.thrift.async.TAsyncMethodCall { - private org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential; - public addCertificateCredential_call(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential, 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 { + private org.apache.airavata.model.credential.store.CertificateCredential certificateCredential; + public addCertificateCredential_call(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential, 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.certificateCredential = certificateCredential; } @@ -654,7 +657,7 @@ public String getResult() throws org.apache.airavata.credential.store.exception. } } - public void addPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void addPasswordCredential(org.apache.airavata.model.credential.store.PasswordCredential passwordCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); addPasswordCredential_call method_call = new addPasswordCredential_call(passwordCredential, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -662,8 +665,8 @@ public void addPasswordCredential(org.apache.airavata.credential.store.datamodel } public static class addPasswordCredential_call extends org.apache.thrift.async.TAsyncMethodCall { - private org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential; - public addPasswordCredential_call(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential, 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 { + private org.apache.airavata.model.credential.store.PasswordCredential passwordCredential; + public addPasswordCredential_call(org.apache.airavata.model.credential.store.PasswordCredential passwordCredential, 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.passwordCredential = passwordCredential; } @@ -711,7 +714,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public org.apache.airavata.credential.store.datamodel.SSHCredential getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { + public org.apache.airavata.model.credential.store.SSHCredential getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -721,38 +724,41 @@ public org.apache.airavata.credential.store.datamodel.SSHCredential getResult() } } - public void getSSHCredentialSummary(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getCredentialSummary(org.apache.airavata.model.credential.store.SummaryType type, String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getSSHCredentialSummary_call method_call = new getSSHCredentialSummary_call(tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport); + getCredentialSummary_call method_call = new getCredentialSummary_call(type, tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getSSHCredentialSummary_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class getCredentialSummary_call extends org.apache.thrift.async.TAsyncMethodCall { + private org.apache.airavata.model.credential.store.SummaryType type; private String tokenId; private String gatewayId; - public getSSHCredentialSummary_call(String tokenId, 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 getCredentialSummary_call(org.apache.airavata.model.credential.store.SummaryType type, String tokenId, 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.type = type; this.tokenId = tokenId; 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("getSSHCredentialSummary", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getSSHCredentialSummary_args args = new getSSHCredentialSummary_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCredentialSummary", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getCredentialSummary_args args = new getCredentialSummary_args(); + args.setType(type); args.setTokenId(tokenId); args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } - public org.apache.airavata.credential.store.datamodel.SSHCredentialSummary getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { + public org.apache.airavata.model.credential.store.CredentialSummary getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_getSSHCredentialSummary(); + return (new Client(prot)).recv_getCredentialSummary(); } } @@ -781,7 +787,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public org.apache.airavata.credential.store.datamodel.CertificateCredential getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { + public org.apache.airavata.model.credential.store.CertificateCredential getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -816,7 +822,7 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public org.apache.airavata.credential.store.datamodel.PasswordCredential getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { + public org.apache.airavata.model.credential.store.PasswordCredential getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -890,70 +896,76 @@ public Map getResult() throws org.apache.airavata.credential.stor } } - public void getAllGatewaySSHCredentialSummary(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getAllCredentialSummaryForGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getAllGatewaySSHCredentialSummary_call method_call = new getAllGatewaySSHCredentialSummary_call(gatewayId, resultHandler, this, ___protocolFactory, ___transport); + getAllCredentialSummaryForGateway_call method_call = new getAllCredentialSummaryForGateway_call(type, gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getAllGatewaySSHCredentialSummary_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class getAllCredentialSummaryForGateway_call extends org.apache.thrift.async.TAsyncMethodCall { + private org.apache.airavata.model.credential.store.SummaryType type; private String gatewayId; - public getAllGatewaySSHCredentialSummary_call(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 getAllCredentialSummaryForGateway_call(org.apache.airavata.model.credential.store.SummaryType type, 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.type = type; 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("getAllGatewaySSHCredentialSummary", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getAllGatewaySSHCredentialSummary_args args = new getAllGatewaySSHCredentialSummary_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllCredentialSummaryForGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getAllCredentialSummaryForGateway_args args = new getAllCredentialSummaryForGateway_args(); + args.setType(type); args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } - public List getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { + public List getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_getAllGatewaySSHCredentialSummary(); + return (new Client(prot)).recv_getAllCredentialSummaryForGateway(); } } - public void getAllSSHCredentialSummaryForUserInGateway(String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getAllCredentialSummaryForUserInGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getAllSSHCredentialSummaryForUserInGateway_call method_call = new getAllSSHCredentialSummaryForUserInGateway_call(gatewayId, userId, resultHandler, this, ___protocolFactory, ___transport); + getAllCredentialSummaryForUserInGateway_call method_call = new getAllCredentialSummaryForUserInGateway_call(type, gatewayId, userId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getAllSSHCredentialSummaryForUserInGateway_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class getAllCredentialSummaryForUserInGateway_call extends org.apache.thrift.async.TAsyncMethodCall { + private org.apache.airavata.model.credential.store.SummaryType type; private String gatewayId; private String userId; - public getAllSSHCredentialSummaryForUserInGateway_call(String gatewayId, 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 { + public getAllCredentialSummaryForUserInGateway_call(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, 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.type = type; this.gatewayId = gatewayId; 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("getAllSSHCredentialSummaryForUserInGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getAllSSHCredentialSummaryForUserInGateway_args args = new getAllSSHCredentialSummaryForUserInGateway_args(); + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllCredentialSummaryForUserInGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getAllCredentialSummaryForUserInGateway_args args = new getAllCredentialSummaryForUserInGateway_args(); + args.setType(type); args.setGatewayId(gatewayId); args.setUserId(userId); args.write(prot); prot.writeMessageEnd(); } - public List getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { + public List getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, 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_getAllSSHCredentialSummaryForUserInGateway(); + return (new Client(prot)).recv_getAllCredentialSummaryForUserInGateway(); } } @@ -1077,13 +1089,13 @@ protected Processor(I iface, Map extends org.apache.thrift.ProcessFunction { - public getSSHCredentialSummary() { - super("getSSHCredentialSummary"); + public static class getCredentialSummary extends org.apache.thrift.ProcessFunction { + public getCredentialSummary() { + super("getCredentialSummary"); } - public getSSHCredentialSummary_args getEmptyArgsInstance() { - return new getSSHCredentialSummary_args(); + public getCredentialSummary_args getEmptyArgsInstance() { + return new getCredentialSummary_args(); } protected boolean isOneway() { return false; } - public getSSHCredentialSummary_result getResult(I iface, getSSHCredentialSummary_args args) throws org.apache.thrift.TException { - getSSHCredentialSummary_result result = new getSSHCredentialSummary_result(); + public getCredentialSummary_result getResult(I iface, getCredentialSummary_args args) throws org.apache.thrift.TException { + getCredentialSummary_result result = new getCredentialSummary_result(); try { - result.success = iface.getSSHCredentialSummary(args.tokenId, args.gatewayId); + result.success = iface.getCredentialSummary(args.type, args.tokenId, args.gatewayId); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } @@ -1326,23 +1338,23 @@ public getAllSSHKeysForGateway_result getResult(I iface, getAllSSHKeysForGateway } } - public static class getAllGatewaySSHCredentialSummary extends org.apache.thrift.ProcessFunction { - public getAllGatewaySSHCredentialSummary() { - super("getAllGatewaySSHCredentialSummary"); + public static class getAllCredentialSummaryForGateway extends org.apache.thrift.ProcessFunction { + public getAllCredentialSummaryForGateway() { + super("getAllCredentialSummaryForGateway"); } - public getAllGatewaySSHCredentialSummary_args getEmptyArgsInstance() { - return new getAllGatewaySSHCredentialSummary_args(); + public getAllCredentialSummaryForGateway_args getEmptyArgsInstance() { + return new getAllCredentialSummaryForGateway_args(); } protected boolean isOneway() { return false; } - public getAllGatewaySSHCredentialSummary_result getResult(I iface, getAllGatewaySSHCredentialSummary_args args) throws org.apache.thrift.TException { - getAllGatewaySSHCredentialSummary_result result = new getAllGatewaySSHCredentialSummary_result(); + public getAllCredentialSummaryForGateway_result getResult(I iface, getAllCredentialSummaryForGateway_args args) throws org.apache.thrift.TException { + getAllCredentialSummaryForGateway_result result = new getAllCredentialSummaryForGateway_result(); try { - result.success = iface.getAllGatewaySSHCredentialSummary(args.gatewayId); + result.success = iface.getAllCredentialSummaryForGateway(args.type, args.gatewayId); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } @@ -1350,23 +1362,23 @@ public getAllGatewaySSHCredentialSummary_result getResult(I iface, getAllGateway } } - public static class getAllSSHCredentialSummaryForUserInGateway extends org.apache.thrift.ProcessFunction { - public getAllSSHCredentialSummaryForUserInGateway() { - super("getAllSSHCredentialSummaryForUserInGateway"); + public static class getAllCredentialSummaryForUserInGateway extends org.apache.thrift.ProcessFunction { + public getAllCredentialSummaryForUserInGateway() { + super("getAllCredentialSummaryForUserInGateway"); } - public getAllSSHCredentialSummaryForUserInGateway_args getEmptyArgsInstance() { - return new getAllSSHCredentialSummaryForUserInGateway_args(); + public getAllCredentialSummaryForUserInGateway_args getEmptyArgsInstance() { + return new getAllCredentialSummaryForUserInGateway_args(); } protected boolean isOneway() { return false; } - public getAllSSHCredentialSummaryForUserInGateway_result getResult(I iface, getAllSSHCredentialSummaryForUserInGateway_args args) throws org.apache.thrift.TException { - getAllSSHCredentialSummaryForUserInGateway_result result = new getAllSSHCredentialSummaryForUserInGateway_result(); + public getAllCredentialSummaryForUserInGateway_result getResult(I iface, getAllCredentialSummaryForUserInGateway_args args) throws org.apache.thrift.TException { + getAllCredentialSummaryForUserInGateway_result result = new getAllCredentialSummaryForUserInGateway_result(); try { - result.success = iface.getAllSSHCredentialSummaryForUserInGateway(args.gatewayId, args.userId); + result.success = iface.getAllCredentialSummaryForUserInGateway(args.type, args.gatewayId, args.userId); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } @@ -1466,13 +1478,13 @@ protected AsyncProcessor(I iface, Map extends org.apache.thrift.AsyncProcessFunction { + public static class getSSHCredential extends org.apache.thrift.AsyncProcessFunction { public getSSHCredential() { super("getSSHCredential"); } @@ -1710,10 +1722,10 @@ public getSSHCredential_args getEmptyArgsInstance() { return new getSSHCredential_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(org.apache.airavata.credential.store.datamodel.SSHCredential o) { + return new AsyncMethodCallback() { + public void onComplete(org.apache.airavata.model.credential.store.SSHCredential o) { getSSHCredential_result result = new getSSHCredential_result(); result.success = o; try { @@ -1753,25 +1765,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getSSHCredential_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + public void start(I iface, getSSHCredential_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.getSSHCredential(args.tokenId, args.gatewayId,resultHandler); } } - public static class getSSHCredentialSummary extends org.apache.thrift.AsyncProcessFunction { - public getSSHCredentialSummary() { - super("getSSHCredentialSummary"); + public static class getCredentialSummary extends org.apache.thrift.AsyncProcessFunction { + public getCredentialSummary() { + super("getCredentialSummary"); } - public getSSHCredentialSummary_args getEmptyArgsInstance() { - return new getSSHCredentialSummary_args(); + public getCredentialSummary_args getEmptyArgsInstance() { + return new getCredentialSummary_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary o) { - getSSHCredentialSummary_result result = new getSSHCredentialSummary_result(); + return new AsyncMethodCallback() { + public void onComplete(org.apache.airavata.model.credential.store.CredentialSummary o) { + getCredentialSummary_result result = new getCredentialSummary_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); @@ -1784,7 +1796,7 @@ public void onComplete(org.apache.airavata.credential.store.datamodel.SSHCredent public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; - getSSHCredentialSummary_result result = new getSSHCredentialSummary_result(); + getCredentialSummary_result result = new getCredentialSummary_result(); if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) { result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e; result.setCsExceptionIsSet(true); @@ -1810,12 +1822,12 @@ protected boolean isOneway() { return false; } - public void start(I iface, getSSHCredentialSummary_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getSSHCredentialSummary(args.tokenId, args.gatewayId,resultHandler); + public void start(I iface, getCredentialSummary_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getCredentialSummary(args.type, args.tokenId, args.gatewayId,resultHandler); } } - public static class getCertificateCredential extends org.apache.thrift.AsyncProcessFunction { + public static class getCertificateCredential extends org.apache.thrift.AsyncProcessFunction { public getCertificateCredential() { super("getCertificateCredential"); } @@ -1824,10 +1836,10 @@ public getCertificateCredential_args getEmptyArgsInstance() { return new getCertificateCredential_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(org.apache.airavata.credential.store.datamodel.CertificateCredential o) { + return new AsyncMethodCallback() { + public void onComplete(org.apache.airavata.model.credential.store.CertificateCredential o) { getCertificateCredential_result result = new getCertificateCredential_result(); result.success = o; try { @@ -1867,12 +1879,12 @@ protected boolean isOneway() { return false; } - public void start(I iface, getCertificateCredential_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + public void start(I iface, getCertificateCredential_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.getCertificateCredential(args.tokenId, args.gatewayId,resultHandler); } } - public static class getPasswordCredential extends org.apache.thrift.AsyncProcessFunction { + public static class getPasswordCredential extends org.apache.thrift.AsyncProcessFunction { public getPasswordCredential() { super("getPasswordCredential"); } @@ -1881,10 +1893,10 @@ public getPasswordCredential_args getEmptyArgsInstance() { return new getPasswordCredential_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(org.apache.airavata.credential.store.datamodel.PasswordCredential o) { + return new AsyncMethodCallback() { + public void onComplete(org.apache.airavata.model.credential.store.PasswordCredential o) { getPasswordCredential_result result = new getPasswordCredential_result(); result.success = o; try { @@ -1924,7 +1936,7 @@ protected boolean isOneway() { return false; } - public void start(I iface, getPasswordCredential_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + public void start(I iface, getPasswordCredential_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.getPasswordCredential(args.tokenId, args.gatewayId,resultHandler); } } @@ -2043,20 +2055,20 @@ public void start(I iface, getAllSSHKeysForGateway_args args, org.apache.thrift. } } - public static class getAllGatewaySSHCredentialSummary extends org.apache.thrift.AsyncProcessFunction> { - public getAllGatewaySSHCredentialSummary() { - super("getAllGatewaySSHCredentialSummary"); + public static class getAllCredentialSummaryForGateway extends org.apache.thrift.AsyncProcessFunction> { + public getAllCredentialSummaryForGateway() { + super("getAllCredentialSummaryForGateway"); } - public getAllGatewaySSHCredentialSummary_args getEmptyArgsInstance() { - return new getAllGatewaySSHCredentialSummary_args(); + public getAllCredentialSummaryForGateway_args getEmptyArgsInstance() { + return new getAllCredentialSummaryForGateway_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - getAllGatewaySSHCredentialSummary_result result = new getAllGatewaySSHCredentialSummary_result(); + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getAllCredentialSummaryForGateway_result result = new getAllCredentialSummaryForGateway_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); @@ -2069,7 +2081,7 @@ public void onComplete(List> resultHandler) throws TException { - iface.getAllGatewaySSHCredentialSummary(args.gatewayId,resultHandler); + public void start(I iface, getAllCredentialSummaryForGateway_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getAllCredentialSummaryForGateway(args.type, args.gatewayId,resultHandler); } } - public static class getAllSSHCredentialSummaryForUserInGateway extends org.apache.thrift.AsyncProcessFunction> { - public getAllSSHCredentialSummaryForUserInGateway() { - super("getAllSSHCredentialSummaryForUserInGateway"); + public static class getAllCredentialSummaryForUserInGateway extends org.apache.thrift.AsyncProcessFunction> { + public getAllCredentialSummaryForUserInGateway() { + super("getAllCredentialSummaryForUserInGateway"); } - public getAllSSHCredentialSummaryForUserInGateway_args getEmptyArgsInstance() { - return new getAllSSHCredentialSummaryForUserInGateway_args(); + public getAllCredentialSummaryForUserInGateway_args getEmptyArgsInstance() { + return new getAllCredentialSummaryForUserInGateway_args(); } - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - getAllSSHCredentialSummaryForUserInGateway_result result = new getAllSSHCredentialSummaryForUserInGateway_result(); + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getAllCredentialSummaryForUserInGateway_result result = new getAllCredentialSummaryForUserInGateway_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); @@ -2126,7 +2138,7 @@ public void onComplete(List> resultHandler) throws TException { - iface.getAllSSHCredentialSummaryForUserInGateway(args.gatewayId, args.userId,resultHandler); + public void start(I iface, getAllCredentialSummaryForUserInGateway_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getAllCredentialSummaryForUserInGateway(args.type, args.gatewayId, args.userId,resultHandler); } } @@ -2952,7 +2964,7 @@ public static class addSSHCredential_args implements org.apache.thrift.TBase tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SSH_CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("sshCredential", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.SSHCredential.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.SSHCredential.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSSHCredential_args.class, metaDataMap); } @@ -3026,7 +3038,7 @@ public addSSHCredential_args() { } public addSSHCredential_args( - org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential) + org.apache.airavata.model.credential.store.SSHCredential sshCredential) { this(); this.sshCredential = sshCredential; @@ -3037,7 +3049,7 @@ public addSSHCredential_args( */ public addSSHCredential_args(addSSHCredential_args other) { if (other.isSetSshCredential()) { - this.sshCredential = new org.apache.airavata.credential.store.datamodel.SSHCredential(other.sshCredential); + this.sshCredential = new org.apache.airavata.model.credential.store.SSHCredential(other.sshCredential); } } @@ -3050,11 +3062,11 @@ public void clear() { this.sshCredential = null; } - public org.apache.airavata.credential.store.datamodel.SSHCredential getSshCredential() { + public org.apache.airavata.model.credential.store.SSHCredential getSshCredential() { return this.sshCredential; } - public addSSHCredential_args setSshCredential(org.apache.airavata.credential.store.datamodel.SSHCredential sshCredential) { + public addSSHCredential_args setSshCredential(org.apache.airavata.model.credential.store.SSHCredential sshCredential) { this.sshCredential = sshCredential; return this; } @@ -3080,7 +3092,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSshCredential(); } else { - setSshCredential((org.apache.airavata.credential.store.datamodel.SSHCredential)value); + setSshCredential((org.apache.airavata.model.credential.store.SSHCredential)value); } break; @@ -3242,7 +3254,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, addSSHCredential_ar switch (schemeField.id) { case 1: // SSH_CREDENTIAL if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.sshCredential = new org.apache.airavata.credential.store.datamodel.SSHCredential(); + struct.sshCredential = new org.apache.airavata.model.credential.store.SSHCredential(); struct.sshCredential.read(iprot); struct.setSshCredentialIsSet(true); } else { @@ -3292,7 +3304,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, addSSHCredential_ar @Override public void read(org.apache.thrift.protocol.TProtocol prot, addSSHCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.sshCredential = new org.apache.airavata.credential.store.datamodel.SSHCredential(); + struct.sshCredential = new org.apache.airavata.model.credential.store.SSHCredential(); struct.sshCredential.read(iprot); struct.setSshCredentialIsSet(true); } @@ -3779,7 +3791,7 @@ public static class addCertificateCredential_args implements org.apache.thrift.T schemes.put(TupleScheme.class, new addCertificateCredential_argsTupleSchemeFactory()); } - public org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential; // required + public org.apache.airavata.model.credential.store.CertificateCredential certificateCredential; // 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 { @@ -3844,7 +3856,7 @@ public String getFieldName() { static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.CERTIFICATE_CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("certificateCredential", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.CertificateCredential.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.CertificateCredential.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCertificateCredential_args.class, metaDataMap); } @@ -3853,7 +3865,7 @@ public addCertificateCredential_args() { } public addCertificateCredential_args( - org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) + org.apache.airavata.model.credential.store.CertificateCredential certificateCredential) { this(); this.certificateCredential = certificateCredential; @@ -3864,7 +3876,7 @@ public addCertificateCredential_args( */ public addCertificateCredential_args(addCertificateCredential_args other) { if (other.isSetCertificateCredential()) { - this.certificateCredential = new org.apache.airavata.credential.store.datamodel.CertificateCredential(other.certificateCredential); + this.certificateCredential = new org.apache.airavata.model.credential.store.CertificateCredential(other.certificateCredential); } } @@ -3877,11 +3889,11 @@ public void clear() { this.certificateCredential = null; } - public org.apache.airavata.credential.store.datamodel.CertificateCredential getCertificateCredential() { + public org.apache.airavata.model.credential.store.CertificateCredential getCertificateCredential() { return this.certificateCredential; } - public addCertificateCredential_args setCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) { + public addCertificateCredential_args setCertificateCredential(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential) { this.certificateCredential = certificateCredential; return this; } @@ -3907,7 +3919,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetCertificateCredential(); } else { - setCertificateCredential((org.apache.airavata.credential.store.datamodel.CertificateCredential)value); + setCertificateCredential((org.apache.airavata.model.credential.store.CertificateCredential)value); } break; @@ -4069,7 +4081,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, addCertificateCrede switch (schemeField.id) { case 1: // CERTIFICATE_CREDENTIAL if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.certificateCredential = new org.apache.airavata.credential.store.datamodel.CertificateCredential(); + struct.certificateCredential = new org.apache.airavata.model.credential.store.CertificateCredential(); struct.certificateCredential.read(iprot); struct.setCertificateCredentialIsSet(true); } else { @@ -4119,7 +4131,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, addCertificateCrede @Override public void read(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.certificateCredential = new org.apache.airavata.credential.store.datamodel.CertificateCredential(); + struct.certificateCredential = new org.apache.airavata.model.credential.store.CertificateCredential(); struct.certificateCredential.read(iprot); struct.setCertificateCredentialIsSet(true); } @@ -4606,7 +4618,7 @@ public static class addPasswordCredential_args implements org.apache.thrift.TBas schemes.put(TupleScheme.class, new addPasswordCredential_argsTupleSchemeFactory()); } - public org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential; // required + public org.apache.airavata.model.credential.store.PasswordCredential passwordCredential; // 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 { @@ -4671,7 +4683,7 @@ public String getFieldName() { static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PASSWORD_CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("passwordCredential", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.PasswordCredential.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.PasswordCredential.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addPasswordCredential_args.class, metaDataMap); } @@ -4680,7 +4692,7 @@ public addPasswordCredential_args() { } public addPasswordCredential_args( - org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential) + org.apache.airavata.model.credential.store.PasswordCredential passwordCredential) { this(); this.passwordCredential = passwordCredential; @@ -4691,7 +4703,7 @@ public addPasswordCredential_args( */ public addPasswordCredential_args(addPasswordCredential_args other) { if (other.isSetPasswordCredential()) { - this.passwordCredential = new org.apache.airavata.credential.store.datamodel.PasswordCredential(other.passwordCredential); + this.passwordCredential = new org.apache.airavata.model.credential.store.PasswordCredential(other.passwordCredential); } } @@ -4704,11 +4716,11 @@ public void clear() { this.passwordCredential = null; } - public org.apache.airavata.credential.store.datamodel.PasswordCredential getPasswordCredential() { + public org.apache.airavata.model.credential.store.PasswordCredential getPasswordCredential() { return this.passwordCredential; } - public addPasswordCredential_args setPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential) { + public addPasswordCredential_args setPasswordCredential(org.apache.airavata.model.credential.store.PasswordCredential passwordCredential) { this.passwordCredential = passwordCredential; return this; } @@ -4734,7 +4746,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetPasswordCredential(); } else { - setPasswordCredential((org.apache.airavata.credential.store.datamodel.PasswordCredential)value); + setPasswordCredential((org.apache.airavata.model.credential.store.PasswordCredential)value); } break; @@ -4896,7 +4908,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, addPasswordCredenti switch (schemeField.id) { case 1: // PASSWORD_CREDENTIAL if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.passwordCredential = new org.apache.airavata.credential.store.datamodel.PasswordCredential(); + struct.passwordCredential = new org.apache.airavata.model.credential.store.PasswordCredential(); struct.passwordCredential.read(iprot); struct.setPasswordCredentialIsSet(true); } else { @@ -4946,7 +4958,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, addPasswordCredenti @Override public void read(org.apache.thrift.protocol.TProtocol prot, addPasswordCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.passwordCredential = new org.apache.airavata.credential.store.datamodel.PasswordCredential(); + struct.passwordCredential = new org.apache.airavata.model.credential.store.PasswordCredential(); struct.passwordCredential.read(iprot); struct.setPasswordCredentialIsSet(true); } @@ -5889,7 +5901,7 @@ public static class getSSHCredential_result implements org.apache.thrift.TBase 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.credential.store.datamodel.SSHCredential.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.SSHCredential.class))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); @@ -5969,7 +5981,7 @@ public getSSHCredential_result() { } public getSSHCredential_result( - org.apache.airavata.credential.store.datamodel.SSHCredential success, + org.apache.airavata.model.credential.store.SSHCredential success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); @@ -5982,7 +5994,7 @@ public getSSHCredential_result( */ public getSSHCredential_result(getSSHCredential_result other) { if (other.isSetSuccess()) { - this.success = new org.apache.airavata.credential.store.datamodel.SSHCredential(other.success); + this.success = new org.apache.airavata.model.credential.store.SSHCredential(other.success); } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); @@ -5999,11 +6011,11 @@ public void clear() { this.csException = null; } - public org.apache.airavata.credential.store.datamodel.SSHCredential getSuccess() { + public org.apache.airavata.model.credential.store.SSHCredential getSuccess() { return this.success; } - public getSSHCredential_result setSuccess(org.apache.airavata.credential.store.datamodel.SSHCredential success) { + public getSSHCredential_result setSuccess(org.apache.airavata.model.credential.store.SSHCredential success) { this.success = success; return this; } @@ -6053,7 +6065,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((org.apache.airavata.credential.store.datamodel.SSHCredential)value); + setSuccess((org.apache.airavata.model.credential.store.SSHCredential)value); } break; @@ -6257,7 +6269,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getSSHCredential_re switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.airavata.credential.store.datamodel.SSHCredential(); + struct.success = new org.apache.airavata.model.credential.store.SSHCredential(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -6336,7 +6348,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, getSSHCredential_res TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = new org.apache.airavata.credential.store.datamodel.SSHCredential(); + struct.success = new org.apache.airavata.model.credential.store.SSHCredential(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -6350,25 +6362,36 @@ public void read(org.apache.thrift.protocol.TProtocol prot, getSSHCredential_res } - public static class getSSHCredentialSummary_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSSHCredentialSummary_args"); + public static class getCredentialSummary_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCredentialSummary_args"); - private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)1); - 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)2); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", 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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getSSHCredentialSummary_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getSSHCredentialSummary_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getCredentialSummary_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getCredentialSummary_argsTupleSchemeFactory()); } + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + public org.apache.airavata.model.credential.store.SummaryType type; // required public String tokenId; // 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 { - TOKEN_ID((short)1, "tokenId"), - GATEWAY_ID((short)2, "gatewayId"); + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + TYPE((short)1, "type"), + TOKEN_ID((short)2, "tokenId"), + GATEWAY_ID((short)3, "gatewayId"); private static final Map byName = new HashMap(); @@ -6383,9 +6406,11 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TOKEN_ID + case 1: // TYPE + return TYPE; + case 2: // TOKEN_ID return TOKEN_ID; - case 2: // GATEWAY_ID + case 3: // GATEWAY_ID return GATEWAY_ID; default: return null; @@ -6430,22 +6455,26 @@ public String getFieldName() { 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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.credential.store.SummaryType.class))); tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", 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(getSSHCredentialSummary_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCredentialSummary_args.class, metaDataMap); } - public getSSHCredentialSummary_args() { + public getCredentialSummary_args() { } - public getSSHCredentialSummary_args( + public getCredentialSummary_args( + org.apache.airavata.model.credential.store.SummaryType type, String tokenId, String gatewayId) { this(); + this.type = type; this.tokenId = tokenId; this.gatewayId = gatewayId; } @@ -6453,7 +6482,10 @@ public getSSHCredentialSummary_args( /** * Performs a deep copy on other. */ - public getSSHCredentialSummary_args(getSSHCredentialSummary_args other) { + public getCredentialSummary_args(getCredentialSummary_args other) { + if (other.isSetType()) { + this.type = other.type; + } if (other.isSetTokenId()) { this.tokenId = other.tokenId; } @@ -6462,21 +6494,54 @@ public getSSHCredentialSummary_args(getSSHCredentialSummary_args other) { } } - public getSSHCredentialSummary_args deepCopy() { - return new getSSHCredentialSummary_args(this); + public getCredentialSummary_args deepCopy() { + return new getCredentialSummary_args(this); } @Override public void clear() { + this.type = null; this.tokenId = null; this.gatewayId = null; } + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + public org.apache.airavata.model.credential.store.SummaryType getType() { + return this.type; + } + + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + public getCredentialSummary_args setType(org.apache.airavata.model.credential.store.SummaryType type) { + this.type = type; + return this; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + public String getTokenId() { return this.tokenId; } - public getSSHCredentialSummary_args setTokenId(String tokenId) { + public getCredentialSummary_args setTokenId(String tokenId) { this.tokenId = tokenId; return this; } @@ -6500,7 +6565,7 @@ public String getGatewayId() { return this.gatewayId; } - public getSSHCredentialSummary_args setGatewayId(String gatewayId) { + public getCredentialSummary_args setGatewayId(String gatewayId) { this.gatewayId = gatewayId; return this; } @@ -6522,6 +6587,14 @@ public void setGatewayIdIsSet(boolean value) { public void setFieldValue(_Fields field, Object value) { switch (field) { + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((org.apache.airavata.model.credential.store.SummaryType)value); + } + break; + case TOKEN_ID: if (value == null) { unsetTokenId(); @@ -6543,6 +6616,9 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { + case TYPE: + return getType(); + case TOKEN_ID: return getTokenId(); @@ -6560,6 +6636,8 @@ public boolean isSet(_Fields field) { } switch (field) { + case TYPE: + return isSetType(); case TOKEN_ID: return isSetTokenId(); case GATEWAY_ID: @@ -6572,15 +6650,24 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getSSHCredentialSummary_args) - return this.equals((getSSHCredentialSummary_args)that); + if (that instanceof getCredentialSummary_args) + return this.equals((getCredentialSummary_args)that); return false; } - public boolean equals(getSSHCredentialSummary_args that) { + public boolean equals(getCredentialSummary_args that) { if (that == null) return false; + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + boolean this_present_tokenId = true && this.isSetTokenId(); boolean that_present_tokenId = true && that.isSetTokenId(); if (this_present_tokenId || that_present_tokenId) { @@ -6606,6 +6693,11 @@ public boolean equals(getSSHCredentialSummary_args that) { public int hashCode() { List list = new ArrayList(); + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type.getValue()); + boolean present_tokenId = true && (isSetTokenId()); list.add(present_tokenId); if (present_tokenId) @@ -6620,13 +6712,23 @@ public int hashCode() { } @Override - public int compareTo(getSSHCredentialSummary_args other) { + public int compareTo(getCredentialSummary_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetTokenId()).compareTo(other.isSetTokenId()); if (lastComparison != 0) { return lastComparison; @@ -6664,9 +6766,17 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getSSHCredentialSummary_args("); + StringBuilder sb = new StringBuilder("getCredentialSummary_args("); boolean first = true; + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (!first) sb.append(", "); sb.append("tokenId:"); if (this.tokenId == null) { sb.append("null"); @@ -6688,6 +6798,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields + if (type == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString()); + } if (tokenId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' was not present! Struct: " + toString()); } @@ -6713,15 +6826,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getSSHCredentialSummary_argsStandardSchemeFactory implements SchemeFactory { - public getSSHCredentialSummary_argsStandardScheme getScheme() { - return new getSSHCredentialSummary_argsStandardScheme(); + private static class getCredentialSummary_argsStandardSchemeFactory implements SchemeFactory { + public getCredentialSummary_argsStandardScheme getScheme() { + return new getCredentialSummary_argsStandardScheme(); } } - private static class getSSHCredentialSummary_argsStandardScheme extends StandardScheme { + private static class getCredentialSummary_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getSSHCredentialSummary_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getCredentialSummary_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -6731,7 +6844,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getSSHCredentialSum break; } switch (schemeField.id) { - case 1: // TOKEN_ID + case 1: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TOKEN_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tokenId = iprot.readString(); struct.setTokenIdIsSet(true); @@ -6739,7 +6860,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getSSHCredentialSum org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // GATEWAY_ID + case 3: // GATEWAY_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); @@ -6758,10 +6879,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getSSHCredentialSum struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getSSHCredentialSummary_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getCredentialSummary_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } if (struct.tokenId != null) { oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC); oprot.writeString(struct.tokenId); @@ -6778,24 +6904,27 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getSSHCredentialSu } - private static class getSSHCredentialSummary_argsTupleSchemeFactory implements SchemeFactory { - public getSSHCredentialSummary_argsTupleScheme getScheme() { - return new getSSHCredentialSummary_argsTupleScheme(); + private static class getCredentialSummary_argsTupleSchemeFactory implements SchemeFactory { + public getCredentialSummary_argsTupleScheme getScheme() { + return new getCredentialSummary_argsTupleScheme(); } } - private static class getSSHCredentialSummary_argsTupleScheme extends TupleScheme { + private static class getCredentialSummary_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getSSHCredentialSummary_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getCredentialSummary_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI32(struct.type.getValue()); oprot.writeString(struct.tokenId); oprot.writeString(struct.gatewayId); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getSSHCredentialSummary_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getCredentialSummary_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; + struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); struct.tokenId = iprot.readString(); struct.setTokenIdIsSet(true); struct.gatewayId = iprot.readString(); @@ -6805,19 +6934,19 @@ public void read(org.apache.thrift.protocol.TProtocol prot, getSSHCredentialSumm } - public static class getSSHCredentialSummary_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSSHCredentialSummary_result"); + public static class getCredentialSummary_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCredentialSummary_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 CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getSSHCredentialSummary_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getSSHCredentialSummary_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getCredentialSummary_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getCredentialSummary_resultTupleSchemeFactory()); } - public org.apache.airavata.credential.store.datamodel.SSHCredentialSummary success; // required + public org.apache.airavata.model.credential.store.CredentialSummary success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -6886,18 +7015,18 @@ public String getFieldName() { 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.credential.store.datamodel.SSHCredentialSummary.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.CredentialSummary.class))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", 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(getSSHCredentialSummary_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCredentialSummary_result.class, metaDataMap); } - public getSSHCredentialSummary_result() { + public getCredentialSummary_result() { } - public getSSHCredentialSummary_result( - org.apache.airavata.credential.store.datamodel.SSHCredentialSummary success, + public getCredentialSummary_result( + org.apache.airavata.model.credential.store.CredentialSummary success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); @@ -6908,17 +7037,17 @@ public getSSHCredentialSummary_result( /** * Performs a deep copy on other. */ - public getSSHCredentialSummary_result(getSSHCredentialSummary_result other) { + public getCredentialSummary_result(getCredentialSummary_result other) { if (other.isSetSuccess()) { - this.success = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary(other.success); + this.success = new org.apache.airavata.model.credential.store.CredentialSummary(other.success); } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); } } - public getSSHCredentialSummary_result deepCopy() { - return new getSSHCredentialSummary_result(this); + public getCredentialSummary_result deepCopy() { + return new getCredentialSummary_result(this); } @Override @@ -6927,11 +7056,11 @@ public void clear() { this.csException = null; } - public org.apache.airavata.credential.store.datamodel.SSHCredentialSummary getSuccess() { + public org.apache.airavata.model.credential.store.CredentialSummary getSuccess() { return this.success; } - public getSSHCredentialSummary_result setSuccess(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary success) { + public getCredentialSummary_result setSuccess(org.apache.airavata.model.credential.store.CredentialSummary success) { this.success = success; return this; } @@ -6955,7 +7084,7 @@ public org.apache.airavata.credential.store.exception.CredentialStoreException g return this.csException; } - public getSSHCredentialSummary_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { + public getCredentialSummary_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } @@ -6981,7 +7110,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((org.apache.airavata.credential.store.datamodel.SSHCredentialSummary)value); + setSuccess((org.apache.airavata.model.credential.store.CredentialSummary)value); } break; @@ -7027,12 +7156,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getSSHCredentialSummary_result) - return this.equals((getSSHCredentialSummary_result)that); + if (that instanceof getCredentialSummary_result) + return this.equals((getCredentialSummary_result)that); return false; } - public boolean equals(getSSHCredentialSummary_result that) { + public boolean equals(getCredentialSummary_result that) { if (that == null) return false; @@ -7075,7 +7204,7 @@ public int hashCode() { } @Override - public int compareTo(getSSHCredentialSummary_result other) { + public int compareTo(getCredentialSummary_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -7119,7 +7248,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getSSHCredentialSummary_result("); + StringBuilder sb = new StringBuilder("getCredentialSummary_result("); boolean first = true; sb.append("success:"); @@ -7165,15 +7294,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getSSHCredentialSummary_resultStandardSchemeFactory implements SchemeFactory { - public getSSHCredentialSummary_resultStandardScheme getScheme() { - return new getSSHCredentialSummary_resultStandardScheme(); + private static class getCredentialSummary_resultStandardSchemeFactory implements SchemeFactory { + public getCredentialSummary_resultStandardScheme getScheme() { + return new getCredentialSummary_resultStandardScheme(); } } - private static class getSSHCredentialSummary_resultStandardScheme extends StandardScheme { + private static class getCredentialSummary_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getSSHCredentialSummary_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getCredentialSummary_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -7185,7 +7314,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getSSHCredentialSum switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary(); + struct.success = new org.apache.airavata.model.credential.store.CredentialSummary(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -7212,7 +7341,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getSSHCredentialSum struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getSSHCredentialSummary_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getCredentialSummary_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -7232,16 +7361,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getSSHCredentialSu } - private static class getSSHCredentialSummary_resultTupleSchemeFactory implements SchemeFactory { - public getSSHCredentialSummary_resultTupleScheme getScheme() { - return new getSSHCredentialSummary_resultTupleScheme(); + private static class getCredentialSummary_resultTupleSchemeFactory implements SchemeFactory { + public getCredentialSummary_resultTupleScheme getScheme() { + return new getCredentialSummary_resultTupleScheme(); } } - private static class getSSHCredentialSummary_resultTupleScheme extends TupleScheme { + private static class getCredentialSummary_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getSSHCredentialSummary_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getCredentialSummary_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -7260,11 +7389,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, getSSHCredentialSum } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getSSHCredentialSummary_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getCredentialSummary_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary(); + struct.success = new org.apache.airavata.model.credential.store.CredentialSummary(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -7745,7 +7874,7 @@ public static class getCertificateCredential_result implements org.apache.thrift schemes.put(TupleScheme.class, new getCertificateCredential_resultTupleSchemeFactory()); } - public org.apache.airavata.credential.store.datamodel.CertificateCredential success; // required + public org.apache.airavata.model.credential.store.CertificateCredential success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -7814,7 +7943,7 @@ public String getFieldName() { 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.credential.store.datamodel.CertificateCredential.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.CertificateCredential.class))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); @@ -7825,7 +7954,7 @@ public getCertificateCredential_result() { } public getCertificateCredential_result( - org.apache.airavata.credential.store.datamodel.CertificateCredential success, + org.apache.airavata.model.credential.store.CertificateCredential success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); @@ -7838,7 +7967,7 @@ public getCertificateCredential_result( */ public getCertificateCredential_result(getCertificateCredential_result other) { if (other.isSetSuccess()) { - this.success = new org.apache.airavata.credential.store.datamodel.CertificateCredential(other.success); + this.success = new org.apache.airavata.model.credential.store.CertificateCredential(other.success); } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); @@ -7855,11 +7984,11 @@ public void clear() { this.csException = null; } - public org.apache.airavata.credential.store.datamodel.CertificateCredential getSuccess() { + public org.apache.airavata.model.credential.store.CertificateCredential getSuccess() { return this.success; } - public getCertificateCredential_result setSuccess(org.apache.airavata.credential.store.datamodel.CertificateCredential success) { + public getCertificateCredential_result setSuccess(org.apache.airavata.model.credential.store.CertificateCredential success) { this.success = success; return this; } @@ -7909,7 +8038,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((org.apache.airavata.credential.store.datamodel.CertificateCredential)value); + setSuccess((org.apache.airavata.model.credential.store.CertificateCredential)value); } break; @@ -8113,7 +8242,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getCertificateCrede switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.airavata.credential.store.datamodel.CertificateCredential(); + struct.success = new org.apache.airavata.model.credential.store.CertificateCredential(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -8192,7 +8321,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, getCertificateCreden TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = new org.apache.airavata.credential.store.datamodel.CertificateCredential(); + struct.success = new org.apache.airavata.model.credential.store.CertificateCredential(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -8673,7 +8802,7 @@ public static class getPasswordCredential_result implements org.apache.thrift.TB schemes.put(TupleScheme.class, new getPasswordCredential_resultTupleSchemeFactory()); } - public org.apache.airavata.credential.store.datamodel.PasswordCredential success; // required + public org.apache.airavata.model.credential.store.PasswordCredential success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -8742,7 +8871,7 @@ public String getFieldName() { 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.credential.store.datamodel.PasswordCredential.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.PasswordCredential.class))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); @@ -8753,7 +8882,7 @@ public getPasswordCredential_result() { } public getPasswordCredential_result( - org.apache.airavata.credential.store.datamodel.PasswordCredential success, + org.apache.airavata.model.credential.store.PasswordCredential success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); @@ -8766,7 +8895,7 @@ public getPasswordCredential_result( */ public getPasswordCredential_result(getPasswordCredential_result other) { if (other.isSetSuccess()) { - this.success = new org.apache.airavata.credential.store.datamodel.PasswordCredential(other.success); + this.success = new org.apache.airavata.model.credential.store.PasswordCredential(other.success); } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); @@ -8783,11 +8912,11 @@ public void clear() { this.csException = null; } - public org.apache.airavata.credential.store.datamodel.PasswordCredential getSuccess() { + public org.apache.airavata.model.credential.store.PasswordCredential getSuccess() { return this.success; } - public getPasswordCredential_result setSuccess(org.apache.airavata.credential.store.datamodel.PasswordCredential success) { + public getPasswordCredential_result setSuccess(org.apache.airavata.model.credential.store.PasswordCredential success) { this.success = success; return this; } @@ -8837,7 +8966,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((org.apache.airavata.credential.store.datamodel.PasswordCredential)value); + setSuccess((org.apache.airavata.model.credential.store.PasswordCredential)value); } break; @@ -9041,7 +9170,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getPasswordCredenti switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new org.apache.airavata.credential.store.datamodel.PasswordCredential(); + struct.success = new org.apache.airavata.model.credential.store.PasswordCredential(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -9120,7 +9249,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, getPasswordCredentia TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.success = new org.apache.airavata.credential.store.datamodel.PasswordCredential(); + struct.success = new org.apache.airavata.model.credential.store.PasswordCredential(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -10882,22 +11011,33 @@ public void read(org.apache.thrift.protocol.TProtocol prot, getAllSSHKeysForGate } - public static class getAllGatewaySSHCredentialSummary_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllGatewaySSHCredentialSummary_args"); + public static class getAllCredentialSummaryForGateway_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCredentialSummaryForGateway_args"); - 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)1); + private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); + 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)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getAllGatewaySSHCredentialSummary_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAllGatewaySSHCredentialSummary_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getAllCredentialSummaryForGateway_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllCredentialSummaryForGateway_argsTupleSchemeFactory()); } + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + public org.apache.airavata.model.credential.store.SummaryType type; // 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 { - GATEWAY_ID((short)1, "gatewayId"); + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + TYPE((short)1, "type"), + GATEWAY_ID((short)2, "gatewayId"); private static final Map byName = new HashMap(); @@ -10912,7 +11052,9 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // GATEWAY_ID + case 1: // TYPE + return TYPE; + case 2: // GATEWAY_ID return GATEWAY_ID; default: return null; @@ -10957,45 +11099,85 @@ public String getFieldName() { 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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.credential.store.SummaryType.class))); 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(getAllGatewaySSHCredentialSummary_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaryForGateway_args.class, metaDataMap); } - public getAllGatewaySSHCredentialSummary_args() { + public getAllCredentialSummaryForGateway_args() { } - public getAllGatewaySSHCredentialSummary_args( + public getAllCredentialSummaryForGateway_args( + org.apache.airavata.model.credential.store.SummaryType type, String gatewayId) { this(); + this.type = type; this.gatewayId = gatewayId; } /** * Performs a deep copy on other. */ - public getAllGatewaySSHCredentialSummary_args(getAllGatewaySSHCredentialSummary_args other) { + public getAllCredentialSummaryForGateway_args(getAllCredentialSummaryForGateway_args other) { + if (other.isSetType()) { + this.type = other.type; + } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } } - public getAllGatewaySSHCredentialSummary_args deepCopy() { - return new getAllGatewaySSHCredentialSummary_args(this); + public getAllCredentialSummaryForGateway_args deepCopy() { + return new getAllCredentialSummaryForGateway_args(this); } @Override public void clear() { + this.type = null; this.gatewayId = null; } + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + public org.apache.airavata.model.credential.store.SummaryType getType() { + return this.type; + } + + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + public getAllCredentialSummaryForGateway_args setType(org.apache.airavata.model.credential.store.SummaryType type) { + this.type = type; + return this; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + public String getGatewayId() { return this.gatewayId; } - public getAllGatewaySSHCredentialSummary_args setGatewayId(String gatewayId) { + public getAllCredentialSummaryForGateway_args setGatewayId(String gatewayId) { this.gatewayId = gatewayId; return this; } @@ -11017,6 +11199,14 @@ public void setGatewayIdIsSet(boolean value) { public void setFieldValue(_Fields field, Object value) { switch (field) { + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((org.apache.airavata.model.credential.store.SummaryType)value); + } + break; + case GATEWAY_ID: if (value == null) { unsetGatewayId(); @@ -11030,6 +11220,9 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { + case TYPE: + return getType(); + case GATEWAY_ID: return getGatewayId(); @@ -11044,6 +11237,8 @@ public boolean isSet(_Fields field) { } switch (field) { + case TYPE: + return isSetType(); case GATEWAY_ID: return isSetGatewayId(); } @@ -11054,15 +11249,24 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getAllGatewaySSHCredentialSummary_args) - return this.equals((getAllGatewaySSHCredentialSummary_args)that); + if (that instanceof getAllCredentialSummaryForGateway_args) + return this.equals((getAllCredentialSummaryForGateway_args)that); return false; } - public boolean equals(getAllGatewaySSHCredentialSummary_args that) { + public boolean equals(getAllCredentialSummaryForGateway_args that) { if (that == null) return false; + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + boolean this_present_gatewayId = true && this.isSetGatewayId(); boolean that_present_gatewayId = true && that.isSetGatewayId(); if (this_present_gatewayId || that_present_gatewayId) { @@ -11079,6 +11283,11 @@ public boolean equals(getAllGatewaySSHCredentialSummary_args that) { public int hashCode() { List list = new ArrayList(); + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type.getValue()); + boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) @@ -11088,13 +11297,23 @@ public int hashCode() { } @Override - public int compareTo(getAllGatewaySSHCredentialSummary_args other) { + public int compareTo(getAllCredentialSummaryForGateway_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); if (lastComparison != 0) { return lastComparison; @@ -11122,9 +11341,17 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getAllGatewaySSHCredentialSummary_args("); + StringBuilder sb = new StringBuilder("getAllCredentialSummaryForGateway_args("); boolean first = true; + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (!first) sb.append(", "); sb.append("gatewayId:"); if (this.gatewayId == null) { sb.append("null"); @@ -11138,6 +11365,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields + if (type == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString()); + } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } @@ -11160,15 +11390,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getAllGatewaySSHCredentialSummary_argsStandardSchemeFactory implements SchemeFactory { - public getAllGatewaySSHCredentialSummary_argsStandardScheme getScheme() { - return new getAllGatewaySSHCredentialSummary_argsStandardScheme(); + private static class getAllCredentialSummaryForGateway_argsStandardSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForGateway_argsStandardScheme getScheme() { + return new getAllCredentialSummaryForGateway_argsStandardScheme(); } } - private static class getAllGatewaySSHCredentialSummary_argsStandardScheme extends StandardScheme { + private static class getAllCredentialSummaryForGateway_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewaySSHCredentialSummary_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllCredentialSummaryForGateway_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -11178,7 +11408,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewaySSHCre break; } switch (schemeField.id) { - case 1: // GATEWAY_ID + case 1: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // GATEWAY_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); @@ -11197,10 +11435,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewaySSHCre struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getAllGatewaySSHCredentialSummary_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getAllCredentialSummaryForGateway_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } if (struct.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); @@ -11212,23 +11455,26 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getAllGatewaySSHCr } - private static class getAllGatewaySSHCredentialSummary_argsTupleSchemeFactory implements SchemeFactory { - public getAllGatewaySSHCredentialSummary_argsTupleScheme getScheme() { - return new getAllGatewaySSHCredentialSummary_argsTupleScheme(); + private static class getAllCredentialSummaryForGateway_argsTupleSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForGateway_argsTupleScheme getScheme() { + return new getAllCredentialSummaryForGateway_argsTupleScheme(); } } - private static class getAllGatewaySSHCredentialSummary_argsTupleScheme extends TupleScheme { + private static class getAllCredentialSummaryForGateway_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHCredentialSummary_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI32(struct.type.getValue()); oprot.writeString(struct.gatewayId); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHCredentialSummary_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; + struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } @@ -11236,19 +11482,19 @@ public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHCred } - public static class getAllGatewaySSHCredentialSummary_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllGatewaySSHCredentialSummary_result"); + public static class getAllCredentialSummaryForGateway_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCredentialSummaryForGateway_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getAllGatewaySSHCredentialSummary_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAllGatewaySSHCredentialSummary_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getAllCredentialSummaryForGateway_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllCredentialSummaryForGateway_resultTupleSchemeFactory()); } - public List success; // required + public List success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -11318,18 +11564,18 @@ public String getFieldName() { 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.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.SSHCredentialSummary.class)))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.CredentialSummary.class)))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", 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(getAllGatewaySSHCredentialSummary_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaryForGateway_result.class, metaDataMap); } - public getAllGatewaySSHCredentialSummary_result() { + public getAllCredentialSummaryForGateway_result() { } - public getAllGatewaySSHCredentialSummary_result( - List success, + public getAllCredentialSummaryForGateway_result( + List success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); @@ -11340,11 +11586,11 @@ public getAllGatewaySSHCredentialSummary_result( /** * Performs a deep copy on other. */ - public getAllGatewaySSHCredentialSummary_result(getAllGatewaySSHCredentialSummary_result other) { + public getAllCredentialSummaryForGateway_result(getAllCredentialSummaryForGateway_result other) { if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (org.apache.airavata.credential.store.datamodel.SSHCredentialSummary other_element : other.success) { - __this__success.add(new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary(other_element)); + List __this__success = new ArrayList(other.success.size()); + for (org.apache.airavata.model.credential.store.CredentialSummary other_element : other.success) { + __this__success.add(new org.apache.airavata.model.credential.store.CredentialSummary(other_element)); } this.success = __this__success; } @@ -11353,8 +11599,8 @@ public getAllGatewaySSHCredentialSummary_result(getAllGatewaySSHCredentialSummar } } - public getAllGatewaySSHCredentialSummary_result deepCopy() { - return new getAllGatewaySSHCredentialSummary_result(this); + public getAllCredentialSummaryForGateway_result deepCopy() { + return new getAllCredentialSummaryForGateway_result(this); } @Override @@ -11367,22 +11613,22 @@ public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } - public java.util.Iterator getSuccessIterator() { + public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } - public void addToSuccess(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary elem) { + public void addToSuccess(org.apache.airavata.model.credential.store.CredentialSummary elem) { if (this.success == null) { - this.success = new ArrayList(); + this.success = new ArrayList(); } this.success.add(elem); } - public List getSuccess() { + public List getSuccess() { return this.success; } - public getAllGatewaySSHCredentialSummary_result setSuccess(List success) { + public getAllCredentialSummaryForGateway_result setSuccess(List success) { this.success = success; return this; } @@ -11406,7 +11652,7 @@ public org.apache.airavata.credential.store.exception.CredentialStoreException g return this.csException; } - public getAllGatewaySSHCredentialSummary_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { + public getAllCredentialSummaryForGateway_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } @@ -11432,7 +11678,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((List)value); } break; @@ -11478,12 +11724,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getAllGatewaySSHCredentialSummary_result) - return this.equals((getAllGatewaySSHCredentialSummary_result)that); + if (that instanceof getAllCredentialSummaryForGateway_result) + return this.equals((getAllCredentialSummaryForGateway_result)that); return false; } - public boolean equals(getAllGatewaySSHCredentialSummary_result that) { + public boolean equals(getAllCredentialSummaryForGateway_result that) { if (that == null) return false; @@ -11526,7 +11772,7 @@ public int hashCode() { } @Override - public int compareTo(getAllGatewaySSHCredentialSummary_result other) { + public int compareTo(getAllCredentialSummaryForGateway_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -11570,7 +11816,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getAllGatewaySSHCredentialSummary_result("); + StringBuilder sb = new StringBuilder("getAllCredentialSummaryForGateway_result("); boolean first = true; sb.append("success:"); @@ -11613,15 +11859,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getAllGatewaySSHCredentialSummary_resultStandardSchemeFactory implements SchemeFactory { - public getAllGatewaySSHCredentialSummary_resultStandardScheme getScheme() { - return new getAllGatewaySSHCredentialSummary_resultStandardScheme(); + private static class getAllCredentialSummaryForGateway_resultStandardSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForGateway_resultStandardScheme getScheme() { + return new getAllCredentialSummaryForGateway_resultStandardScheme(); } } - private static class getAllGatewaySSHCredentialSummary_resultStandardScheme extends StandardScheme { + private static class getAllCredentialSummaryForGateway_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewaySSHCredentialSummary_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllCredentialSummaryForGateway_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -11635,11 +11881,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewaySSHCre if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list20 = iprot.readListBegin(); - struct.success = new ArrayList(_list20.size); - org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _elem21; + struct.success = new ArrayList(_list20.size); + org.apache.airavata.model.credential.store.CredentialSummary _elem21; for (int _i22 = 0; _i22 < _list20.size; ++_i22) { - _elem21 = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary(); + _elem21 = new org.apache.airavata.model.credential.store.CredentialSummary(); _elem21.read(iprot); struct.success.add(_elem21); } @@ -11670,7 +11916,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllGatewaySSHCre struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getAllGatewaySSHCredentialSummary_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getAllCredentialSummaryForGateway_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -11678,7 +11924,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getAllGatewaySSHCr oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _iter23 : struct.success) + for (org.apache.airavata.model.credential.store.CredentialSummary _iter23 : struct.success) { _iter23.write(oprot); } @@ -11697,16 +11943,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getAllGatewaySSHCr } - private static class getAllGatewaySSHCredentialSummary_resultTupleSchemeFactory implements SchemeFactory { - public getAllGatewaySSHCredentialSummary_resultTupleScheme getScheme() { - return new getAllGatewaySSHCredentialSummary_resultTupleScheme(); + private static class getAllCredentialSummaryForGateway_resultTupleSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForGateway_resultTupleScheme getScheme() { + return new getAllCredentialSummaryForGateway_resultTupleScheme(); } } - private static class getAllGatewaySSHCredentialSummary_resultTupleScheme extends TupleScheme { + private static class getAllCredentialSummaryForGateway_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHCredentialSummary_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -11719,7 +11965,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHCre if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _iter24 : struct.success) + for (org.apache.airavata.model.credential.store.CredentialSummary _iter24 : struct.success) { _iter24.write(oprot); } @@ -11731,17 +11977,17 @@ public void write(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHCre } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHCredentialSummary_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list25 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list25.size); - org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _elem26; + struct.success = new ArrayList(_list25.size); + org.apache.airavata.model.credential.store.CredentialSummary _elem26; for (int _i27 = 0; _i27 < _list25.size; ++_i27) { - _elem26 = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary(); + _elem26 = new org.apache.airavata.model.credential.store.CredentialSummary(); _elem26.read(iprot); struct.success.add(_elem26); } @@ -11758,25 +12004,36 @@ public void read(org.apache.thrift.protocol.TProtocol prot, getAllGatewaySSHCred } - public static class getAllSSHCredentialSummaryForUserInGateway_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSSHCredentialSummaryForUserInGateway_args"); + public static class getAllCredentialSummaryForUserInGateway_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCredentialSummaryForUserInGateway_args"); - 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)1); - 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 TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); + 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)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)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getAllSSHCredentialSummaryForUserInGateway_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAllSSHCredentialSummaryForUserInGateway_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getAllCredentialSummaryForUserInGateway_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllCredentialSummaryForUserInGateway_argsTupleSchemeFactory()); } + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + public org.apache.airavata.model.credential.store.SummaryType type; // required public String gatewayId; // required public String userId; // 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 { - GATEWAY_ID((short)1, "gatewayId"), - USER_ID((short)2, "userId"); + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + TYPE((short)1, "type"), + GATEWAY_ID((short)2, "gatewayId"), + USER_ID((short)3, "userId"); private static final Map byName = new HashMap(); @@ -11791,9 +12048,11 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // GATEWAY_ID + case 1: // TYPE + return TYPE; + case 2: // GATEWAY_ID return GATEWAY_ID; - case 2: // USER_ID + case 3: // USER_ID return USER_ID; default: return null; @@ -11838,22 +12097,26 @@ public String getFieldName() { 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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.credential.store.SummaryType.class))); 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))); 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))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllSSHCredentialSummaryForUserInGateway_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaryForUserInGateway_args.class, metaDataMap); } - public getAllSSHCredentialSummaryForUserInGateway_args() { + public getAllCredentialSummaryForUserInGateway_args() { } - public getAllSSHCredentialSummaryForUserInGateway_args( + public getAllCredentialSummaryForUserInGateway_args( + org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId) { this(); + this.type = type; this.gatewayId = gatewayId; this.userId = userId; } @@ -11861,7 +12124,10 @@ public getAllSSHCredentialSummaryForUserInGateway_args( /** * Performs a deep copy on other. */ - public getAllSSHCredentialSummaryForUserInGateway_args(getAllSSHCredentialSummaryForUserInGateway_args other) { + public getAllCredentialSummaryForUserInGateway_args(getAllCredentialSummaryForUserInGateway_args other) { + if (other.isSetType()) { + this.type = other.type; + } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } @@ -11870,21 +12136,54 @@ public getAllSSHCredentialSummaryForUserInGateway_args(getAllSSHCredentialSummar } } - public getAllSSHCredentialSummaryForUserInGateway_args deepCopy() { - return new getAllSSHCredentialSummaryForUserInGateway_args(this); + public getAllCredentialSummaryForUserInGateway_args deepCopy() { + return new getAllCredentialSummaryForUserInGateway_args(this); } @Override public void clear() { + this.type = null; this.gatewayId = null; this.userId = null; } + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + public org.apache.airavata.model.credential.store.SummaryType getType() { + return this.type; + } + + /** + * + * @see org.apache.airavata.model.credential.store.SummaryType + */ + public getAllCredentialSummaryForUserInGateway_args setType(org.apache.airavata.model.credential.store.SummaryType type) { + this.type = type; + return this; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been assigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + public String getGatewayId() { return this.gatewayId; } - public getAllSSHCredentialSummaryForUserInGateway_args setGatewayId(String gatewayId) { + public getAllCredentialSummaryForUserInGateway_args setGatewayId(String gatewayId) { this.gatewayId = gatewayId; return this; } @@ -11908,7 +12207,7 @@ public String getUserId() { return this.userId; } - public getAllSSHCredentialSummaryForUserInGateway_args setUserId(String userId) { + public getAllCredentialSummaryForUserInGateway_args setUserId(String userId) { this.userId = userId; return this; } @@ -11930,6 +12229,14 @@ public void setUserIdIsSet(boolean value) { public void setFieldValue(_Fields field, Object value) { switch (field) { + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((org.apache.airavata.model.credential.store.SummaryType)value); + } + break; + case GATEWAY_ID: if (value == null) { unsetGatewayId(); @@ -11951,6 +12258,9 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { + case TYPE: + return getType(); + case GATEWAY_ID: return getGatewayId(); @@ -11968,6 +12278,8 @@ public boolean isSet(_Fields field) { } switch (field) { + case TYPE: + return isSetType(); case GATEWAY_ID: return isSetGatewayId(); case USER_ID: @@ -11980,15 +12292,24 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getAllSSHCredentialSummaryForUserInGateway_args) - return this.equals((getAllSSHCredentialSummaryForUserInGateway_args)that); + if (that instanceof getAllCredentialSummaryForUserInGateway_args) + return this.equals((getAllCredentialSummaryForUserInGateway_args)that); return false; } - public boolean equals(getAllSSHCredentialSummaryForUserInGateway_args that) { + public boolean equals(getAllCredentialSummaryForUserInGateway_args that) { if (that == null) return false; + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + boolean this_present_gatewayId = true && this.isSetGatewayId(); boolean that_present_gatewayId = true && that.isSetGatewayId(); if (this_present_gatewayId || that_present_gatewayId) { @@ -12014,6 +12335,11 @@ public boolean equals(getAllSSHCredentialSummaryForUserInGateway_args that) { public int hashCode() { List list = new ArrayList(); + boolean present_type = true && (isSetType()); + list.add(present_type); + if (present_type) + list.add(type.getValue()); + boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) @@ -12028,13 +12354,23 @@ public int hashCode() { } @Override - public int compareTo(getAllSSHCredentialSummaryForUserInGateway_args other) { + public int compareTo(getAllCredentialSummaryForUserInGateway_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); if (lastComparison != 0) { return lastComparison; @@ -12072,9 +12408,17 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getAllSSHCredentialSummaryForUserInGateway_args("); + StringBuilder sb = new StringBuilder("getAllCredentialSummaryForUserInGateway_args("); boolean first = true; + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + if (!first) sb.append(", "); sb.append("gatewayId:"); if (this.gatewayId == null) { sb.append("null"); @@ -12096,6 +12440,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields + if (type == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString()); + } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } @@ -12121,15 +12468,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getAllSSHCredentialSummaryForUserInGateway_argsStandardSchemeFactory implements SchemeFactory { - public getAllSSHCredentialSummaryForUserInGateway_argsStandardScheme getScheme() { - return new getAllSSHCredentialSummaryForUserInGateway_argsStandardScheme(); + private static class getAllCredentialSummaryForUserInGateway_argsStandardSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForUserInGateway_argsStandardScheme getScheme() { + return new getAllCredentialSummaryForUserInGateway_argsStandardScheme(); } } - private static class getAllSSHCredentialSummaryForUserInGateway_argsStandardScheme extends StandardScheme { + private static class getAllCredentialSummaryForUserInGateway_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -12139,7 +12486,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHCredential break; } switch (schemeField.id) { - case 1: // GATEWAY_ID + case 1: // TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // GATEWAY_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); @@ -12147,7 +12502,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHCredential org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // USER_ID + case 3: // USER_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userId = iprot.readString(); struct.setUserIdIsSet(true); @@ -12166,10 +12521,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHCredential struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getAllSSHCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getAllCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } if (struct.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); @@ -12186,24 +12546,27 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getAllSSHCredentia } - private static class getAllSSHCredentialSummaryForUserInGateway_argsTupleSchemeFactory implements SchemeFactory { - public getAllSSHCredentialSummaryForUserInGateway_argsTupleScheme getScheme() { - return new getAllSSHCredentialSummaryForUserInGateway_argsTupleScheme(); + private static class getAllCredentialSummaryForUserInGateway_argsTupleSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForUserInGateway_argsTupleScheme getScheme() { + return new getAllCredentialSummaryForUserInGateway_argsTupleScheme(); } } - private static class getAllSSHCredentialSummaryForUserInGateway_argsTupleScheme extends TupleScheme { + private static class getAllCredentialSummaryForUserInGateway_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI32(struct.type.getValue()); oprot.writeString(struct.gatewayId); oprot.writeString(struct.userId); } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getAllSSHCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; + struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); struct.userId = iprot.readString(); @@ -12213,19 +12576,19 @@ public void read(org.apache.thrift.protocol.TProtocol prot, getAllSSHCredentialS } - public static class getAllSSHCredentialSummaryForUserInGateway_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSSHCredentialSummaryForUserInGateway_result"); + public static class getAllCredentialSummaryForUserInGateway_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCredentialSummaryForUserInGateway_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getAllSSHCredentialSummaryForUserInGateway_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAllSSHCredentialSummaryForUserInGateway_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getAllCredentialSummaryForUserInGateway_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllCredentialSummaryForUserInGateway_resultTupleSchemeFactory()); } - public List success; // required + public List success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -12295,18 +12658,18 @@ public String getFieldName() { 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.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.datamodel.SSHCredentialSummary.class)))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.CredentialSummary.class)))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", 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(getAllSSHCredentialSummaryForUserInGateway_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaryForUserInGateway_result.class, metaDataMap); } - public getAllSSHCredentialSummaryForUserInGateway_result() { + public getAllCredentialSummaryForUserInGateway_result() { } - public getAllSSHCredentialSummaryForUserInGateway_result( - List success, + public getAllCredentialSummaryForUserInGateway_result( + List success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); @@ -12317,11 +12680,11 @@ public getAllSSHCredentialSummaryForUserInGateway_result( /** * Performs a deep copy on other. */ - public getAllSSHCredentialSummaryForUserInGateway_result(getAllSSHCredentialSummaryForUserInGateway_result other) { + public getAllCredentialSummaryForUserInGateway_result(getAllCredentialSummaryForUserInGateway_result other) { if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (org.apache.airavata.credential.store.datamodel.SSHCredentialSummary other_element : other.success) { - __this__success.add(new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary(other_element)); + List __this__success = new ArrayList(other.success.size()); + for (org.apache.airavata.model.credential.store.CredentialSummary other_element : other.success) { + __this__success.add(new org.apache.airavata.model.credential.store.CredentialSummary(other_element)); } this.success = __this__success; } @@ -12330,8 +12693,8 @@ public getAllSSHCredentialSummaryForUserInGateway_result(getAllSSHCredentialSumm } } - public getAllSSHCredentialSummaryForUserInGateway_result deepCopy() { - return new getAllSSHCredentialSummaryForUserInGateway_result(this); + public getAllCredentialSummaryForUserInGateway_result deepCopy() { + return new getAllCredentialSummaryForUserInGateway_result(this); } @Override @@ -12344,22 +12707,22 @@ public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } - public java.util.Iterator getSuccessIterator() { + public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } - public void addToSuccess(org.apache.airavata.credential.store.datamodel.SSHCredentialSummary elem) { + public void addToSuccess(org.apache.airavata.model.credential.store.CredentialSummary elem) { if (this.success == null) { - this.success = new ArrayList(); + this.success = new ArrayList(); } this.success.add(elem); } - public List getSuccess() { + public List getSuccess() { return this.success; } - public getAllSSHCredentialSummaryForUserInGateway_result setSuccess(List success) { + public getAllCredentialSummaryForUserInGateway_result setSuccess(List success) { this.success = success; return this; } @@ -12383,7 +12746,7 @@ public org.apache.airavata.credential.store.exception.CredentialStoreException g return this.csException; } - public getAllSSHCredentialSummaryForUserInGateway_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { + public getAllCredentialSummaryForUserInGateway_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } @@ -12409,7 +12772,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((List)value); } break; @@ -12455,12 +12818,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getAllSSHCredentialSummaryForUserInGateway_result) - return this.equals((getAllSSHCredentialSummaryForUserInGateway_result)that); + if (that instanceof getAllCredentialSummaryForUserInGateway_result) + return this.equals((getAllCredentialSummaryForUserInGateway_result)that); return false; } - public boolean equals(getAllSSHCredentialSummaryForUserInGateway_result that) { + public boolean equals(getAllCredentialSummaryForUserInGateway_result that) { if (that == null) return false; @@ -12503,7 +12866,7 @@ public int hashCode() { } @Override - public int compareTo(getAllSSHCredentialSummaryForUserInGateway_result other) { + public int compareTo(getAllCredentialSummaryForUserInGateway_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -12547,7 +12910,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("getAllSSHCredentialSummaryForUserInGateway_result("); + StringBuilder sb = new StringBuilder("getAllCredentialSummaryForUserInGateway_result("); boolean first = true; sb.append("success:"); @@ -12590,15 +12953,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class getAllSSHCredentialSummaryForUserInGateway_resultStandardSchemeFactory implements SchemeFactory { - public getAllSSHCredentialSummaryForUserInGateway_resultStandardScheme getScheme() { - return new getAllSSHCredentialSummaryForUserInGateway_resultStandardScheme(); + private static class getAllCredentialSummaryForUserInGateway_resultStandardSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForUserInGateway_resultStandardScheme getScheme() { + return new getAllCredentialSummaryForUserInGateway_resultStandardScheme(); } } - private static class getAllSSHCredentialSummaryForUserInGateway_resultStandardScheme extends StandardScheme { + private static class getAllCredentialSummaryForUserInGateway_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -12612,11 +12975,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHCredential if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list28 = iprot.readListBegin(); - struct.success = new ArrayList(_list28.size); - org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _elem29; + struct.success = new ArrayList(_list28.size); + org.apache.airavata.model.credential.store.CredentialSummary _elem29; for (int _i30 = 0; _i30 < _list28.size; ++_i30) { - _elem29 = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary(); + _elem29 = new org.apache.airavata.model.credential.store.CredentialSummary(); _elem29.read(iprot); struct.success.add(_elem29); } @@ -12647,7 +13010,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHCredential struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getAllSSHCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getAllCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -12655,7 +13018,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getAllSSHCredentia oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _iter31 : struct.success) + for (org.apache.airavata.model.credential.store.CredentialSummary _iter31 : struct.success) { _iter31.write(oprot); } @@ -12674,16 +13037,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, getAllSSHCredentia } - private static class getAllSSHCredentialSummaryForUserInGateway_resultTupleSchemeFactory implements SchemeFactory { - public getAllSSHCredentialSummaryForUserInGateway_resultTupleScheme getScheme() { - return new getAllSSHCredentialSummaryForUserInGateway_resultTupleScheme(); + private static class getAllCredentialSummaryForUserInGateway_resultTupleSchemeFactory implements SchemeFactory { + public getAllCredentialSummaryForUserInGateway_resultTupleScheme getScheme() { + return new getAllCredentialSummaryForUserInGateway_resultTupleScheme(); } } - private static class getAllSSHCredentialSummaryForUserInGateway_resultTupleScheme extends TupleScheme { + private static class getAllCredentialSummaryForUserInGateway_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -12696,7 +13059,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHCredential if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _iter32 : struct.success) + for (org.apache.airavata.model.credential.store.CredentialSummary _iter32 : struct.success) { _iter32.write(oprot); } @@ -12708,17 +13071,17 @@ public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHCredential } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getAllSSHCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list33 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list33.size); - org.apache.airavata.credential.store.datamodel.SSHCredentialSummary _elem34; + struct.success = new ArrayList(_list33.size); + org.apache.airavata.model.credential.store.CredentialSummary _elem34; for (int _i35 = 0; _i35 < _list33.size; ++_i35) { - _elem34 = new org.apache.airavata.credential.store.datamodel.SSHCredentialSummary(); + _elem34 = new org.apache.airavata.model.credential.store.CredentialSummary(); _elem34.read(iprot); struct.success.add(_elem34); } diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/APICredential.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/APICredential.java deleted file mode 100644 index b7a23d122a..0000000000 --- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/datamodel/APICredential.java +++ /dev/null @@ -1,723 +0,0 @@ - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.airavata.credential.store.datamodel; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-21") -public class APICredential implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("APICredential"); - - private static final org.apache.thrift.protocol.TField API_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("apiKey", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField API_SECRET_FIELD_DESC = new org.apache.thrift.protocol.TField("apiSecret", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PERSISTED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("persistedTime", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new APICredentialStandardSchemeFactory()); - schemes.put(TupleScheme.class, new APICredentialTupleSchemeFactory()); - } - - public String apiKey; // required - public String apiSecret; // required - public long persistedTime; // optional - public String token; // optional - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - API_KEY((short)1, "apiKey"), - API_SECRET((short)2, "apiSecret"), - PERSISTED_TIME((short)3, "persistedTime"), - TOKEN((short)4, "token"); - - private static final Map byName = new HashMap(); - - 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: // API_KEY - return API_KEY; - case 2: // API_SECRET - return API_SECRET; - case 3: // PERSISTED_TIME - return PERSISTED_TIME; - case 4: // TOKEN - return 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 - private static final int __PERSISTEDTIME_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.PERSISTED_TIME,_Fields.TOKEN}; - 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.API_KEY, new org.apache.thrift.meta_data.FieldMetaData("apiKey", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.API_SECRET, new org.apache.thrift.meta_data.FieldMetaData("apiSecret", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PERSISTED_TIME, new org.apache.thrift.meta_data.FieldMetaData("persistedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(APICredential.class, metaDataMap); - } - - public APICredential() { - } - - public APICredential( - String apiKey, - String apiSecret) - { - this(); - this.apiKey = apiKey; - this.apiSecret = apiSecret; - } - - /** - * Performs a deep copy on other. - */ - public APICredential(APICredential other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetApiKey()) { - this.apiKey = other.apiKey; - } - if (other.isSetApiSecret()) { - this.apiSecret = other.apiSecret; - } - this.persistedTime = other.persistedTime; - if (other.isSetToken()) { - this.token = other.token; - } - } - - public APICredential deepCopy() { - return new APICredential(this); - } - - @Override - public void clear() { - this.apiKey = null; - this.apiSecret = null; - setPersistedTimeIsSet(false); - this.persistedTime = 0; - this.token = null; - } - - public String getApiKey() { - return this.apiKey; - } - - public APICredential setApiKey(String apiKey) { - this.apiKey = apiKey; - return this; - } - - public void unsetApiKey() { - this.apiKey = null; - } - - /** Returns true if field apiKey is set (has been assigned a value) and false otherwise */ - public boolean isSetApiKey() { - return this.apiKey != null; - } - - public void setApiKeyIsSet(boolean value) { - if (!value) { - this.apiKey = null; - } - } - - public String getApiSecret() { - return this.apiSecret; - } - - public APICredential setApiSecret(String apiSecret) { - this.apiSecret = apiSecret; - return this; - } - - public void unsetApiSecret() { - this.apiSecret = null; - } - - /** Returns true if field apiSecret is set (has been assigned a value) and false otherwise */ - public boolean isSetApiSecret() { - return this.apiSecret != null; - } - - public void setApiSecretIsSet(boolean value) { - if (!value) { - this.apiSecret = null; - } - } - - public long getPersistedTime() { - return this.persistedTime; - } - - public APICredential setPersistedTime(long persistedTime) { - this.persistedTime = persistedTime; - setPersistedTimeIsSet(true); - return this; - } - - public void unsetPersistedTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID); - } - - /** Returns true if field persistedTime is set (has been assigned a value) and false otherwise */ - public boolean isSetPersistedTime() { - return EncodingUtils.testBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID); - } - - public void setPersistedTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PERSISTEDTIME_ISSET_ID, value); - } - - public String getToken() { - return this.token; - } - - public APICredential setToken(String token) { - this.token = token; - return this; - } - - public void unsetToken() { - this.token = null; - } - - /** Returns true if field token is set (has been assigned a value) and false otherwise */ - public boolean isSetToken() { - return this.token != null; - } - - public void setTokenIsSet(boolean value) { - if (!value) { - this.token = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case API_KEY: - if (value == null) { - unsetApiKey(); - } else { - setApiKey((String)value); - } - break; - - case API_SECRET: - if (value == null) { - unsetApiSecret(); - } else { - setApiSecret((String)value); - } - break; - - case PERSISTED_TIME: - if (value == null) { - unsetPersistedTime(); - } else { - setPersistedTime((Long)value); - } - break; - - case TOKEN: - if (value == null) { - unsetToken(); - } else { - setToken((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case API_KEY: - return getApiKey(); - - case API_SECRET: - return getApiSecret(); - - case PERSISTED_TIME: - return getPersistedTime(); - - case TOKEN: - return getToken(); - - } - 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 API_KEY: - return isSetApiKey(); - case API_SECRET: - return isSetApiSecret(); - case PERSISTED_TIME: - return isSetPersistedTime(); - case TOKEN: - return isSetToken(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof APICredential) - return this.equals((APICredential)that); - return false; - } - - public boolean equals(APICredential that) { - if (that == null) - return false; - - boolean this_present_apiKey = true && this.isSetApiKey(); - boolean that_present_apiKey = true && that.isSetApiKey(); - if (this_present_apiKey || that_present_apiKey) { - if (!(this_present_apiKey && that_present_apiKey)) - return false; - if (!this.apiKey.equals(that.apiKey)) - return false; - } - - boolean this_present_apiSecret = true && this.isSetApiSecret(); - boolean that_present_apiSecret = true && that.isSetApiSecret(); - if (this_present_apiSecret || that_present_apiSecret) { - if (!(this_present_apiSecret && that_present_apiSecret)) - return false; - if (!this.apiSecret.equals(that.apiSecret)) - return false; - } - - boolean this_present_persistedTime = true && this.isSetPersistedTime(); - boolean that_present_persistedTime = true && that.isSetPersistedTime(); - if (this_present_persistedTime || that_present_persistedTime) { - if (!(this_present_persistedTime && that_present_persistedTime)) - return false; - if (this.persistedTime != that.persistedTime) - return false; - } - - boolean this_present_token = true && this.isSetToken(); - boolean that_present_token = true && that.isSetToken(); - if (this_present_token || that_present_token) { - if (!(this_present_token && that_present_token)) - return false; - if (!this.token.equals(that.token)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_apiKey = true && (isSetApiKey()); - list.add(present_apiKey); - if (present_apiKey) - list.add(apiKey); - - boolean present_apiSecret = true && (isSetApiSecret()); - list.add(present_apiSecret); - if (present_apiSecret) - list.add(apiSecret); - - boolean present_persistedTime = true && (isSetPersistedTime()); - list.add(present_persistedTime); - if (present_persistedTime) - list.add(persistedTime); - - boolean present_token = true && (isSetToken()); - list.add(present_token); - if (present_token) - list.add(token); - - return list.hashCode(); - } - - @Override - public int compareTo(APICredential other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetApiKey()).compareTo(other.isSetApiKey()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetApiKey()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.apiKey, other.apiKey); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetApiSecret()).compareTo(other.isSetApiSecret()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetApiSecret()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.apiSecret, other.apiSecret); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPersistedTime()).compareTo(other.isSetPersistedTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPersistedTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.persistedTime, other.persistedTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetToken()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token); - 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("APICredential("); - boolean first = true; - - sb.append("apiKey:"); - if (this.apiKey == null) { - sb.append("null"); - } else { - sb.append(this.apiKey); - } - first = false; - if (!first) sb.append(", "); - sb.append("apiSecret:"); - if (this.apiSecret == null) { - sb.append("null"); - } else { - sb.append(this.apiSecret); - } - first = false; - if (isSetPersistedTime()) { - if (!first) sb.append(", "); - sb.append("persistedTime:"); - sb.append(this.persistedTime); - first = false; - } - if (isSetToken()) { - if (!first) sb.append(", "); - sb.append("token:"); - if (this.token == null) { - sb.append("null"); - } else { - sb.append(this.token); - } - first = false; - } - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (apiKey == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'apiKey' was not present! Struct: " + toString()); - } - if (apiSecret == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'apiSecret' was not present! Struct: " + toString()); - } - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class APICredentialStandardSchemeFactory implements SchemeFactory { - public APICredentialStandardScheme getScheme() { - return new APICredentialStandardScheme(); - } - } - - private static class APICredentialStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, APICredential 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: // API_KEY - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.apiKey = iprot.readString(); - struct.setApiKeyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // API_SECRET - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.apiSecret = iprot.readString(); - struct.setApiSecretIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PERSISTED_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.persistedTime = iprot.readI64(); - struct.setPersistedTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // TOKEN - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.token = iprot.readString(); - struct.setTokenIsSet(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, APICredential struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.apiKey != null) { - oprot.writeFieldBegin(API_KEY_FIELD_DESC); - oprot.writeString(struct.apiKey); - oprot.writeFieldEnd(); - } - if (struct.apiSecret != null) { - oprot.writeFieldBegin(API_SECRET_FIELD_DESC); - oprot.writeString(struct.apiSecret); - oprot.writeFieldEnd(); - } - if (struct.isSetPersistedTime()) { - oprot.writeFieldBegin(PERSISTED_TIME_FIELD_DESC); - oprot.writeI64(struct.persistedTime); - oprot.writeFieldEnd(); - } - if (struct.token != null) { - if (struct.isSetToken()) { - oprot.writeFieldBegin(TOKEN_FIELD_DESC); - oprot.writeString(struct.token); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class APICredentialTupleSchemeFactory implements SchemeFactory { - public APICredentialTupleScheme getScheme() { - return new APICredentialTupleScheme(); - } - } - - private static class APICredentialTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, APICredential struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.apiKey); - oprot.writeString(struct.apiSecret); - BitSet optionals = new BitSet(); - if (struct.isSetPersistedTime()) { - optionals.set(0); - } - if (struct.isSetToken()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetPersistedTime()) { - oprot.writeI64(struct.persistedTime); - } - if (struct.isSetToken()) { - oprot.writeString(struct.token); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, APICredential struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.apiKey = iprot.readString(); - struct.setApiKeyIsSet(true); - struct.apiSecret = iprot.readString(); - struct.setApiSecretIsSet(true); - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.persistedTime = iprot.readI64(); - struct.setPersistedTimeIsSet(true); - } - if (incoming.get(1)) { - struct.token = iprot.readString(); - struct.setTokenIsSet(true); - } - } - } - -} - diff --git a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java index ce445ac324..5a1c748f42 100644 --- a/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java +++ b/modules/credential-store/credential-store-stubs/src/main/java/org/apache/airavata/credential/store/exception/CredentialStoreException.java @@ -50,7 +50,7 @@ import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-11-08") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") public class CredentialStoreException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CredentialStoreException"); diff --git a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift index 9a07df0037..aead26eee8 100644 --- a/thrift-interface-descriptions/airavata-apis/airavata_api.thrift +++ b/thrift-interface-descriptions/airavata-apis/airavata_api.thrift @@ -36,7 +36,6 @@ include "../data-models/app-catalog-models/application_io_models.thrift" include "../data-models/app-catalog-models/application_deployment_model.thrift" include "../data-models/app-catalog-models/application_interface_model.thrift" include "../data-models/resource-catalog-models/compute_resource_model.thrift" -include "../data-models/resource-catalog-models/credential_summary.thrift" include "../data-models/resource-catalog-models/storage_resource_model.thrift" include "../data-models/resource-catalog-models/gateway_resource_profile_model.thrift" include "../data-models/resource-catalog-models/user_resource_profile_model.thrift" @@ -44,6 +43,7 @@ include "../data-models/resource-catalog-models/data_movement_models.thrift" include "../data-models/workflow-models/workflow_data_model.thrift" include "../data-models/replica-catalog-models/replica_catalog_models.thrift" include "../data-models/user-group-models/group_manager_model.thrift" +include "../data-models/credential-store-models/credential_store_data_models.thrift" namespace java org.apache.airavata.api namespace php Airavata.API @@ -385,8 +385,9 @@ service Airavata { * @return publicKey * **/ - list getAllGatewaySSHPubKeysSummary (1: required security_model.AuthzToken authzToken, - 2: required string gatewayId) + list getAllCredentialSummaryForGateway (1: required security_model.AuthzToken authzToken, + 2: required credential_store_data_models.SummaryType type, + 3: required string gatewayId) throws (1: airavata_errors.InvalidRequestException ire, 2: airavata_errors.AiravataClientException ace, 3: airavata_errors.AiravataSystemException ase) @@ -407,9 +408,10 @@ service Airavata { * @return CredentialSummary * **/ - list getAllSSHPubKeysSummaryForUserInGateway (1: required security_model.AuthzToken authzToken, - 2: required string gatewayId, - 3: required string userId) + list getAllCredentialSummaryForUsersInGateway (1: required security_model.AuthzToken authzToken, + 2: required credential_store_data_models.SummaryType type, + 3: required string gatewayId, + 4: required string userId) throws (1: airavata_errors.InvalidRequestException ire, 2: airavata_errors.AiravataClientException ace, 3: airavata_errors.AiravataSystemException ase) diff --git a/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift b/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift index 923a1922ef..6886f734ea 100644 --- a/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift +++ b/thrift-interface-descriptions/component-cpis/credential-store-cpi.thrift @@ -50,7 +50,9 @@ service CredentialStoreService { credential_store_data_models.SSHCredential getSSHCredential (1: required string tokenId, 2: required string gatewayId) throws (1:credential_store_errors.CredentialStoreException csException); - credential_store_data_models.SSHCredentialSummary getSSHCredentialSummary (1: required string tokenId, 2: required string gatewayId) + credential_store_data_models.CredentialSummary getCredentialSummary (1: required credential_store_data_models.SummaryType type, + 2: required string tokenId, + 3: required string gatewayId) throws (1:credential_store_errors.CredentialStoreException csException); credential_store_data_models.CertificateCredential getCertificateCredential (1: required string tokenId, 2: required string gatewayId) @@ -63,9 +65,14 @@ service CredentialStoreService { map getAllSSHKeysForGateway (1: required string gatewayId) throws (1:credential_store_errors.CredentialStoreException csException); - list getAllGatewaySSHCredentialSummary (1: required string gatewayId) throws (1:credential_store_errors.CredentialStoreException csException); + list getAllCredentialSummaryForGateway (1: required credential_store_data_models.SummaryType type, + 2: required string gatewayId) + throws (1:credential_store_errors.CredentialStoreException csException); - list getAllSSHCredentialSummaryForUserInGateway (1: required string gatewayId, 2: required string userId) throws (1:credential_store_errors.CredentialStoreException csException); + list getAllCredentialSummaryForUserInGateway (1: required credential_store_data_models.SummaryType type, + 2: required string gatewayId, + 3: required string userId) + throws (1:credential_store_errors.CredentialStoreException csException); map getAllPWDCredentialsForGateway (1: required string gatewayId) throws (1:credential_store_errors.CredentialStoreException csException); diff --git a/thrift-interface-descriptions/data-models/airavata_data_models.thrift b/thrift-interface-descriptions/data-models/airavata_data_models.thrift index b67614fc70..0255cfa2a2 100644 --- a/thrift-interface-descriptions/data-models/airavata_data_models.thrift +++ b/thrift-interface-descriptions/data-models/airavata_data_models.thrift @@ -33,6 +33,7 @@ include "resource-catalog-models/data_movement_models.thrift" include "replica-catalog-models/replica_catalog_models.thrift" include "user-group-models/user_profile_model.thrift" include "user-group-models/group_manager_model.thrift" +include "credential-store-models/credential_store_data_models.thrift" namespace java org.apache.airavata.model namespace php Airavata.Model diff --git a/thrift-interface-descriptions/data-models/credential-store-models/credential_store_data_models.thrift b/thrift-interface-descriptions/data-models/credential-store-models/credential_store_data_models.thrift index f2c2c7730c..154c9461ba 100644 --- a/thrift-interface-descriptions/data-models/credential-store-models/credential_store_data_models.thrift +++ b/thrift-interface-descriptions/data-models/credential-store-models/credential_store_data_models.thrift @@ -19,7 +19,7 @@ */ -namespace java org.apache.airavata.credential.store.datamodel +namespace java org.apache.airavata.model.credential.store namespace php Airavata.Model.Credential.Store const string DEFAULT_ID = "DO_NOT_SET_AT_CLIENTS" @@ -35,13 +35,24 @@ struct SSHCredential { 8: optional string description } -struct SSHCredentialSummary { - 1: required string gatewayId, - 2: required string username, - 3: optional string publicKey, - 4: optional i64 persistedTime, - 5: required string token, - 6: optional string description +/** + * Data Types supported in Airavata. The primitive data types + * +*/ +enum SummaryType{ + SSH, + PASSWD, + CERT +} + +struct CredentialSummary { + 1: required SummaryType type, + 2: required string gatewayId, + 3: required string username, + 4: optional string publicKey, + 5: optional i64 persistedTime, + 6: required string token, + 7: optional string description } struct CommunityUser { diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/credential_summary.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/credential_summary.thrift deleted file mode 100644 index c60389a901..0000000000 --- a/thrift-interface-descriptions/data-models/resource-catalog-models/credential_summary.thrift +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -namespace java org.apache.airavata.model.appcatalog.credentialsummary -namespace php Airavata.Model.AppCatalog.CredetialSummary -namespace cpp apache.airavata.model.appcatalog.credentialsummary -namespace py apache.airavata.model.appcatalog.credentialsummary - -struct CredentialSummary { - 1: required string gatewayId, - 2: required string username, - 3: required string token; - 4: optional string publicKey, - 5: optional i64 persistedTime, - 6: optional string description -} \ No newline at end of file diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/resource_catalog_models.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/resource_catalog_models.thrift index 3b144ebe21..da4a3408cf 100644 --- a/thrift-interface-descriptions/data-models/resource-catalog-models/resource_catalog_models.thrift +++ b/thrift-interface-descriptions/data-models/resource-catalog-models/resource_catalog_models.thrift @@ -21,5 +21,4 @@ include "compute_resource_model.thrift" include "storage_resource_model.thrift" include "gateway_resource_profile_model.thrift" -include "user_resource_profile_model.thrift" -include "credential_summary.thrift" \ No newline at end of file +include "user_resource_profile_model.thrift" \ No newline at end of file diff --git a/thrift-interface-descriptions/generate-thrift-stubs.sh b/thrift-interface-descriptions/generate-thrift-stubs.sh index 949ce2e3a8..e871198f08 100755 --- a/thrift-interface-descriptions/generate-thrift-stubs.sh +++ b/thrift-interface-descriptions/generate-thrift-stubs.sh @@ -181,20 +181,20 @@ generate_java_stubs() { ############################################################################### #Java generation directory - JAVA_GEN_DIR=${BASE_TARGET_DIR}/gen-java + #JAVA_GEN_DIR=${BASE_TARGET_DIR}/gen-java # As a precaution remove and previously generated files if exists - rm -rf ${JAVA_GEN_DIR} + #rm -rf ${JAVA_GEN_DIR} # Generate the credential store data models in move them to respective modules/credential-store directory - $THRIFT_EXEC ${THRIFT_ARGS} --gen java:beans ${CREDENTIAL_STORE_DATAMODEL_THRIFT_FILE} || fail unable to generate java bean thrift classes on app workflow data models + # $THRIFT_EXEC ${THRIFT_ARGS} --gen java:beans ${CREDENTIAL_STORE_DATAMODEL_THRIFT_FILE} || fail unable to generate java bean thrift classes on app workflow data models # For the generated java beans add the ASF V2 License header - add_license_header $JAVA_BEAN_GEN_DIR + #add_license_header $JAVA_BEAN_GEN_DIR # Compare the newly generated beans with existing sources and replace the changed ones. - copy_changed_files ${JAVA_BEAN_GEN_DIR}/org/apache/airavata/credential/store/datamodel} ${CREDENTIAL_DATAMODEL_SRC_DIR} + #copy_changed_files ${JAVA_BEAN_GEN_DIR}/org/apache/airavata/credential/store/datamodel} ${CREDENTIAL_DATAMODEL_SRC_DIR} ############################################################################### # Generate/Update source used by Airavata Server Skeletons & Java Client Stubs # From 8bdd26fc724a61d07b2a0cfe7123ccbd303a1f27 Mon Sep 17 00:00:00 2001 From: Anuj Bhandar Date: Fri, 4 Nov 2016 15:59:51 -0400 Subject: [PATCH 2/2] correcting exception handling in Airavata API --- .../api/server/handler/AiravataServerHandler.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java index c488053dbe..2619df47a2 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 @@ -572,8 +572,11 @@ public List getAllCredentialSummaryForGateway(AuthzToken auth logger.debug("Airavata will retrieve all SSH pub keys summaries for gateway Id : " + gatewayId); return csClient.getAllCredentialSummaryForGateway(type, gatewayId); } else { - logger.info("Summay Type"+ type.toString() + " not supported for - gateway id - " + gatewayId); - return null; + logger.info("Summay Type"+ type.toString() + " not supported by Airavata"); + AiravataSystemException ex = new AiravataSystemException(); + ex.setAiravataErrorType(AiravataErrorType.UNSUPPORTED_OPERATION); + ex.setMessage("Summay Type"+ type.toString() + " not supported by Airavata"); + throw ex; } }catch (Exception e){ logger.error("Error occurred while retrieving SSH public keys summaries for gateway : " + gatewayId , e); @@ -594,8 +597,11 @@ public List getAllCredentialSummaryForUsersInGateway(AuthzTok logger.debug("Airavata will retrieve all SSH pub keys summaries for gateway Id : " + gatewayId); return csClient.getAllCredentialSummaryForUserInGateway(type, gatewayId, userId); } else { - logger.info("Summay Type"+ type.toString() + " not supported for - gateway id - " + gatewayId + " and user Id:" + userId); - return null; + logger.info("Summay Type"+ type.toString() + " not supported by Airavata"); + AiravataSystemException ex = new AiravataSystemException(); + ex.setAiravataErrorType(AiravataErrorType.UNSUPPORTED_OPERATION); + ex.setMessage("Summay Type"+ type.toString() + " not supported by Airavata"); + throw ex; } }catch (Exception e){ logger.error("Error occurred while retrieving SSH public keys summaries for user : " + userId , e);