Package org.springframework.social.connect

Examples of org.springframework.social.connect.UserProfileBuilder


      values.setProfileUrl(profileUrl);
      values.setImageUrl(profilePictureUrl);
    }

    public UserProfile fetchUserProfile(TestTwitterApi api) {
      return new UserProfileBuilder().setName(name).setUsername("kdonald").build();     
    }
View Full Code Here


  public void setConnectionValues(FakeApi api, ConnectionValues values) {
  }

  public UserProfile fetchUserProfile(FakeApi api) {
    return new UserProfileBuilder().build();
  }
View Full Code Here

      values.setProfileUrl(profileUrl);
      values.setImageUrl(profilePictureUrl);
    }

    public UserProfile fetchUserProfile(TestFacebookApi api) {
      return new UserProfileBuilder().setName(name).setEmail("cwalls@gopivotal.com").setUsername("Craig Walls").build();
    }
View Full Code Here

      values.setProfileUrl(profileUrl);
      values.setImageUrl(profilePictureUrl);
    }

    public UserProfile fetchUserProfile(TestTwitterApi api) {
      return new UserProfileBuilder().setName(name).setUsername("habuma").build();     
    }
View Full Code Here

  @Override
  public UserProfile fetchUserProfile(Twitter api) {
    try {
      User user = api.verifyCredentials();
      return new UserProfileBuilder().setName(user.getName()).setUsername(user.getScreenName()).build();
    } catch (TwitterException e) {
      return null;
    }   
  }
View Full Code Here

  public UserProfile fetchUserProfile(NetFlixApi netflixApi) {
    NetFlixUserProfile profile = netflixApi.getUserProfile();   
    String firstName = profile.getFirstName();
    String lastName = profile.getLastName();
    String fullName = firstName + " " + lastName;
    return new UserProfileBuilder().setFirstName(firstName).setLastName(lastName).setName(fullName).build();
  }
View Full Code Here

     * @throws AlfrescoException
     * @throws APIException
     */
    public UserProfile fetchUserProfile(Alfresco alfresco)
    {
        UserProfileBuilder userProfile = new UserProfileBuilder();
        try
        {
            Person currentUser = alfresco.getCurrentUser();

            userProfile.setEmail(currentUser.getEmail()).setFirstName(currentUser.getFirstName()).setLastName(currentUser.getLastName()).setUsername(currentUser.getId());
        }
        catch (JsonParseException e)
        {
            throw new AlfrescoException(e.getMessage(), e);
        }
        catch (JsonMappingException e)
        {
            throw new AlfrescoException(e.getMessage(), e);
        }
        catch (IOException e)
        {
            throw new AlfrescoException(e.getMessage(), e);
        }

        return userProfile.build();
    }
View Full Code Here

  @Override
  public UserProfile fetchUserProfile(
      SpringSocialSecurity springSocialSecurity) {
    SpringSocialSecurityProfile profile = springSocialSecurity
        .getUserProfile();
    UserProfileBuilder builder = new UserProfileBuilder();
    builder.setUsername(profile.getUserName());
    builder.setName(profile.getDisplayName());
    return builder.build();
  }
View Full Code Here

    values.setImageUrl("http://graph.facebook.com/v1.0/" + profile.getId() + "/picture");
  }

  public UserProfile fetchUserProfile(Facebook facebook) {
    FacebookProfile profile = facebook.userOperations().getUserProfile();
    return new UserProfileBuilder().setName(profile.getName()).setFirstName(profile.getFirstName()).setLastName(profile.getLastName()).
      setEmail(profile.getEmail()).build();
  }
View Full Code Here

TOP

Related Classes of org.springframework.social.connect.UserProfileBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.