Package org.rssowl.core.persist.dao

Examples of org.rssowl.core.persist.dao.IFeedDAO


    else {
      URI uri = link != null ? URIUtils.createURI(link) : null;
      if (uri != null) {

        /* Check if a Feed with the URL already exists */
        IFeedDAO feedDao = Owl.getPersistenceService().getDAOService().getFeedDAO();
        FeedReference feedRef = feedDao.loadReference(uri);

        /* Create a new Feed then */
        if (feedRef == null) {
          IFeed feed = Owl.getModelFactory().createFeed(null, uri);
          feed.setHomepage(homepage != null ? URIUtils.createURI(homepage) : null);
View Full Code Here


        String guid = newsEvent.getEntity().getGuid().getValue();
        assertEquals(INews.State.DELETED, newsEvent.getEntity().getState());
        assertEquals(true, guid.equals(news0Guid) || guid.equals(news2Guid));
      }

      IFeedDAO feedDao = DynamicDAO.getDAO(IFeedDAO.class);
      feed = feedDao.load(new URI(feed0Link));
      assertEquals(2, feed.getNews().size());

      feed = feedDao.load(new URI(feed1Link));
      assertEquals(2, feed.getNews().size());
    } finally {
      DynamicDAO.removeEntityListener(INews.class, newsListener);
    }
  }
View Full Code Here

      /* Generate Name from Keyword Feed if not defined */
      else
        title[0] = fKeywordPage.getSelectedEngine().getLabel(fFeedDefinitionPage.getKeyword());
    }

    IFeedDAO feedDAO = DynamicDAO.getDAO(IFeedDAO.class);

    /* Check if a Feed with the URL already exists */
    FeedReference feedRef = feedDAO.loadReference(uriObj[0]);

    /* Create a new Feed then */
    if (feedRef == null) {
      IFeed feed = Owl.getModelFactory().createFeed(null, uriObj[0]);
      feed = feedDAO.save(feed);
    }

    /* Create the BookMark */
    IFolder parent = fBookMarkDefinitionPage.getFolder();

View Full Code Here

      String title = dialog.fName;
      parent = dialog.getFolder();

      URI uriObj = new URI(dialog.fLink.trim());

      IFeedDAO feedDAO = DynamicDAO.getDAO(IFeedDAO.class);

      /* Check if a Feed with the URL already exists */
      FeedReference feedRef = feedDAO.loadReference(uriObj);

      /* Create a new Feed then */
      if (feedRef == null) {
        IFeed feed = Owl.getModelFactory().createFeed(null, uriObj);
        feed = feedDAO.save(feed);
      }

      /* Create the BookMark */
      FeedLinkReference feedLinkRef = new FeedLinkReference(uriObj);
      IBookMark bookmark = Owl.getModelFactory().createBookMark(null, parent, feedLinkRef, title, fPosition, fPosition != null ? true : null);
View Full Code Here

      String title = dialog.fName;
      parent = dialog.getFolder();

      URI uriObj = new URI(dialog.fLink.trim());

      IFeedDAO feedDAO = DynamicDAO.getDAO(IFeedDAO.class);

      /* Check if a Feed with the URL already exists */
      FeedReference feedRef = feedDAO.loadReference(uriObj);

      /* Create a new Feed then */
      if (feedRef == null) {
        IFeed feed = Owl.getModelFactory().createFeed(null, uriObj);
        feed = feedDAO.save(feed);
      }

      /* Create the BookMark */
      FeedLinkReference feedLinkRef = new FeedLinkReference(uriObj);
      IBookMark bookmark = Owl.getModelFactory().createBookMark(null, parent, feedLinkRef, title, fPosition, fPosition != null ? true : null);
View Full Code Here

    /* Load SearchMarks containing location condition */
    List<ISearchMark> locationConditionSavedSearches = getLocationConditionSavedSearches(elements);

    /* Look for Feeds in Elements and Save them if required */
    IFeedDAO feedDao = DynamicDAO.getDAO(IFeedDAO.class);
    List<URI> feedsCreated = new ArrayList<URI>();
    for (IFolderChild element : elements) {
      saveFeedsOfBookmarks(feedsCreated, element, feedDao, checkExistingFeeds);
    }

View Full Code Here

      /* Generate Name from Keyword Feed if not defined */
      else
        title[0] = fKeywordPage.getSelectedEngine().getLabel(fFeedDefinitionPage.getKeyword());
    }

    IFeedDAO feedDAO = DynamicDAO.getDAO(IFeedDAO.class);

    /* Create a new Feed */
    if (!feedDAO.exists(uriObj[0])) {
      IFeed feed = Owl.getModelFactory().createFeed(null, uriObj[0]);
      feed = feedDAO.save(feed);
    }

    /* Create the BookMark */
    IFolder parent = fBookMarkDefinitionPage.getFolder();

View Full Code Here

    /* Load SearchMarks containing location condition */
    List<ISearchMark> locationConditionSavedSearches = getLocationConditionSavedSearches(elements);

    /* Look for Feeds in Elements and Save them if required */
    IFeedDAO feedDao = DynamicDAO.getDAO(IFeedDAO.class);
    List<URI> feedsCreated = new ArrayList<URI>();
    for (IFolderChild element : elements) {
      saveFeedsOfBookmarks(feedsCreated, element, feedDao, checkExistingFeeds);
    }

View Full Code Here

        String guid = newsEvent.getEntity().getGuid().getValue();
        assertEquals(INews.State.DELETED, newsEvent.getEntity().getState());
        assertEquals(true, guid.equals(news0Guid) || guid.equals(news2Guid));
      }

      IFeedDAO feedDao = DynamicDAO.getDAO(IFeedDAO.class);
      feed = feedDao.load(new URI(feed0Link));
      assertEquals(2, feed.getNews().size());

      feed = feedDao.load(new URI(feed1Link));
      assertEquals(2, feed.getNews().size());
    } finally {
      DynamicDAO.removeEntityListener(INews.class, newsListener);
    }
  }
View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.dao.IFeedDAO

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.