Package org.rssowl.core.persist

Examples of org.rssowl.core.persist.ILabel


    assertTrue(category.isIdentical(categories.iterator().next()));
    DynamicDAO.deleteAll(categories);
  }

  private ILabel createLabel() {
    ILabel label = fTypesFactory.createLabel(null, "someLabel");
    label.setColor("200,100,009");
    return label;
  }
View Full Code Here


        }
      };
      DynamicDAO.addEntityListener(ILabel.class, labelListener);
      long savedLabelId = DynamicDAO.save(initialLabel).getId().longValue();
      System.gc();
      ILabel dbLabel = DynamicDAO.load(ILabel.class, savedLabelId);
      initialLabel.setId(dbLabel.getId());
      assertTrue(initialLabel.isIdentical(dbLabel));
      dbLabel.setColor("255,255,137");
      updatedLabel[0] = (Label) dbLabel;
      DynamicDAO.save(dbLabel);
      assertTrue(labelAddedCalled[0]);
      assertTrue(labelUpdatedCalled[0]);
      DynamicDAO.delete(updatedLabel[0]);
View Full Code Here

  @Override
  public void run() {
    List<INews> newsList = ModelUtils.getEntities(fSelection, INews.class);
    for (INews newsItem : newsList) {
      /* Apply Label */
      ILabel label = newsItem.getLabel();
      if (label == null && fLabel != null)
        newsItem.setLabel(fLabel);
      else if (label != null && fLabel == null)
        newsItem.setLabel(null);
      else if (label != null && fLabel != null && !fLabel.equals(label))
View Full Code Here

      FolderEvent eventTemplate = (FolderEvent) template;
      IFolder oldParent = eventTemplate == null ? null : eventTemplate.getOldParent();
      modelEvent = new FolderEvent(folder, oldParent, root);
    }
    else if (entity instanceof ILabel) {
      ILabel label = (ILabel) entity;
      modelEvent = new LabelEvent(label, root);
    }
    else if (entity instanceof ISearchCondition) {
      ISearchCondition searchCond = (ISearchCondition) entity;
      modelEvent = new SearchConditionEvent(searchCond, root);
View Full Code Here

      image.getTitle();
      image.getLink();
    }

    else if (type instanceof ILabel) {
      ILabel label = (ILabel) type;
      label.getColor();
      label.getName();
    }

    else if (type instanceof IGuid) {
      IGuid guid = (IGuid) type;
      guid.getValue();
View Full Code Here

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

    ILabel label = DynamicDAO.save(fFactory.createLabel(null, "Label"));

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

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

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

    ILabel label = DynamicDAO.save(fFactory.createLabel(null, "Label"));

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

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

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

    ILabel label = DynamicDAO.save(fFactory.createLabel(null, "Label"));

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

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

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

    ILabel label = DynamicDAO.save(fFactory.createLabel(null, "Label"));

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

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

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

    ILabel label = DynamicDAO.save(fFactory.createLabel(null, "Label"));

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

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

TOP

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

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.