Package com.google.gerrit.common.data

Examples of com.google.gerrit.common.data.AccountInfo


    }
  }

  /** Format an account as a name and email address. */
  public static String nameEmail(final Account acct) {
    return nameEmail(new AccountInfo(acct));
  }
View Full Code Here


      plc.addBlurHandler(this);
      table.setWidget(row, col, plc);
      styleLastCommentCell(row, col);

    } else {
      final AccountInfo author = accountCache.get(line.getAuthor());
      final PublishedCommentPanel panel =
          new PublishedCommentPanel(author, line);
      panel.setOpen(expandComment);
      panel.addFocusHandler(this);
      panel.addBlurHandler(this);
View Full Code Here

   * Create an AccountInfoCache with the currently loaded Account entities.
   * */
  public AccountInfoCache create() {
    final List<AccountInfo> r = new ArrayList<AccountInfo>(out.size());
    for (final Account a : out.values()) {
      r.add(new AccountInfo(a));
    }
    return new AccountInfoCache(r);
  }
View Full Code Here

    final Timestamp aged = new Timestamp(System.currentTimeMillis() - AGE);

    for (int i = 0; i < msgList.size(); i++) {
      final ChangeMessage msg = msgList.get(i);

      final AccountInfo author;
      if (msg.getAuthor() != null) {
        author = accts.get(msg.getAuthor());
      } else {
        final Account gerrit = new Account(null);
        gerrit.setFullName(Util.C.messageNoAuthor());
        author = new AccountInfo(gerrit);
      }

      boolean isRecent;
      if (i == msgList.size() - 1) {
        isRecent = true;
View Full Code Here

      } else {
        haveReview = true;

        final ApprovalCategoryValue acv = type.getValue(ca);
        final AccountInfo ai = aic.get(ca.getAccountId());

        if (type.isMaxNegative(ca)) {

          if (showUsernameInReviewCategory) {
            FlowPanel fp = new FlowPanel();
View Full Code Here

    ReviewerSuggestion(final ReviewerInfo reviewerInfo) {
      this.reviewerInfo = reviewerInfo;
    }

    public String getDisplayString() {
      final AccountInfo accountInfo = reviewerInfo.getAccountInfo();
      if (accountInfo != null) {
        return FormatUtil.nameEmail(accountInfo);
      }
      return reviewerInfo.getGroup().getName() + " ("
          + Util.C.suggestedGroupLabel() + ")";
View Full Code Here

      return reviewerInfo.getGroup().getName() + " ("
          + Util.C.suggestedGroupLabel() + ")";
    }

    public String getReplacementString() {
      final AccountInfo accountInfo = reviewerInfo.getAccountInfo();
      if (accountInfo != null) {
        return FormatUtil.nameEmail(accountInfo);
      }
      return reviewerInfo.getGroup().getName();
    }
View Full Code Here

/** Link to any user's account dashboard. */
public class AccountLink extends InlineHyperlink {
  /** Create a link after locating account details from an active cache. */
  public static AccountLink link(final AccountInfoCache cache,
      final Account.Id id) {
    final AccountInfo ai = cache.get(id);
    return ai != null ? new AccountLink(ai) : null;
  }
View Full Code Here

    }
    return emailAddresses;
  }

  public String getName() {
    return new AccountInfo(getAccount()).getName(anonymousCowardName);
  }
View Full Code Here

  public String getName() {
    return new AccountInfo(getAccount()).getName(anonymousCowardName);
  }

  public String getNameEmail() {
    return new AccountInfo(getAccount()).getNameEmail(anonymousCowardName);
  }
View Full Code Here

TOP

Related Classes of com.google.gerrit.common.data.AccountInfo

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.