Package org.rssowl.core.persist.INews

Examples of org.rssowl.core.persist.INews.State


    StringBuilder builder = getBuilder(news);
    StringBuilder search = new StringBuilder();

    String newsTitle = ModelUtils.getHeadline(news);
    boolean hasLink = news.getLink() != null;
    State state = news.getState();
    boolean isUnread = (state == State.NEW || state == State.UPDATED || state == State.UNREAD);
    String color = (news.getLabel() != null) ? news.getLabel().getColor() : null;

    /* DIV: NewsItem */
    div(builder, "newsitem");
View Full Code Here


    StringBuilder search = new StringBuilder();

    String newsTitle = CoreUtils.getHeadline(news, false);
    String newsLink = CoreUtils.getLink(news);
    boolean hasLink = newsLink != null;
    State state = news.getState();
    boolean isUnread = (state == State.NEW || state == State.UPDATED || state == State.UNREAD);
    Set<ILabel> labels = CoreUtils.getSortedLabels(news);
    String color = !labels.isEmpty() ? labels.iterator().next().getColor() : null;
    if ("0,0,0".equals(color) || "255,255,255".equals(color)) //Don't let black or white override link color //$NON-NLS-1$ //$NON-NLS-2$
      color = null;
View Full Code Here

    StringBuilder builder = getBuilder(news);
    StringBuilder search = new StringBuilder();

    String newsTitle = ModelUtils.getHeadline(news);
    boolean hasLink = news.getLink() != null;
    State state = news.getState();
    boolean isUnread = (state == State.NEW || state == State.UPDATED || state == State.UNREAD);
    String color = !news.getLabels().isEmpty() ? news.getLabels().iterator().next().getColor() : null;

    /* DIV: NewsItem */
    div(builder, "newsitem");
View Full Code Here

    news = CoreUtils.replace(news, replacements);

    /* Run Filter */
    List<IEntity> entitiesToSave = new ArrayList<IEntity>(news.size());
    for (INews newsitem : news) {
      State state = newsitem.getState();
      if (state == INews.State.NEW || state == INews.State.READ || state == INews.State.UPDATED) {
        newsitem.setState(INews.State.UNREAD);
        entitiesToSave.add(newsitem);
      }
    }
View Full Code Here

    news = CoreUtils.replace(news, replacements);

    /* Run Filter */
    List<IEntity> entitiesToSave = new ArrayList<IEntity>(news.size());
    for (INews newsitem : news) {
      State state = newsitem.getState();
      if (state == INews.State.NEW || state == INews.State.UNREAD || state == INews.State.UPDATED) {
        newsitem.setState(INews.State.READ);
        entitiesToSave.add(newsitem);
      }
    }
View Full Code Here

            text = str.toString();
          }
          break;

        case STATUS:
          State state = news.getState();
          if (state == State.NEW)
            text = Messages.NewsTableLabelProvider_NEW;
          else if (state == State.UNREAD)
            text = Messages.NewsTableLabelProvider_UNREAD;
          else if (state == State.UPDATED)
View Full Code Here

            text = str.toString();
          }
          break;

        case STATUS:
          State state = news.getState();
          if (state == State.NEW)
            text = Messages.NewsTableLabelProvider_NEW;
          else if (state == State.UNREAD)
            text = Messages.NewsTableLabelProvider_UNREAD;
          else if (state == State.UPDATED)
View Full Code Here

  public static boolean changedFromReadToUnread(Collection<? extends ModelEvent> events) {
    for (ModelEvent event : events) {
      if (event instanceof NewsEvent) {
        NewsEvent newsEvent = (NewsEvent) event;
        boolean oldStateRead = INews.State.READ.equals(newsEvent.getOldNews() != null ? newsEvent.getOldNews().getState() : null);
        State currentState = newsEvent.getEntity().getState();
        boolean currentStateNewUnreadUpdated = INews.State.NEW.equals(currentState) || INews.State.UNREAD.equals(currentState) || INews.State.UPDATED.equals(currentState);

        if (oldStateRead && currentStateNewUnreadUpdated)
          return true;
      }
View Full Code Here

    if (!fHeadlinesOnly && isVisible)
      description = stripMediaTagsIfNecessary(news.getDescription());

    StringBuilder builder = getBuilder(news, description);

    State state = news.getState();
    boolean isUnread = (state == State.NEW || state == State.UPDATED || state == State.UNREAD);

    /* DIV: NewsItem (as needed) */
    if (!onlyInnerContent) {
      StringBuilder extraCSS = new StringBuilder();
View Full Code Here

    news = CoreUtils.replace(news, replacements);

    /* Run Filter */
    List<IEntity> entitiesToSave = new ArrayList<IEntity>(news.size());
    for (INews newsitem : news) {
      State state = newsitem.getState();
      if (state == INews.State.NEW || state == INews.State.READ || state == INews.State.UPDATED) {
        newsitem.setState(INews.State.UNREAD);
        entitiesToSave.add(newsitem);
      }
    }
View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.INews.State

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.