Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C04D6200C85 for ; Tue, 30 May 2017 21:02:26 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BF2F8160BDC; Tue, 30 May 2017 19:02:26 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C52BE160BB1 for ; Tue, 30 May 2017 21:02:24 +0200 (CEST) Received: (qmail 95728 invoked by uid 500); 30 May 2017 19:02:23 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 93676 invoked by uid 99); 30 May 2017 19:02:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 May 2017 19:02:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E99ABDF9AE; Tue, 30 May 2017 19:02:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: scnakandala@apache.org To: commits@airavata.apache.org Date: Tue, 30 May 2017 19:02:41 -0000 Message-Id: <84e1089f58db47a2a25120a45b87f61f@git.apache.org> In-Reply-To: <22a8687c861a4bf8b9a000c483845fb3@git.apache.org> References: <22a8687c861a4bf8b9a000c483845fb3@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [21/37] airavata git commit: Changes related to profile-service-stubs archived-at: Tue, 30 May 2017 19:02:26 -0000 Changes related to profile-service-stubs Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/84622059 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/84622059 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/84622059 Branch: refs/heads/registry-refactoring Commit: 846220595f111a9edd83076648e728be6e460fb4 Parents: 78a3caf Author: Ajinkya Dhamnaskar Authored: Wed May 17 14:14:23 2017 -0400 Committer: Ajinkya Dhamnaskar Committed: Wed May 17 14:14:23 2017 -0400 ---------------------------------------------------------------------- .../main/java/org/apache/airavata/MigrationManager.java | 8 +++++--- .../apache/airavata/UserProfileAiravataThriftClient.java | 11 ++++------- 2 files changed, 9 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/84622059/modules/user-profile-migration/src/main/java/org/apache/airavata/MigrationManager.java ---------------------------------------------------------------------- diff --git a/modules/user-profile-migration/src/main/java/org/apache/airavata/MigrationManager.java b/modules/user-profile-migration/src/main/java/org/apache/airavata/MigrationManager.java index 1b4c649..ba52de4 100644 --- a/modules/user-profile-migration/src/main/java/org/apache/airavata/MigrationManager.java +++ b/modules/user-profile-migration/src/main/java/org/apache/airavata/MigrationManager.java @@ -20,8 +20,9 @@ package org.apache.airavata; import org.apache.airavata.common.exception.ApplicationSettingsException; +import org.apache.airavata.model.security.AuthzToken; import org.apache.airavata.model.user.UserProfile; -import org.apache.airavata.userprofile.cpi.UserProfileService; +import org.apache.airavata.service.profile.user.cpi.UserProfileService; import org.apache.thrift.TException; import org.wso2.carbon.um.ws.api.stub.ClaimValue; import org.wso2.carbon.um.ws.api.stub.RemoteUserStoreManagerServiceStub; @@ -34,7 +35,7 @@ import java.util.List; public class MigrationManager { private ArrayList adminCredentials = new ArrayList(); - + private static AuthzToken authzToken = new AuthzToken("empy_token"); /*Add the credentials for all the tenants from which the profile should be migrated to Airavata DB*/ public void setISLoginCredentials(){ @@ -120,7 +121,8 @@ public class MigrationManager { airavataUserProfile.setHomeOrganization(ISProfile.getOrganization()); airavataUserProfile.setPhones(ISProfile.getPhones()); airavataUserProfile.setCountry(ISProfile.getCountry()); - client.addUserProfile(airavataUserProfile); + //TODO: fix authtzToken, for now we are using empty token + client.addUserProfile(authzToken, airavataUserProfile); } return false; } http://git-wip-us.apache.org/repos/asf/airavata/blob/84622059/modules/user-profile-migration/src/main/java/org/apache/airavata/UserProfileAiravataThriftClient.java ---------------------------------------------------------------------- diff --git a/modules/user-profile-migration/src/main/java/org/apache/airavata/UserProfileAiravataThriftClient.java b/modules/user-profile-migration/src/main/java/org/apache/airavata/UserProfileAiravataThriftClient.java index 71dff21..56f2235 100644 --- a/modules/user-profile-migration/src/main/java/org/apache/airavata/UserProfileAiravataThriftClient.java +++ b/modules/user-profile-migration/src/main/java/org/apache/airavata/UserProfileAiravataThriftClient.java @@ -21,14 +21,11 @@ package org.apache.airavata; import org.apache.airavata.common.exception.ApplicationSettingsException; import org.apache.airavata.common.utils.ServerSettings; -import org.apache.airavata.userprofile.cpi.UserProfileService; -import org.apache.airavata.userprofile.cpi.exception.UserProfileServiceException; -import org.apache.airavata.userprofile.cpi.client.UserProfileServiceClientFactory; +import org.apache.airavata.service.profile.client.ProfileServiceClientFactory; +import org.apache.airavata.service.profile.user.cpi.UserProfileService; +import org.apache.airavata.service.profile.user.cpi.exception.UserProfileServiceException; import org.apache.thrift.TException; -import java.util.ArrayList; -import java.util.List; - public class UserProfileAiravataThriftClient { public UserProfileService.Client getUserProfileServiceClient() throws TException, ApplicationSettingsException { @@ -36,7 +33,7 @@ public class UserProfileAiravataThriftClient { final int serverPort = Integer.parseInt(ServerSettings.getUserProfileServerPort()); final String serverHost = ServerSettings.getUserProfileServerHost(); try { - return UserProfileServiceClientFactory.createUserProfileServiceClient(serverHost, serverPort); + return ProfileServiceClientFactory.createUserProfileServiceClient(serverHost, serverPort); } catch (UserProfileServiceException e) { throw new TException("Unable to create registry client...", e); }