Package org.rssowl.core.model.reference

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


    NewsModel.getDefault().getPersistenceLayer().recreateSchema();
  }
 
  private int getNewCount(IFeed feed) {
    NewsService service = Controller.getDefault().getNewsService();
    return service.getNewCount(new FeedLinkReference(feed.getLink()));
  }
View Full Code Here


    return service.getNewCount(new FeedLinkReference(feed.getLink()));
  }
 
  private int getUnreadCount(IFeed feed) {
    NewsService service = Controller.getDefault().getNewsService();
    return service.getUnreadCount(new FeedLinkReference(feed.getLink()));
  }
View Full Code Here

  @Test
  public void testAddAndDeleteFeed2() {
    try {
      IFeed feed = createFeed();
      feed = fModelDAO.saveFeed(feed);
      fModelDAO.deleteFeed(new FeedLinkReference(feed.getLink()));
      assertNull(fModelDAO.loadFeed(feed.getId()));
    } catch (PersistenceException e) {
      fail(e.getMessage());
    }
  }
View Full Code Here

  @Test
  public void testFeedLinkReferenceEqualsAndHashCode() throws Exception {
    String url1 = "http://url1.com";
    String url3 = "http://url3.com";
   
    FeedLinkReference feedRef1 = new FeedLinkReference(new URL(url1));
    FeedLinkReference feedRef2 = new FeedLinkReference(new URL(url1));
   
    assertEquals(feedRef1, feedRef2);
    assertEquals(feedRef1.hashCode(), feedRef2.hashCode());
   
    FeedLinkReference feedRef3 = new FeedLinkReference(new URL(url3));
    assertFalse(feedRef1.equals(feedRef3));
    assertFalse(feedRef1.hashCode() == feedRef3.hashCode());
  }
View Full Code Here

        NewsModel.getDefault().removeAttachmentListener(attachmentListener);
    }
  }
 
  private int getNewCount(IFeed feed) {
    return fService.getNewCount(new FeedLinkReference(feed.getLink()));
  }
View Full Code Here

  private int getNewCount(IFeed feed) {
    return fService.getNewCount(new FeedLinkReference(feed.getLink()));
  }
 
  private int getUnreadCount(IFeed feed) {
    return fService.getUnreadCount(new FeedLinkReference(feed.getLink()));
  }
View Full Code Here

    super(id, folder, name);
    Assert.isNotNull(feedRef, "The type BookMark requires a Feed that is not NULL"); //$NON-NLS-1$
    Assert.isNotNull(feedLink, "feedLink cannot be null"); //$NON-NLS-1$
    fFeedId = feedRef.getId();
    fFeedLink = feedLink.toString();
    fFeedLinkReference = new FeedLinkReference(feedLink);
  }
View Full Code Here

  }
 
  public FeedLinkReference getFeedLinkReference() {
    if (fFeedLinkReference == null) {
      try {
        fFeedLinkReference = new FeedLinkReference(new URL(fFeedLink));
      } catch (MalformedURLException e) {
        throw new IllegalStateException("Malformed URL was stored somehow: " + fFeedLink); //$NON-NLS-1$
      }
    }
    return fFeedLinkReference;
View Full Code Here

   * @see org.rssowl.core.model.types.INews#getFeed()
   */
  public synchronized FeedLinkReference getFeedReference() {
    if (fFeedLinkReference == null) {
      try {
        fFeedLinkReference = new FeedLinkReference(new URL(fFeedLink));
      } catch (MalformedURLException e) {
        throw new IllegalStateException("A Malformed URL was stored somehow", e); //$NON-NLS-1$
      }
    }
    return fFeedLinkReference;
View Full Code Here

    assertEquals(true, new BookMarkReference(bookmark.getId()).resolve().isErrorLoading());
  }
 
  private int getNewCount(IFeed feed) {
    NewsService service = Controller.getDefault().getNewsService();
    return service.getNewCount(new FeedLinkReference(feed.getLink()));
  }
View Full Code Here

TOP

Related Classes of org.rssowl.core.model.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.