/** * Adds the info from the provider profile to the specified profile. * * @param profile the target profile * @param providerProfile the provider profile where to get the info */ public static void addProviderProfileInfo(Profile profile, UserProfile providerProfile) { String email = providerProfile.getEmail(); if (StringUtils.isEmpty(email)) { throw new IllegalStateException("No email included in provider profile"); } String username = providerProfile.getUsername(); if (StringUtils.isEmpty(username)) { username = email; } String firstName = providerProfile.getFirstName(); String lastName = providerProfile.getLastName(); profile.setUsername(username); profile.setEmail(email); profile.setAttribute(FIRST_NAME_ATTRIBUTE_NAME, firstName); profile.setAttribute(LAST_NAME_ATTRIBUTE_NAME, lastName); }
/** * Adds the info from the provider profile to the specified profile. * * @param profile the target profile * @param providerProfile the provider profile where to get the info */ public static void addProviderProfileInfo(Profile profile, UserProfile providerProfile) { String email = providerProfile.getEmail(); if (StringUtils.isEmpty(email)) { throw new IllegalStateException("No email included in provider profile"); } String username = providerProfile.getUsername(); if (StringUtils.isEmpty(username)) { username = email; } String firstName = providerProfile.getFirstName(); String lastName = providerProfile.getLastName(); profile.setUsername(username); profile.setEmail(email); profile.setAttribute(FIRST_NAME_ATTRIBUTE_NAME, firstName); profile.setAttribute(LAST_NAME_ATTRIBUTE_NAME, lastName); }
/** * Adds the info from the provider profile to the specified profile. * * @param profile the target profile * @param providerProfile the provider profile where to get the info */ public static void addProviderProfileInfo(Profile profile, UserProfile providerProfile) { String email = providerProfile.getEmail(); if (StringUtils.isEmpty(email)) { throw new IllegalStateException("No email included in provider profile"); } String username = providerProfile.getUsername(); if (StringUtils.isEmpty(username)) { username = email; } String firstName = providerProfile.getFirstName(); String lastName = providerProfile.getLastName(); profile.setUsername(username); profile.setEmail(email); profile.setAttribute(FIRST_NAME_ATTRIBUTE_NAME, firstName); profile.setAttribute(LAST_NAME_ATTRIBUTE_NAME, lastName); }
allConnections = new HashMap<>(); profile.setAttribute(CONNECTIONS_ATTRIBUTE_NAME, allConnections); } else { connectionsForProvider = allConnections.get(connectionData.getProviderId());
allConnections = new HashMap<>(); profile.setAttribute(CONNECTIONS_ATTRIBUTE_NAME, allConnections); } else { connectionsForProvider = allConnections.get(connectionData.getProviderId());
allConnections = new HashMap<>(); profile.setAttribute(CONNECTIONS_ATTRIBUTE_NAME, allConnections); } else { connectionsForProvider = allConnections.get(connectionData.getProviderId());
profile.setAttribute(FIRST_NAME_ATTRIBUTE_NAME, firstName); profile.setAttribute(LAST_NAME_ATTRIBUTE_NAME, lastName); profile.setAttribute(DISPLAY_NAME_ATTRIBUTE_NAME, displayName); profile.setAttribute(AVATAR_LINK_ATTRIBUTE_NAME, connection.getImageUrl());