Examples of ICategory


Examples of org.eclipse.ui.activities.ICategory

   *            the id to fetch.
   * @return return all ids for activities that are in the given in the
   *         category.
   */
  private Collection getCategoryActivityIds(String categoryId) {
    ICategory category = activitySupport.getCategory(
        categoryId);
    Set activityBindings = category.getCategoryActivityBindings();
    List categoryActivities = new ArrayList(activityBindings.size());
    for (Iterator i = activityBindings.iterator(); i.hasNext();) {
      ICategoryActivityBinding binding = (ICategoryActivityBinding) i
          .next();
      String activityId = binding.getActivityId();
View Full Code Here

Examples of org.rssowl.core.model.types.ICategory

//    fDb = DBManager.getDefault().getObjectContainer();
  }

  private ICategory createFeedCategory() throws PersistenceException {
    IFeed feed = fModelDAO.saveFeed(createFeed());
    ICategory category = fTypesFactory.createCategory(null, feed);
    category.setName("categoryName");
    category.setDomain("some/domain");
    category.setProperty("one_property", "value");
    return category;
  }
View Full Code Here

Examples of org.rssowl.core.model.types.ICategory

  }

  private ICategory createNewsCategory() throws PersistenceException {
    IFeed feed = fModelDAO.saveFeed(createFeed());
    INews news = fModelDAO.saveNews(createNews(feed));
    ICategory category = fTypesFactory.createCategory(null, news);
    category.setName("categoryName");
    category.setDomain("some/domain");
    category.setProperty("one_property", "value");
    return category;
  }
View Full Code Here

Examples of org.rssowl.core.model.types.ICategory

   * and fails if an exception is thrown.
   */
  @Test
  public void testAddAndDeleteFeedCategory() {
    try {
      ICategory category = createFeedCategory();
      ICategory savedCategory = fModelDAO.saveCategory(category);
      fModelDAO.deleteCategory(new CategoryReference(savedCategory.getId()));
    } catch (PersistenceException e) {
      fail(e.getMessage());
    }
  }
View Full Code Here

Examples of org.rssowl.core.model.types.ICategory

   * and fails if an exception is thrown.
   */
  @Test
  public void testAddAndDeleteNewsCategory() {
    try {
      ICategory category = createNewsCategory();
      ICategory savedCategory = fModelDAO.saveCategory(category);
      fModelDAO.deleteCategory(new CategoryReference(savedCategory.getId()));
    } catch (PersistenceException e) {
      fail(e.getMessage());
    }
  }
View Full Code Here

Examples of org.rssowl.core.model.types.ICategory

    news.setLink(new URI("http://news.com"));
    fFactory.createCategory(null, news);
    INews anotherNews = fFactory.createNews(null, feed, new Date());
    anotherNews.setLink(new URI("http://anothernews.com"));
    fFactory.createCategory(null, anotherNews);
    ICategory category = fFactory.createCategory(null, anotherNews);
    category.setName("name");
    news.merge(anotherNews);
  }
View Full Code Here

Examples of org.rssowl.core.model.types.ICategory

  public void testFeedWithCategoriesMerge() throws Exception    {
    IFeed feed = fFactory.createFeed(null, new URL("http://www.feed.com"));
    fFactory.createCategory(null, feed);
    IFeed anotherFeed = fFactory.createFeed(null, new URL("http://www.feed.com"));
    fFactory.createCategory(null, anotherFeed);
    ICategory category = fFactory.createCategory(null, anotherFeed);
    category.setName("name");
    feed.merge(anotherFeed);
  }
View Full Code Here

Examples of org.rssowl.core.model.types.ICategory

        }
      };
      fModel.addPersonListener(personListener);

      /* Check Category Added */
      final ICategory category1 = fFactory.createCategory(null, news1);
      category1.setName("Category1");
      final ICategory category2 = fFactory.createCategory(null, news2);
      category2.setName("Category2");
      final boolean categoryAdded[] = new boolean[2];
      categoryListener = new CategoryAdapter() {
        @Override
        public void categoryAdded(Set<CategoryEvent> events) {
          for (CategoryEvent event : events) {
            assertFalse("Expected this Event to be no Root Event", event.isRoot());

            ICategory category = event.getEntity();

            if (category.getName().equals(category1.getName()))
              categoryAdded[0] = true;

            else if (category.getName().equals(category2.getName()))
              categoryAdded[1] = true;

          }
        }
      };
View Full Code Here

Examples of org.rssowl.core.model.types.ICategory

        }
      };
      fModel.addAttachmentListener(attachmentListener);

      /* Check Category Added */
      final ICategory category = fFactory.createCategory(null, news);
      category.setName("Category 1");
      final boolean categoryAdded[] = new boolean[1];
      categoryListener = new CategoryAdapter() {
        @Override
        public void categoryAdded(Set<CategoryEvent> events) {
          for (CategoryEvent event : events) {
            assertFalse("Expected this Event to be no Root Event", event.isRoot());
            if (event.getEntity().getName().equals(category.getName()))
              categoryAdded[0] = true;
          }
        }
      };
      fModel.addCategoryListener(categoryListener);
View Full Code Here

Examples of org.rssowl.core.model.types.ICategory

        }
      };
      fModel.addPersonListener(personListener);

      /* Check Category Deleted */
      final ICategory category1 = fFactory.createCategory(null, newsRef1.resolve());
      final CategoryReference categoryRef1 = new CategoryReference(fDao.saveCategory(category1).getId());
      final ICategory category2 = fFactory.createCategory(null, newsRef2.resolve());
      final CategoryReference categoryRef2 = new CategoryReference(fDao.saveCategory(category2).getId());

      final boolean categoryDeleted[] = new boolean[2];
      categoryListener = new CategoryAdapter() {
        @Override
        public void categoryDeleted(Set<CategoryEvent> events) {
          for (CategoryEvent event : events) {
            assertFalse("Expected this Event to be no Root Event", event.isRoot());

            ICategory category = event.getEntity();

            if (categoryRef1.references(category))
              categoryDeleted[0] = true;

            else if (categoryRef2.references(category))
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.