Package com.google.gdata.data.appsforyourdomain.provisioning

Examples of com.google.gdata.data.appsforyourdomain.provisioning.UserFeed


      feedUrl = new URL(urlString);
    } catch (MalformedURLException murle) {
      LOGGER.severe(murle.toString());
    }
       
    UserFeed feed = null;
    try {
      Link nextLink;
      do {
        UserFeed currentPage = (UserFeed) service.getFeed(
            feedUrl, UserFeed.class, lastFetchDateTime);
        if (feed == null) {
          feed = new UserFeed();
        }
        feed.getEntries().addAll(currentPage.getEntries());
        nextLink = currentPage.getLink(Link.Rel.NEXT, Link.Type.ATOM);
      } while(nextLink != null);
    } catch (IOException ioe) {
      LOGGER.severe(ioe.toString());
    } catch (NotModifiedException nme) {
      LOGGER.info(nme.toString());
View Full Code Here


          Login login = new Login();
          login.setUserName((String) iter.next());
          userEntry.addExtension(login);
          entryList.add(userEntry);
        }
        UserFeed userFeed = new UserFeed();
        userFeed.getEntries().addAll(entryList);
        return userFeed;
      }
    }
View Full Code Here

   * @param username The user name (not email) of a domain administrator.
   * @param password The user's password on the domain.
   */
  public void refresh(String domain, String username, String password) {
    try {
      UserFeed usersFeed = getUsers(domain, username, password);
      usersListModel.clear();
      Iterator<UserEntry> userIterator = usersFeed.getEntries().iterator();
      while (userIterator.hasNext()) {
        usersListModel.addElement(userIterator.next().getLogin().getUserName());
      }
    } catch (MalformedURLException e) {
      JOptionPane.showMessageDialog(null, e, GmailSettingsClient.APP_TITLE,
View Full Code Here

   * @throws ServiceException if the insert request failed due to system error.
   */
  protected UserFeed getUsers(String domain, String username, String password)
      throws MalformedURLException, IOException, ServiceException {
    String domainUrlBase = null;
    UserFeed allUsers = null;

    UserService userService = new UserService(GmailSettingsClient.APP_TITLE);
    userService.setUserCredentials(username + "@" + domain, password);

    domainUrlBase = "https://www.google.com/a/feeds/" + domain + "/";
    URL retrieveUrl = new URL(domainUrlBase + "user/2.0/");
    AppsForYourDomainQuery query = new AppsForYourDomainQuery(retrieveUrl);
    query.setStartUsername(null);
    allUsers = new UserFeed();
    UserFeed currentPage;
    Link nextLink;
    do {
      currentPage = userService.query(query, UserFeed.class);
      allUsers.getEntries().addAll(currentPage.getEntries());
      nextLink = currentPage.getLink(Link.Rel.NEXT, Link.Type.ATOM);
      if (nextLink != null) {
        retrieveUrl = new URL(nextLink.getHref());
      }
    } while (nextLink != null);

View Full Code Here

    LOGGER.log(Level.INFO,
        "Retrieving all users.");

    URL retrieveUrl = new URL(domainUrlBase + "user/" + SERVICE_VERSION + "/");
    UserFeed allUsers = new UserFeed();
    UserFeed currentPage;
    Link nextLink;

    do {
      currentPage = userService.getFeed(retrieveUrl, UserFeed.class);
      allUsers.getEntries().addAll(currentPage.getEntries());
      nextLink = currentPage.getLink(Link.Rel.NEXT, Link.Type.ATOM);
      if (nextLink != null) {
        retrieveUrl = new URL(nextLink.getHref());
      }
    } while (nextLink != null);
View Full Code Here

TOP

Related Classes of com.google.gdata.data.appsforyourdomain.provisioning.UserFeed

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.