Examples of FeedSubscription


Examples of com.gnizr.db.dao.FeedSubscription

  protected void tearDown() throws Exception {
    super.tearDown();
  }
 
  public void testCreateEntry1() throws Exception{
    fromSub = new FeedSubscription();
    Bookmark rssBm = new Bookmark();
    rssBm.setUser(new User("hchen1"));
    rssBm.setLink(new Link(rssUrl));
    fromSub.setBookmark(rssBm);
    fromSub.setImportFolders(new ArrayList<String>());
View Full Code Here

Examples of com.gnizr.db.dao.FeedSubscription

    assertEquals("hchen1",b.getUser().getUsername());   
  }
 
 
  public void testCreateEntry2() throws Exception{
    fromSub = new FeedSubscription();
    Bookmark rssBm = new Bookmark();
    rssBm.setUser(new User("hchen1"));
    rssBm.setLink(new Link(rssUrl));
    rssBm.setTags("tag:mycoolfeed gn:tag=geonames:21024,md tag:    ");
    fromSub.setBookmark(rssBm);
View Full Code Here

Examples of com.gnizr.db.dao.FeedSubscription

  protected IDataSet getDataSet() throws Exception {
    return new FlatXmlDataSet(TestFeedSubscribeListener.class.getResourceAsStream("/TestFeedSubscribeListener-input.xml"));
  }

  public void testDeleteBookmark() throws Exception{
    FeedSubscription sub = feedManager.getSubscription(400);
    assertNotNull(sub);
   
    boolean deleted = bookmarkManager.deleteBookmark(new Bookmark(300));
    assertTrue(deleted);
   
View Full Code Here

Examples of com.gnizr.db.dao.FeedSubscription

   
    int id = bookmarkManager.addBookmark(b);
    assertTrue((id >0));
    bookmarkManager.shutdown();
 
    FeedSubscription sub = feedManager.getSubscription(new User(1),"http://link.com/rss");
    assertNotNull(sub);
  }
View Full Code Here

Examples of com.gnizr.db.dao.FeedSubscription

    Bookmark bm = bookmarkManager.getBookmark(301);
    bm.setTags("subscribe:this abc");
    bookmarkManager.updateBookmark(bm);
    bookmarkManager.shutdown();
   
    FeedSubscription feed = feedManager.getSubscription(new User(1), "http://rss.slashdot.org/Slashdot/slashdot");
    assertNotNull(feed);
  }
View Full Code Here

Examples of com.gnizr.db.dao.FeedSubscription

      String safeTagStr = TagUtil.makeSafeTagString(tag);
      if (safeTagStr.length() > 0) {
        MachineTag mt = MachineTags.GN_TAG(safeTagStr);
        String fullSynx = mt.toString();
        String shrtSynx = mt.getPredicate()+":"+mt.getValue();
        FeedSubscription feed = feedSubscriptionManager.getSubscription(getUser(),feedUrl);
        if(feed != null){
          String tagline = feed.getBookmark().getTags();
          if(tagline.contains(fullSynx) == true){
            tagline = tagline.replace(fullSynx," ");
          }else if(tagline.contains(shrtSynx) == true){
            tagline = tagline.replace(shrtSynx, " ");
          }
          Bookmark bm = feed.getBookmark();
          bm.setTags(tagline);
          bookmarkManager.updateBookmark(bm);
        }
        doDefault();
        return INPUT;
View Full Code Here

Examples of com.gnizr.db.dao.FeedSubscription

        + feedUrl + ",feedTitle=" + feedTitle);
    if (feedUrl != null && user != null) {
      // if a feed that we asked to create already exists,
      // fetch it from the database and return SUCCESS
      try {
        FeedSubscription existFeed = feedSubscriptionManager
            .getSubscription(user, feedUrl);
        if (existFeed != null) {
          feed = existFeed;
          return SUCCESS;
        }
View Full Code Here

Examples of org.springmodules.feedxt.domain.FeedSubscription

        }
    }

    public FeedSubscription getUserSubscriptionByName(User user, String subscriptionName) throws UserNotExistentException {
        if (this.userRepository.getUserByUsername(user.getUsername()) != null) {
            FeedSubscription subscription = user.viewSubscriptionByName(subscriptionName);
            return subscription;
        } else {
            throw new UserNotExistentException("User not found: " + user);
        }
    }
View Full Code Here

Examples of org.springmodules.feedxt.domain.FeedSubscription

        response.addAction(action2);
    }
   
    private Feed getFeedFromSubscriptionName(String name) throws UserNotExistentException, CannotAccessFeedException {
        User user = this.userHolder.getUser();
        FeedSubscription subscription = this.userService.getUserSubscriptionByName(user, name);
        if (subscription != null) {
            return subscription.getFeed();
        } else {
            return null;
        }
    }
View Full Code Here

Examples of org.springmodules.feedxt.domain.FeedSubscription

                }
            }
        }
        // Convert from subscription to string:
        else if (element instanceof FeedSubscription) {
            FeedSubscription s = (FeedSubscription) element;
            result = s.getName();
        }
       
        return result;
    }
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.