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/develop Commit: 846220595f111a9edd83076648e728be6e460fb4 Parents: 78a3caf Author: Ajinkya Dhamnaskar <[email protected]> Authored: Wed May 17 14:14:23 2017 -0400 Committer: Ajinkya Dhamnaskar <[email protected]> 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<Wso2ISLoginCredentialsDAO> adminCredentials = new ArrayList<Wso2ISLoginCredentialsDAO>(); - + 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); }
