Examples of accounts()


Examples of com.google.api.services.adsense.AdSense.accounts()

        try {
            AdSense adSense = new AdSense(TRANSPORT, JSON_FACTORY, credential);

            // アカウント(複数)を取得
            Accounts accounts = adSense.accounts().list().execute();
            requestScope("accounts", accounts);

        }catch(Exception e) {
            // アカウント存在しない場合はエラーになるが、エラーの表示をJSPで行うので何もしない。
        }
View Full Code Here

Examples of com.google.gerrit.extensions.api.GerritApi.accounts()

    private boolean testConnection(GerritAuthData gerritAuthData) throws RestApiException {
        // we need to test with a temporary client with probably new (unsaved) credentials
        GerritApi tempClient = createClientWithCustomAuthData(gerritAuthData);
        if (gerritAuthData.isLoginAndPasswordAvailable()) {
            AccountInfo user = tempClient.accounts().self().get();
            return user != null;
        } else {
            tempClient.changes().query().withLimit(1).get();
            return true;
        }
View Full Code Here

Examples of com.google.gerrit.reviewdb.server.ReviewDb.accounts()

            throw new AccountException("Identity in use by another account");
          }
          db.accountExternalIds().delete(Collections.singleton(extId));

          if (who.getEmailAddress() != null) {
            final Account a = db.accounts().get(from);
            if (a.getPreferredEmail() != null
                && a.getPreferredEmail().equals(who.getEmailAddress())) {
              a.setPreferredEmail(null);
              db.accounts().update(Collections.singleton(a));
            }
View Full Code Here

Examples of com.google.gerrit.reviewdb.server.ReviewDb.accounts()

          if (who.getEmailAddress() != null) {
            final Account a = db.accounts().get(from);
            if (a.getPreferredEmail() != null
                && a.getPreferredEmail().equals(who.getEmailAddress())) {
              a.setPreferredEmail(null);
              db.accounts().update(Collections.singleton(a));
            }
            byEmailCache.evict(who.getEmailAddress());
            byIdCache.evict(from);
          }
View Full Code Here

Examples of com.google.gerrit.reviewdb.server.ReviewDb.accounts()

    @Override
    public Set<Account.Id> load(String email) throws Exception {
      final ReviewDb db = schema.open();
      try {
        Set<Account.Id> r = Sets.newHashSet();
        for (Account a : db.accounts().byPreferredEmail(email)) {
          r.add(a.getId());
        }
        for (AccountExternalId a : db.accountExternalIds()
            .byEmailAddress(email)) {
          r.add(a.getAccountId());
View Full Code Here

Examples of com.google.gerrit.reviewdb.server.ReviewDb.accounts()

    }

    Element userlistElement = HtmlDomUtil.find(doc, "userlist");
    ReviewDb db = schema.open();
    try {
      ResultSet<Account> accounts = db.accounts().firstNById(5);
      for (Account a : accounts) {
        String displayName;
        if (a.getUserName() != null) {
          displayName = a.getUserName();
        } else if (a.getFullName() != null) {
View Full Code Here

Examples of com.google.gerrit.reviewdb.server.ReviewDb.accounts()

  private AuthResult byPreferredEmail(final HttpServletResponse rsp,
      final String email) {
    try {
      final ReviewDb db = schema.open();
      try {
        List<Account> matches = db.accounts().byPreferredEmail(email).toList();
        return matches.size() == 1 ? auth(matches.get(0)) : null;
      } finally {
        db.close();
      }
    } catch (OrmException e) {
View Full Code Here

Examples of com.google.gerrit.reviewdb.server.ReviewDb.accounts()

      return null;
    }
    try {
      final ReviewDb db = schema.open();
      try {
        return auth(db.accounts().get(id));
      } finally {
        db.close();
      }
    } catch (OrmException e) {
      getServletContext().log("cannot query database", e);
View Full Code Here

Examples of com.google.gerrit.reviewdb.server.ReviewDb.accounts()

    this.projectCache = projectCache;

    firstAccount = new AtomicBoolean();
    final ReviewDb db = schema.open();
    try {
      firstAccount.set(db.accounts().anyAccounts().toList().isEmpty());
    } finally {
      db.close();
    }
  }
View Full Code Here

Examples of com.google.gerrit.reviewdb.server.ReviewDb.accounts()

          //
          return create(db, who);

        } else { // Account exists

          Account act = db.accounts().get(id.getAccountId());
          if (act == null || !act.isActive()) {
            throw new AccountException("Authentication error, account inactive");
          }

          // return the identity to the caller.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.