Package org.rssowl.core.persist

Examples of org.rssowl.core.persist.IFolder


   */
  @Test
  public void testProcessFolderByAgeAndState() throws Exception {
    long today = DateUtils.getToday().getTimeInMillis();

    IFolder folder = DynamicDAO.save(fFactory.createFolder(null, null, "Root"));

    IFeed feed1 = createFeedWithNews(new URI("http://www.url1.com"), 100, 0, today - DAY, today + 5 * HOUR, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed1.getLink()), "BookMark1");

    IFeed feed2 = createFeedWithNews(new URI("http://www.url2.com"), 100, 50, today - 7 * DAY, today + 8 * HOUR, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed2.getLink()), "BookMark2");

    IFeed feed3 = createFeedWithNews(new URI("http://www.url3.com"), 100, 100, today - 31 * DAY, today - 25 * DAY, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed3.getLink()), "BookMark3");

    DynamicDAO.save(folder);

    IBookMark bookMark1 = null, bookMark2 = null, bookMark3 = null;
    List<IMark> marks = folder.getMarks();
    for (IMark mark : marks) {
      if (mark.getName().equals("BookMark1"))
        bookMark1 = (IBookMark) mark;
      else if (mark.getName().equals("BookMark2"))
        bookMark2 = (IBookMark) mark;
View Full Code Here


   */
  @Test
  public void testProcessFolderByCountAndState() throws Exception {
    long today = DateUtils.getToday().getTimeInMillis();

    IFolder folder = DynamicDAO.save(fFactory.createFolder(null, null, "Root"));

    IFeed feed1 = createFeedWithNews(new URI("http://www.url1.com"), 100, 0, today - DAY, today + 5 * HOUR, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed1.getLink()), "BookMark1");

    IFeed feed2 = createFeedWithNews(new URI("http://www.url2.com"), 100, 50, today - 7 * DAY, today + 8 * HOUR, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed2.getLink()), "BookMark2");

    IFeed feed3 = createFeedWithNews(new URI("http://www.url3.com"), 100, 100, today - 31 * DAY, today - 25 * DAY, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed3.getLink()), "BookMark3");

    DynamicDAO.save(folder);

    IBookMark bookMark1 = null, bookMark2 = null, bookMark3 = null;
    List<IMark> marks = folder.getMarks();
    for (IMark mark : marks) {
      if (mark.getName().equals("BookMark1"))
        bookMark1 = (IBookMark) mark;
      else if (mark.getName().equals("BookMark2"))
        bookMark2 = (IBookMark) mark;
View Full Code Here

   */
  @Test
  public void testProcessFolderByAgeAndCountAndState() throws Exception {
    long today = DateUtils.getToday().getTimeInMillis();

    IFolder folder = DynamicDAO.save(fFactory.createFolder(null, null, "Root"));

    IFeed feed1 = createFeedWithNews(new URI("http://www.url1.com"), 100, 0, today - DAY, today + 5 * HOUR, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed1.getLink()), "BookMark1");

    IFeed feed2 = createFeedWithNews(new URI("http://www.url2.com"), 100, 50, today - 7 * DAY, today + 8 * HOUR, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed2.getLink()), "BookMark2");

    IFeed feed3 = createFeedWithNews(new URI("http://www.url3.com"), 100, 100, today - 31 * DAY, today - 25 * DAY, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed3.getLink()), "BookMark3");

    DynamicDAO.save(folder);

    IBookMark bookMark1 = null, bookMark2 = null, bookMark3 = null;
    List<IMark> marks = folder.getMarks();
    for (IMark mark : marks) {
      if (mark.getName().equals("BookMark1"))
        bookMark1 = (IBookMark) mark;
      else if (mark.getName().equals("BookMark2"))
        bookMark2 = (IBookMark) mark;
View Full Code Here

   */
  @Test
  public void testProcessBookMarkByAge() throws Exception {
    long today = DateUtils.getToday().getTimeInMillis();

    IFolder folder = DynamicDAO.save(fFactory.createFolder(null, null, "Root"));

    IFeed feed = createFeedWithNews(new URI("http://www.url.com"), 100, 20, today - 7 * DAY, today - 6 * DAY, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed.getLink()), "BookMark1");

    DynamicDAO.save(folder);

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(100, countNews(bookmark));

    /* Preferences */
    IPreferenceScope prefs1 = Owl.getPreferenceService().getEntityScope(bookmark);

View Full Code Here

   */
  @Test
  public void testProcessBookMarkByState() throws Exception {
    long today = DateUtils.getToday().getTimeInMillis();

    IFolder folder = DynamicDAO.save(fFactory.createFolder(null, null, "Root"));

    IFeed feed = createFeedWithNews(new URI("http://www.url.com"), 100, 20, today - 7 * DAY, today - 6 * DAY, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed.getLink()), "BookMark1");

    DynamicDAO.save(folder);

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(100, countNews(bookmark));

    /* Preferences */
    IPreferenceScope prefs1 = Owl.getPreferenceService().getEntityScope(bookmark);

View Full Code Here

   */
  @Test
  public void testProcessBookMarkByCount() throws Exception {
    long today = DateUtils.getToday().getTimeInMillis();

    IFolder folder = DynamicDAO.save(fFactory.createFolder(null, null, "Root"));

    IFeed feed = createFeedWithNews(new URI("http://www.url.com"), 100, 20, today - 7 * DAY, today - 6 * DAY, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed.getLink()), "BookMark1");

    DynamicDAO.save(folder);

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(100, countNews(bookmark));

    /* Preferences */
    IPreferenceScope prefs1 = Owl.getPreferenceService().getEntityScope(bookmark);

View Full Code Here

   */
  @Test
  public void testProcessBookMarkByAgeAndCount() throws Exception {
    long today = DateUtils.getToday().getTimeInMillis();

    IFolder folder = DynamicDAO.save(fFactory.createFolder(null, null, "Root"));

    IFeed feed = createFeedWithNews(new URI("http://www.url.com"), 100, 20, today - 7 * DAY, today - 6 * DAY, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed.getLink()), "BookMark1");

    DynamicDAO.save(folder);

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(100, countNews(bookmark));

    /* Preferences */
    IPreferenceScope prefs1 = Owl.getPreferenceService().getEntityScope(bookmark);

View Full Code Here

   */
  @Test
  public void testProcessBookMarkByAgeAndState() throws Exception {
    long today = DateUtils.getToday().getTimeInMillis();

    IFolder folder = DynamicDAO.save(fFactory.createFolder(null, null, "Root"));

    IFeed feed = createFeedWithNews(new URI("http://www.url.com"), 100, 20, today - 7 * DAY, today - 6 * DAY, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed.getLink()), "BookMark1");

    DynamicDAO.save(folder);

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(100, countNews(bookmark));

    /* Preferences */
    IPreferenceScope prefs1 = Owl.getPreferenceService().getEntityScope(bookmark);

View Full Code Here

   */
  @Test
  public void testProcessBookMarkByCountAndState() throws Exception {
    long today = DateUtils.getToday().getTimeInMillis();

    IFolder folder = DynamicDAO.save(fFactory.createFolder(null, null, "Root"));

    IFeed feed = createFeedWithNews(new URI("http://www.url.com"), 100, 20, today - 7 * DAY, today - 6 * DAY, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed.getLink()), "BookMark1");

    DynamicDAO.save(folder);

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(100, countNews(bookmark));

    /* Preferences */
    IPreferenceScope prefs1 = Owl.getPreferenceService().getEntityScope(bookmark);

View Full Code Here

   */
  @Test
  public void testProcessBookMarkByAgeAndCountAndState() throws Exception {
    long today = DateUtils.getToday().getTimeInMillis();

    IFolder folder = DynamicDAO.save(fFactory.createFolder(null, null, "Root"));

    IFeed feed = createFeedWithNews(new URI("http://www.url.com"), 100, 20, today - 7 * DAY, today - 6 * DAY, 0);
    fFactory.createBookMark(null, folder, new FeedLinkReference(feed.getLink()), "BookMark1");

    DynamicDAO.save(folder);

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(100, countNews(bookmark));

    /* Preferences */
    IPreferenceScope prefs1 = Owl.getPreferenceService().getEntityScope(bookmark);

View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.IFolder

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.