Package org.rssowl.core.model.preferences

Examples of org.rssowl.core.model.preferences.IPreferencesScope


      else if (mark.getName().equals("BookMark3"))
        bookMark3 = (IBookMark) mark;
    }

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookMark1);
    IPreferencesScope prefs2 = NewsModel.getDefault().getEntityScope(bookMark2);
    IPreferencesScope prefs3 = NewsModel.getDefault().getEntityScope(bookMark3);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);
    prefs2.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);
    prefs3.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);
    prefs1.putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);
    prefs2.putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);
    prefs3.putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 20);
    prefs2.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 40);
    prefs3.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 80);
    RetentionStrategy.process(folder);
    assertEquals(60, countNews(folder));
    assertEquals(20, countNews(bookMark1));
    assertEquals(40, countNews(bookMark2));
    assertEquals(0, countNews(bookMark3));
View Full Code Here


      else if (mark.getName().equals("BookMark3"))
        bookMark3 = (IBookMark) mark;
    }

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookMark1);
    IPreferencesScope prefs2 = NewsModel.getDefault().getEntityScope(bookMark2);
    IPreferencesScope prefs3 = NewsModel.getDefault().getEntityScope(bookMark3);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_AGE_STATE, true);
    prefs2.putBoolean(DefaultPreferences.DEL_NEWS_BY_AGE_STATE, true);
    prefs3.putBoolean(DefaultPreferences.DEL_NEWS_BY_AGE_STATE, true);
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);
    prefs2.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);
    prefs3.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);
    prefs1.putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);
    prefs2.putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);
    prefs3.putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_AGE_VALUE, 20);
    prefs2.putInteger(DefaultPreferences.DEL_NEWS_BY_AGE_VALUE, 20);
    prefs3.putInteger(DefaultPreferences.DEL_NEWS_BY_AGE_VALUE, 20);
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 20);
    prefs2.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 40);
    prefs3.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 80);
    RetentionStrategy.process(folder);
    assertEquals(60, countNews(folder));
    assertEquals(20, countNews(bookMark1));
    assertEquals(40, countNews(bookMark2));
    assertEquals(0, countNews(bookMark3));
View Full Code Here

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

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_AGE_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_AGE_VALUE, 5);
    RetentionStrategy.process(bookmark);
    assertEquals(0, countNews(folder));
    assertEquals(0, countNews(bookmark));
  }
View Full Code Here

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

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);

    /* Run and Validate Retention */
    RetentionStrategy.process(bookmark);
    assertEquals(80, countNews(folder));
    assertEquals(80, countNews(bookmark));
View Full Code Here

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

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 50);
    RetentionStrategy.process(bookmark);
    assertEquals(50, countNews(folder));
    assertEquals(50, countNews(bookmark));
  }
View Full Code Here

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

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_AGE_STATE, true);
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_AGE_VALUE, 5);
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 50);
    RetentionStrategy.process(bookmark);
    assertEquals(0, countNews(folder));
    assertEquals(0, countNews(bookmark));
  }
View Full Code Here

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

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_AGE_STATE, true);
    prefs1.putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_AGE_VALUE, 5);
    RetentionStrategy.process(bookmark);
    assertEquals(0, countNews(folder));
    assertEquals(0, countNews(bookmark));
  }
View Full Code Here

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

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);
    prefs1.putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 50);
    RetentionStrategy.process(bookmark);
    assertEquals(50, countNews(folder));
    assertEquals(50, countNews(bookmark));
  }
View Full Code Here

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

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_AGE_STATE, true);
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);
    prefs1.putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_AGE_VALUE, 5);
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 50);
    RetentionStrategy.process(bookmark);
    assertEquals(0, countNews(folder));
    assertEquals(0, countNews(bookmark));
  }
View Full Code Here

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

    /* Preferences */
    IPreferencesScope prefs1 = NewsModel.getDefault().getEntityScope(bookmark);

    /* Setup Retention */
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_AGE_STATE, true);
    prefs1.putBoolean(DefaultPreferences.DEL_NEWS_BY_COUNT_STATE, true);
    prefs1.putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);

    /* Run and Validate Retention */
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_AGE_VALUE, 5);
    prefs1.putInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE, 50);
    RetentionStrategy.process(bookmark);
    assertEquals(10, countNews(folder));
    assertEquals(10, countNews(bookmark));
  }
View Full Code Here

TOP

Related Classes of org.rssowl.core.model.preferences.IPreferencesScope

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.