Package org.waveprotocol.wave.client.account

Examples of org.waveprotocol.wave.client.account.Profile


   * @param participant participant to add.
   * @param parentUrl parent URL to prepend to the image URL without host.
   */
  public void addParticipant(ParticipantId participant, String parentUrl,
      ProfileManager profileManger) {
    Profile profile = profileManger.getProfile(participant);
    String imageUrl = "";
    String fullName = participant.getAddress();
    if (profile != null) {
      imageUrl = profile.getImageUrl();
      if (!(imageUrl.startsWith("http://") || imageUrl.startsWith("https://") ||
          imageUrl.startsWith("//"))) {
        imageUrl = parentUrl + imageUrl;
      }
    }
View Full Code Here


  private void activate(SessionData data, double expiry, DocumentContext<?, ?, ?> doc) {
    data.expiry = expiry;
    data.originallyScheduledExpiry = expiry;

    if (data.bundle == null) {
      Profile profile;
      try {
        profile = profileManager.getProfile(ParticipantId.of(data.address));
      } catch (InvalidParticipantAddress e) {
        profile = null;
      }
View Full Code Here

    return ParticipantsViewBuilder.create(id, participantsUi);
  }

  @Override
  public UiBuilder render(Conversation conversation, ParticipantId participant) {
    Profile profile = profileManager.getProfile(participant);
    String id = viewIdMapper.participantOf(conversation, participant);
    ParticipantAvatarViewBuilder participantUi = ParticipantAvatarViewBuilder.create(id);
    participantUi.setAvatar(profile.getImageUrl());
    participantUi.setName(profile.getFullName());
    return participantUi;
  }
View Full Code Here

   * Shows a participation popup for the clicked participant.
   */
  private void handleParticipantClicked(Element context) {
    ParticipantView participantView = views.asParticipant(context);
    final Pair<Conversation, ParticipantId> participation = models.getParticipant(participantView);
    Profile profile = profiles.getProfile(participation.second);

    // Summon a popup view from a participant, and attach profile-popup logic to
    // it.
    final ProfilePopupView profileView = participantView.showParticipation();
    ProfilePopupPresenter profileUi = ProfilePopupPresenter.create(profile, profileView, profiles);
View Full Code Here

    return ParticipantsViewBuilder.create(id, participantsUi);
  }

  @Override
  public UiBuilder render(Conversation conversation, ParticipantId participant) {
    Profile profile = profileManager.getProfile(participant);
    String id = viewIdMapper.participantOf(conversation, participant);
    // Use ParticipantAvatarViewBuilder for avatars.
    ParticipantNameViewBuilder participantUi = ParticipantNameViewBuilder.create(id);
    participantUi.setAvatar(profile.getImageUrl());
    participantUi.setName(profile.getFullName());
    return participantUi;
  }
View Full Code Here

                getBlipDetailer(), docRenderer, getProfileManager(),
                getViewIdMapper(), createViewFactories(), getThreadReadStateMonitor()) {
              @Override
              public UiBuilder render(Conversation conversation, ParticipantId participant) {
                // Same as super class, but using avatars instead of names.
                Profile profile = getProfileManager().getProfile(participant);
                String id = getViewIdMapper().participantOf(conversation, participant);
                ParticipantAvatarViewBuilder participantUi =
                    ParticipantAvatarViewBuilder.create(id);
                participantUi.setAvatar(profile.getImageUrl());
                participantUi.setName(profile.getFullName());
                return participantUi;
              }
            };
            return new HtmlDomRenderer(ReductionBasedRenderer.of(rules, getConversations()));
          }
View Full Code Here

   * Shows a participation popup for the clicked participant.
   */
  private void handleParticipantClicked(Element context) {
    ParticipantView participantView = views.asParticipant(context);
    final Pair<Conversation, ParticipantId> participation = models.getParticipant(participantView);
    Profile profile = profiles.getProfile(participation.second);

    // Summon a popup view from a participant, and attach profile-popup logic to
    // it.
    final ProfilePopupView profileView = participantView.showParticipation();
    ProfilePopupPresenter profileUi = ProfilePopupPresenter.create(profile, profileView, profiles);
View Full Code Here

   * @param participant participant to add.
   * @param parentUrl parent URL to prepend to the image URL without host.
   */
  public void addParticipant(ParticipantId participant, String parentUrl,
      ProfileManager profileManger) {
    Profile profile = profileManger.getProfile(participant);
    String imageUrl = "";
    String fullName = participant.getAddress();
    if (profile != null) {
      imageUrl = profile.getImageUrl();
      if (!(imageUrl.startsWith("http://") || imageUrl.startsWith("https://") ||
          imageUrl.startsWith("//"))) {
        imageUrl = parentUrl + imageUrl;
      }
    }
View Full Code Here

    return ParticipantsViewBuilder.create(id, participantsUi);
  }

  @Override
  public UiBuilder render(Conversation conversation, ParticipantId participant) {
    Profile profile = profileManager.getProfile(participant);
    String id = viewIdMapper.participantOf(conversation, participant);
    // Use ParticipantAvatarViewBuilder for avatars.
    ParticipantNameViewBuilder participantUi = ParticipantNameViewBuilder.create(id);
    participantUi.setAvatar(profile.getImageUrl());
    participantUi.setName(profile.getFullName());
    return participantUi;
  }
View Full Code Here

  private void activate(SessionData data, double expiry, DocumentContext<?, ?, ?> doc) {
    data.expiry = expiry;
    data.originallyScheduledExpiry = expiry;

    if (data.bundle == null) {
      Profile profile;
      try {
        profile = profileManager.getProfile(ParticipantId.of(data.address));
      } catch (InvalidParticipantAddress e) {
        profile = null;
      }
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.client.account.Profile

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.