Package com.google.wave.api

Examples of com.google.wave.api.ParticipantProfile


  protected void setUp() {
    MockitoAnnotations.initMocks(this);
    FetchProfilesRequest request = new FetchProfilesRequest(Lists.newArrayList(ADDRESS));
    when(operation.getParameter(ParamsProperty.FETCH_PROFILES_REQUEST)).thenReturn(request);
    when(fakeProfilesFetcher.fetchProfile(ADDRESS)).thenReturn(
        new ParticipantProfile(ADDRESS, NAME, IMAGE_URL, PROFILE_URL));
    service = new FetchProfilesService(fakeProfilesFetcher);
  }
View Full Code Here


        assertTrue(map.containsKey(ParamsProperty.FETCH_PROFILES_RESULT));
        Object resultsObj = map.get(ParamsProperty.FETCH_PROFILES_RESULT);
        FetchProfilesResult results = (FetchProfilesResult) resultsObj;
        assertNotNull(results.getProfiles());
        assertEquals(1, results.getProfiles().size());
        ParticipantProfile profile = results.getProfiles().get(0);
        assertEquals(address, profile.getAddress());
        assertEquals(name, profile.getName());
        assertEquals(profileUrl, profile.getProfileUrl());
        assertEquals(imageUrl, profile.getImageUrl());
        return true;
      }

      @Override
      public void describeTo(Description description) {
View Full Code Here

    FetchProfilesRequest request =
        OperationUtil.getRequiredParameter(operation, ParamsProperty.FETCH_PROFILES_REQUEST);
    List<String> requestAddresses = request.getParticipantIds();
    List<ParticipantProfile> profiles = Lists.newArrayListWithCapacity(requestAddresses.size());
    for (String address : requestAddresses) {
      ParticipantProfile participantProfile = profilesFetcher.fetchProfile(address);
      profiles.add(participantProfile);
    }
    FetchProfilesResult result = new FetchProfilesResult(profiles);
    Map<ParamsProperty, Object> data =
        ImmutableMap.<ParamsProperty, Object> of(ParamsProperty.FETCH_PROFILES_RESULT, result);
View Full Code Here

    return gravatarUrl + emailHash + ".jpg?s=100&d=identicon";
  }

  @Override
  public ParticipantProfile fetchProfile(String email) {
    ParticipantProfile pTemp = null;
    pTemp = ProfilesFetcher.SIMPLE_PROFILES_FETCHER.fetchProfile(email);
    ParticipantProfile profile =
        new ParticipantProfile(email, pTemp.getName(), getImageUrl(email), pTemp.getProfileUrl());
    return profile;
  }
View Full Code Here

    return "/iniavatars/100x100/" + email;
  }

  @Override
  public ParticipantProfile fetchProfile(String email) {
    ParticipantProfile pTemp = null;
    pTemp = ProfilesFetcher.SIMPLE_PROFILES_FETCHER.fetchProfile(email);
    ParticipantProfile profile =
        new ParticipantProfile(email, pTemp.getName(), getImageUrl(email), pTemp.getProfileUrl());
    return profile;
  }
View Full Code Here

   */
  public ParticipantProfile getProfile(String screenName) throws IOException, JSONException {
    Map<String, String> queryParameters = new HashMap<String, String>();
    queryParameters.put("screen_name", screenName);
    JSONObject profile = new JSONObject(fetchUrl(PROFILE_URL, queryParameters, false));
    return new ParticipantProfile(profile.getString(PROFILE_NAME), profile
        .getString(PROFILE_IMAGE_URL), "http://www.twitter.com/" + screenName);
  }
View Full Code Here

    return "http://code.google.com/apis/wave/extensions/robots/java-tutorial.html";
  }

  @Override
  protected ParticipantProfile getCustomProfile(String name) {
    return new ParticipantProfile("Proxied JKitchensinky",
        "http://jkitchensinky.appspot.com/public/proxied-avatar.png",
        getRobotProfilePageUrl());
  }
View Full Code Here

    FetchProfilesRequest request =
        OperationUtil.getRequiredParameter(operation, ParamsProperty.FETCH_PROFILES_REQUEST);
    List<String> requestAddresses = request.getParticipantIds();
    List<ParticipantProfile> profiles = Lists.newArrayListWithCapacity(requestAddresses.size());
    for (String address : requestAddresses) {
      ParticipantProfile participantProfile = profilesFetcher.fetchProfile(address);
      profiles.add(participantProfile);
    }
    FetchProfilesResult result = new FetchProfilesResult(profiles);
    Map<ParamsProperty, Object> data =
        ImmutableMap.<ParamsProperty, Object> of(ParamsProperty.FETCH_PROFILES_RESULT, result);
View Full Code Here

    return gravatarUrl + emailHash + ".jpg?s=100&d=identicon";
  }

  @Override
  public ParticipantProfile fetchProfile(String email) {
    ParticipantProfile pTemp = null;
    pTemp = ProfilesFetcher.SIMPLE_PROFILES_FETCHER.fetchProfile(email);
    ParticipantProfile profile =
        new ParticipantProfile(email, pTemp.getName(), getImageUrl(email), pTemp.getProfileUrl());
    return profile;
  }
View Full Code Here

TOP

Related Classes of com.google.wave.api.ParticipantProfile

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.