Package org.rssowl.core.persist.reference

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


    fValue = value;
  }

  public synchronized NewsReference getNews() {
    return new NewsReference(fNewsId);
  }
View Full Code Here


  }

  private List<NewsReference> getRefsFromNews(List<INews> newsList) {
    List<NewsReference> newsRefs = new ArrayList<NewsReference>(newsList.size());
    for (INews news : newsList)
      newsRefs.add(new NewsReference(news.getId()));

    return newsRefs;
  }
View Full Code Here

  }

  private static List<NewsReference> getEntityIds(LongArrayList list)   {
    List<NewsReference> newsRef = new ArrayList<NewsReference>(list.size());
    for (int i = 0, c = list.size(); i < c; ++i) {
      newsRef.add(new NewsReference(list.get(i)));
    }
    return newsRef;
  }
View Full Code Here

             * an emergent way (e.g. the OS shutting down while RSSOwl is
             * running). To avoid issues, we filter out duplicate results from
             * the search. See http://dev.rssowl.org/show_bug.cgi?id=1264
             */
            if (!searchResultNewsIds.containsKey(newsId)) {
              resultList.add(new SearchHit<NewsReference>(new NewsReference(newsId), score, data));
              searchResultNewsIds.put(newsId, newsId);
            }
          } catch (IOException e) {
            Activator.safeLogError(e.getMessage(), e);
          }
View Full Code Here

         * way (e.g. the OS shutting down while RSSOwl is running). To avoid
         * issues, we filter out duplicate results from the search. See
         * http://dev.rssowl.org/show_bug.cgi?id=1264
         */
        if (!fSearchResultNewsIds.containsKey(newsId)) {
          fResultList.add(new NewsReference(newsId));
          fSearchResultNewsIds.put(newsId, newsId);
        }
      } catch (IOException e) {
        Activator.safeLogError(e.getMessage(), e);
      }
View Full Code Here

          boolean openAllNews = entityPreferences.getBoolean(DefaultPreferences.BM_OPEN_SITE_FOR_NEWS);
          boolean useExternalBrowser = fPreferences.getBoolean(DefaultPreferences.USE_DEFAULT_EXTERNAL_BROWSER) || fPreferences.getBoolean(DefaultPreferences.USE_CUSTOM_EXTERNAL_BROWSER);

          /* Only re-select if this has not the potential of opening in external Browser */
          if (!useExternalBrowser || (!openAllNews && !openEmptyNews))
            oldSelection = new StructuredSelection(new NewsReference(value));
        }

        /* Set input to News-Table if Visible */
        if (!fBgMonitor.isCanceled() && isTableViewerVisible())
          stableSetInputToNewsTable(mark, oldSelection);
View Full Code Here

          if (monitor.isCanceled())
            return;

          Set<NewsReference> newsOfMarkToDelete = new HashSet<NewsReference>();
          for (int i = 0; i < resolvedNews.size() && i < toDeleteValue; i++)
            newsOfMarkToDelete.add(new NewsReference(resolvedNews.get(i).getId()));

          if (!newsOfMarkToDelete.isEmpty() && !monitor.isCanceled()) {
            newsToDelete.put(mark, newsOfMarkToDelete);
            group.addTask(new NewsTask(group, mark, newsOfMarkToDelete));
          }
View Full Code Here

          }
        }
      };
      DynamicDAO.addEntityListener(INews.class, newsListener);

      Owl.getPersistenceService().getDAOService().getNewsDAO().setState(Arrays.asList(new INews[] { new NewsReference(news1ID).resolve() }), INews.State.READ, true, false);

      assertEquals(1, newsCounter.getUnreadCount(news1.getFeedLinkAsText()));
      assertEquals(1, newsCounter.getNewCount(news1.getFeedLinkAsText()));
      assertEquals(1, newsCounter.getUnreadCount(news2.getFeedLinkAsText()));
      assertEquals(1, newsCounter.getNewCount(news2.getFeedLinkAsText()));
View Full Code Here

        elements.add(object);
      }

      /* This is a NewsReference */
      else if (object instanceof NewsReference) {
        NewsReference newsRef = (NewsReference) object;
        INews news = obtainFromCache(newsRef);
        if (news != null)
          elements.add(news);
      }

View Full Code Here

      protected void runInBackground(IProgressMonitor monitor) {
        List<?> input = (List<?>) fResultViewer.getInput();
        for (NewsEvent event : events) {
          for (Object object : input) {
            ScoredNews scoredNews = ((ScoredNews) object);
            NewsReference newsRef = scoredNews.getNewsReference();

            /* Return on Cancellation or Shutdown */
            if (monitor.isCanceled() || Controller.getDefault().isShuttingDown())
              return;

            /* News is part of the list */
            if (newsRef.references(event.getEntity())) {
              INews news = event.getEntity();

              /* News got Deleted */
              if (!news.isVisible()) {
                if (fDeletedScoredNews == null)
View Full Code Here

TOP

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

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.