Package org.rssowl.core.persist.reference

Examples of org.rssowl.core.persist.reference.FeedLinkReference


        if (fInput.getMark() instanceof ISearchMark || events.size() == 0)
          return;

        /* Check if Feed-Event affecting us */
        for (FeedEvent event : events) {
          FeedLinkReference feedRef = ((IBookMark) fInput.getMark()).getFeedLinkReference();
          if (feedRef.references(event.getEntity())) {
            ImageDescriptor imageDesc = fInput.getImageDescriptor();

            /* Title Image Change - Update! */
            if (!fTitleImageDescriptor.equals(imageDesc)) {
              fTitleImageDescriptor = imageDesc;
View Full Code Here


    news0.setLink(newsLink);
    news0.setState(INews.State.READ);
    DynamicDAO.save(feed0);

    IFolder folder = fFactory.createFolder(null, null, "Folder");
    IBookMark mark0 = fFactory.createBookMark(null, folder, new FeedLinkReference(feed0.getLink()), "Mark0");
    DynamicDAO.save(folder);
    fAppService.handleFeedReload(mark0, feed0, null, false);

    IFeed feed1 = fFactory.createFeed(null, new URI("http://www.feed1.com"));
    DynamicDAO.save(feed1);
    IBookMark mark1 = fFactory.createBookMark(null, folder, new FeedLinkReference(feed1.getLink()), "Mark1");
    DynamicDAO.save(folder);

    feed1 = fFactory.createFeed(null, new URI("http://www.feed1.com"));
    INews news1 = fFactory.createNews(null, feed1, new Date());
    news1.setLink(newsLink);
View Full Code Here

   */
  @Test
  public void testHandleFeedReloadWithRetentionStrategy() throws Exception {
    IFeed feed = fFactory.createFeed(null, new URI("http://www.rssowl.org"));
    IFolder folder = fFactory.createFolder(null, null, "Folder");
    IBookMark mark = fFactory.createBookMark(null, folder, new FeedLinkReference(feed.getLink()), "Mark");
    DynamicDAO.save(feed);
    DynamicDAO.save(folder);

    IFeed emptyFeed = fFactory.createFeed(null, feed.getLink());
    INews news = fFactory.createNews(null, emptyFeed, new Date());
View Full Code Here

      IFeed feed = fFactory.createFeed(null, new URI("http://www.rssowl.org"));
      INews news = fFactory.createNews(null, feed, new Date());
      news.setGuid(fFactory.createGuid(news, "newsguid"));
      fFactory.createAttachment(null, news);
      IFolder folder = fFactory.createFolder(null, null, "Folder");
      IBookMark mark = fFactory.createBookMark(null, folder, new FeedLinkReference(feed.getLink()), "Mark");
      DynamicDAO.save(feed);
      DynamicDAO.save(folder);

      IFeed emptyFeed = fFactory.createFeed(null, feed.getLink());
      INews emptyNews = fFactory.createNews(null, emptyFeed, new Date());
View Full Code Here

    BookMarkListener bookMarkListener = null;
    SearchMarkListener searchMarkListener = null;
    try {
      /* Add */
      final IFolder oldMarkParent = fFactory.createFolder(null, null, "Old parent");
      final IBookMark bookMark = fFactory.createBookMark(null, oldMarkParent, new FeedLinkReference(new URI("http://www.link.com")), "bookmark");
      final ISearchMark searchMark = fFactory.createSearchMark(null, oldMarkParent, "searchmark");
      DynamicDAO.save(oldMarkParent);

      final IFolder newMarkParent = fFactory.createFolder(null, null, "New parent");
      fFactory.createFolder(null, newMarkParent, "New parent child");
View Full Code Here

   */
  @Test
  public void testLoadBookMarks() throws Exception {
    IFeed feed = fFactory.createFeed(null, new URI("http://www.myfeed.com"));
    DynamicDAO.save(feed);
    FeedLinkReference feedLinkRef = new FeedLinkReference(feed.getLink());

    Collection<IBookMark> emptyBookmarks = Owl.getPersistenceService().getDAOService().getBookMarkDAO().loadAll(feedLinkRef);
    assertEquals(0, emptyBookmarks.size());

    IFolder root1 = fFactory.createFolder(null, null, "Root 1");
    FolderReference root1Ref = new FolderReference(DynamicDAO.save(root1).getId());

    IFolder childOfRoot1 = fFactory.createFolder(null, root1Ref.resolve(), "Child of Root 1");
    FolderReference childOfRoot1Ref = new FolderReference(DynamicDAO.save(childOfRoot1).getId());

    IBookMark bookmark1 = fFactory.createBookMark(null, root1Ref.resolve(), new FeedLinkReference(feed.getLink()), "Bookmark 1");
    IBookMark bookmark2 = fFactory.createBookMark(null, root1Ref.resolve(), new FeedLinkReference(feed.getLink()), "Bookmark 2");
    IBookMark bookmark3 = fFactory.createBookMark(null, childOfRoot1Ref.resolve(), new FeedLinkReference(feed.getLink()), "Bookmark 3");

    BookMarkReference bookmarkRef1 = new BookMarkReference(DynamicDAO.save(bookmark1).getId());
    BookMarkReference bookmarkRef2 = new BookMarkReference(DynamicDAO.save(bookmark2).getId());
    BookMarkReference bookmarkRef3 = new BookMarkReference(DynamicDAO.save(bookmark3).getId());

View Full Code Here

    IFeed feed = fFactory.createFeed(null, new URI("http://www.myfeed.com"));
    FeedReference feedRef = new FeedReference(DynamicDAO.save(feed).getId());
    long feedId = feedRef.getId();
    IFolder root1 = fFactory.createFolder(null, null, "Root 1");
    final String folderName = root1.getName();
    fFactory.createBookMark(null, root1, new FeedLinkReference(feed.getLink()), "Bookmark 1");
    feedRef = null;
    feed = null;
    DynamicDAO.save(root1);
    root1 = null;
    System.gc();

    feed = DynamicDAO.load(IFeed.class, feedId);
    FeedLinkReference feedLinkRef = new FeedLinkReference(feed.getLink());
    Collection<IBookMark> marks = Owl.getPersistenceService().getDAOService().getBookMarkDAO().loadAll(feedLinkRef);
    assertEquals(1, marks.size());
    assertEquals(folderName, marks.iterator().next().getParent().getName());
    marks = null;
    System.gc();
View Full Code Here

    root1 = DynamicDAO.save(root1);

    IFolder childOfRoot1 = fFactory.createFolder(null, root1, "Child of Root 1");
    childOfRoot1 = DynamicDAO.save(childOfRoot1);

    IBookMark bookmark1 = fFactory.createBookMark(null, root1, new FeedLinkReference(feed.getLink()), "Bookmark 1");
    IBookMark bookmark2 = fFactory.createBookMark(null, root1, new FeedLinkReference(feed.getLink()), "Bookmark 2");
    IBookMark bookmark3 = fFactory.createBookMark(null, childOfRoot1, new FeedLinkReference(feed.getLink()), "Bookmark 3");

    BookMarkReference bookmarkRef1 = new BookMarkReference(DynamicDAO.save(bookmark1).getId());
    BookMarkReference bookmarkRef2 = new BookMarkReference(DynamicDAO.save(bookmark2).getId());
    BookMarkReference bookmarkRef3 = new BookMarkReference(DynamicDAO.save(bookmark3).getId());
View Full Code Here

    IFeed feed = fFactory.createFeed(null, new URI("http://www.myfeed.com"));
    DynamicDAO.save(feed);

    IFolder root1 = fFactory.createFolder(null, null, "Root 1");
    final String folderName = root1.getName();
    fFactory.createBookMark(null, root1, new FeedLinkReference(feed.getLink()), "Bookmark 1");
    feed = null;
    DynamicDAO.save(root1);
    root1 = null;
    System.gc();
View Full Code Here

 
  @Test
  public void testLoadAllNewsByFeedAndState() throws Exception {
    IFeed feed = fFactory.createFeed(null, new URI("http://www.feed.com"));
    INews news = fFactory.createNews(null, feed, new Date());
    FeedLinkReference feedRef = news.getFeedReference();
    news.setState(INews.State.HIDDEN);
    fFactory.createNews(null, feed, new Date()).setState(INews.State.UNREAD);
    fFactory.createNews(null, feed, new Date()).setState(INews.State.UPDATED);
    DynamicDAO.save(feed);
   
    IFeed anotherFeed = fFactory.createFeed(null, new URI("http://www.anotherfeed.com"));
    INews anotherNews = fFactory.createNews(null, anotherFeed, new Date());
    FeedLinkReference anotherFeedRef = anotherNews.getFeedReference();
    fFactory.createNews(null, anotherFeed, new Date());
    fFactory.createNews(null, anotherFeed, new Date()).setState(INews.State.DELETED);
    DynamicDAO.save(anotherFeed);

    INewsDAO newsDao = DynamicDAO.getDAO(INewsDAO.class);
View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.reference.FeedLinkReference

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.