当前位置: 首页>>代码示例>>Java>>正文


Java Connection.getImageUrl方法代码示例

本文整理汇总了Java中org.springframework.social.connect.Connection.getImageUrl方法的典型用法代码示例。如果您正苦于以下问题:Java Connection.getImageUrl方法的具体用法?Java Connection.getImageUrl怎么用?Java Connection.getImageUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.social.connect.Connection的用法示例。


在下文中一共展示了Connection.getImageUrl方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createSocialUser

import org.springframework.social.connect.Connection; //导入方法依赖的package包/类
/**
 * Create new user.
 * @param connection connection
 * @param langKey lang key
 */
public void createSocialUser(Connection<?> connection, String langKey) {
    if (connection == null) {
        log.error("Cannot create social user because connection is null");
        throw new IllegalArgumentException("Connection cannot be null");
    }
    UserProfile userProfile = connection.fetchUserProfile();
    String providerId = connection.getKey().getProviderId();
    String imageUrl = connection.getImageUrl();
    User user = createUserIfNotExist(userProfile, langKey, imageUrl);
    createSocialConnection(user.getUserKey(), connection);
    mailService.sendSocialRegistrationValidationEmail(user, userProfile.getEmail(), providerId,
        TenantContext.getCurrent().getTenant(), MDCUtil.getRid());
}
 
开发者ID:xm-online,项目名称:xm-uaa,代码行数:19,代码来源:SocialService.java

示例2: createSocialUser

import org.springframework.social.connect.Connection; //导入方法依赖的package包/类
public void createSocialUser(Connection<?> connection, String langKey) {
    if (connection == null) {
        log.error("Cannot create social user because connection is null");
        throw new IllegalArgumentException("Connection cannot be null");
    }
    UserProfile userProfile = connection.fetchUserProfile();
    String providerId = connection.getKey().getProviderId();
    String imageUrl = connection.getImageUrl();
    User user = createUserIfNotExist(userProfile, langKey, providerId, imageUrl);
    createSocialConnection(user.getLogin(), connection);
    mailService.sendSocialRegistrationValidationEmail(user, providerId);
}
 
开发者ID:Microsoft,项目名称:MTC_Labrat,代码行数:13,代码来源:SocialService.java

示例3: connectionToUserSocialConnection

import org.springframework.social.connect.Connection; //导入方法依赖的package包/类
private SocialUserConnection connectionToUserSocialConnection(Connection<?> connection, Long rank) {
  ConnectionData connectionData = connection.createData();
  return new SocialUserConnection(userId, connection.getKey().getProviderId(), connection.getKey().getProviderUserId(),
    rank, connection.getDisplayName(), connection.getProfileUrl(), connection.getImageUrl(), connectionData.getAccessToken(),
    connectionData.getSecret(), connectionData.getRefreshToken(), connectionData.getExpireTime()
  );
}
 
开发者ID:priitl,项目名称:p2p-webtv,代码行数:8,代码来源:CustomSocialConnectionRepository.java

示例4: createSocialUser

import org.springframework.social.connect.Connection; //导入方法依赖的package包/类
public void createSocialUser(Connection<?> connection, String langKey) {
  if (connection == null) {
    log.error("Cannot create social user because connection is null");
    throw new IllegalArgumentException("Connection cannot be null");
  }
  UserProfile userProfile = connection.fetchUserProfile();
  String providerId = connection.getKey().getProviderId();
  String imageUrl = connection.getImageUrl();
  User user = createUserIfNotExist(userProfile, langKey, providerId, imageUrl);
  createSocialConnection(user.getLogin(), connection);
  mailService.sendSocialRegistrationValidationEmail(user, providerId);
}
 
开发者ID:priitl,项目名称:p2p-webtv,代码行数:13,代码来源:SocialService.java

示例5: getImageUrl

import org.springframework.social.connect.Connection; //导入方法依赖的package包/类
/**
 * Retrieve the image URL resized
 * @param connection
 * @param height
 * @param width
 * @return URL as a {@link String} of where the resized profile image is located
 */
private String getImageUrl(Connection<Facebook> connection, int height, int width) {
	return connection.getImageUrl() + "?height=x&width=y".replaceAll("x", new Integer(height).toString()).replace("y", new Integer(width).toString());
}
 
开发者ID:kevindeyne,项目名称:simple-facebook-integration-spring-sec,代码行数:11,代码来源:CustomConnectInterceptor.java


注:本文中的org.springframework.social.connect.Connection.getImageUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。