Examples of UserFeed


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

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

          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

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

   * @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

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

   * @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

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

    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

Examples of com.google.gdata.data.photos.UserFeed

 
  @Override
  public List<AlbumEntry> selectAlbums() throws IOException,
      ServiceException {
    URL feedUrl = new URL(getPicasaURL() + "?kind=album");
    UserFeed feed = getPicasawebService().getFeed(feedUrl, UserFeed.class);
    return feed.getAlbumEntries();
  }
View Full Code Here

Examples of com.google.gdata.data.photos.UserFeed

    service.setAuthSubToken(token);
  }

  public String getCurrentUsername() throws IOException, ServiceException {
    try {
      UserFeed userFeed = service.getFeed(new URL(USER_FEED_URL), UserFeed.class);
      return userFeed.getUsername();
    } catch (MalformedURLException e) {
      LOG.log(Level.WARNING, "", e);
    }

    return null;
View Full Code Here

Examples of com.google.gdata.data.photos.UserFeed

    try {
      URL feedUrl = new URL(ALBUM_FEED_URL);

      while (feedUrl != null) {
        UserFeed albumFeed = service.getFeed(feedUrl, UserFeed.class);
        albums.addAll(albumFeed.getAlbumEntries());
       
        Link nextLink = albumFeed.getNextLink();
        if (nextLink == null) {
          feedUrl = null;
        } else {
          feedUrl = new URL(nextLink.getHref());
        }
View Full Code Here

Examples of com.google.gdata.data.photos.UserFeed

      GoogleService.CaptchaRequiredException cre
      ) throws InvalidCredentialsException {
    return serviceHandler.handleCaptcha(service, username, password, cre);
  }
  public UserFeed getMetaFeed() {
    UserFeed metaFeed = null;
    try {
      metaFeed = service.getFeed(feedUrl, UserFeed.class);
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

Examples of com.google.gdata.data.photos.UserFeed

   
    QuickPB.initServices(prefs.getUsername());
    QuickPB.authenticateServices();
   
    Feed bloggerBlogList = bloggerServiceHandler.getMetaFeed();
    UserFeed picasaAlbumList = picasaServiceHandler.getMetaFeed();
    if(!useSavedPreferences) {
      QuickPB.getBlogInfoFromUser(bloggerBlogList);
    }
    album = picasaServiceHandler.findCorrespondingPicasaAlbum(prefs.getBlogName(), picasaAlbumList);
    if(album == null)
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.