Examples of CategoryListener


Examples of org.gudy.azureus2.core3.category.CategoryListener

    synchronized( category_map ){
     
      if ( category_listener == null ){
       
        category_listener =
          new CategoryListener()
          {
            public void 
            downloadManagerAdded(
              Category       cat,
              DownloadManager   manager )
View Full Code Here

Examples of org.rssowl.core.model.events.CategoryListener

  public void testDeepFeedAddedEvents() throws Exception {
    FeedListener feedListener = null;
    NewsListener newsListener = null;
    AttachmentListener attachmentListener = null;
    PersonListener personListener = null;
    CategoryListener categoryListener = null;
    try {

      /* Check Feed Added and News received */
      final IFeed feed = fFactory.createFeed(null, new URL("http://www.foobar.com"));
      final boolean feedAdded[] = new boolean[1];
View Full Code Here

Examples of org.rssowl.core.model.events.CategoryListener

  @Test
  public void testDeepNewsAddedEvents() throws Exception {
    NewsListener newsListener = null;
    AttachmentListener attachmentListener = null;
    PersonListener personListener = null;
    CategoryListener categoryListener = null;
    try {
      IFeed feed = fFactory.createFeed(null, new URL("http://www.foobar.com"));
      FeedReference feedReference = new FeedReference(fDao.saveFeed(feed).getId());

      /* Check News Added */
 
View Full Code Here

Examples of org.rssowl.core.model.events.CategoryListener

  public void testDeepFeedDeletedEvents() throws Exception {
    FeedListener feedListener = null;
    NewsListener newsListener = null;
    AttachmentListener attachmentListener = null;
    PersonListener personListener = null;
    CategoryListener categoryListener = null;
    NewsAdapter newsAdapter = null;
    try {

      /* Check Feed Deleted and News Deleted */
      final IFeed feed = fFactory.createFeed(null, new URL("http://www.foobar.com"));
View Full Code Here

Examples of org.rssowl.core.model.events.CategoryListener

  @Test
  public void testDeepNewsDeletedEvents() throws Exception {
    NewsListener newsListener = null;
    AttachmentListener attachmentListener = null;
    PersonListener personListener = null;
    CategoryListener categoryListener = null;
    try {

      /* Store a Feed */
      IFeed feed = fFactory.createFeed(null, new URL("http://www.foobar.com"));
      FeedReference feedRef = new FeedReference(fDao.saveFeed(feed).getId());
View Full Code Here

Examples of org.rssowl.core.model.events.CategoryListener

   *
   * @throws Exception
   */
  @Test
  public void testFlatCategoryEvents() throws Exception {
    CategoryListener categoryListener = null;
    try {
      /* Add */
      FeedReference feedRef = new FeedReference(fDao.saveFeed(fFactory.createFeed(null, new URL("http://www.feed2.com"))).getId());
      NewsReference newsRef = new NewsReference(fDao.saveNews(fFactory.createNews(null, feedRef.resolve(), new Date())).getId());
      ICategory category1 = fFactory.createCategory(null, feedRef.resolve());
      category1.setName("Category");
      ICategory category2 = fFactory.createCategory(null, newsRef.resolve());
      category2.setName("Category");
      final boolean categoryEvents[] = new boolean[6];
      final CategoryReference categoryReference[] = new CategoryReference[2];
      categoryListener = new CategoryListener() {
        public void categoryAdded(Set<CategoryEvent> events) {
          for (CategoryEvent event : events) {
            assertTrue("Expected this Event to be Root Event", event.isRoot());
            if (categoryEvents[0])
              categoryEvents[1] = true;
View Full Code Here

Examples of org.rssowl.core.model.events.CategoryListener

      fail(e.getMessage());
    }
    final Category[] updatedCategory = new Category[1];
    final boolean[] categoryAddedCalled = new boolean[] { false };
    final boolean[] categoryUpdatedCalled = new boolean[] { false };
    CategoryListener categoryListener = null;
    try {
      categoryListener = new CategoryAdapter() {
        @Override
        public void categoryAdded(Set<CategoryEvent> events) {
          CategoryEvent event = events.iterator().next();
View Full Code Here

Examples of org.rssowl.core.model.events.CategoryListener

   * @param events The <code>ModelEvent</code> for the affected type.
   */
  public void notifyCategoryAdded(final Set<CategoryEvent> events) {
    Object listeners[] = fCategoryListeners.getListeners();
    for (Object element : listeners) {
      final CategoryListener listener = (CategoryListener) element;
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          listener.categoryAdded(events);
        }
      });
    }
  }
View Full Code Here

Examples of org.rssowl.core.model.events.CategoryListener

   * @param events The <code>ModelEvent</code> for the affected type.
   */
  public void notifyCategoryDeleted(final Set<CategoryEvent> events) {
    Object listeners[] = fCategoryListeners.getListeners();
    for (Object element : listeners) {
      final CategoryListener listener = (CategoryListener) element;
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          listener.categoryDeleted(events);
        }
      });
    }
  }
View Full Code Here

Examples of org.rssowl.core.model.events.CategoryListener

   * @param events The <code>ModelEvent</code> for the affected type.
   */
  public void notifyCategoryUpdated(final Set<CategoryEvent> events) {
    Object[] listeners = fCategoryListeners.getListeners();
    for (Object element : listeners) {
      final CategoryListener listener = (CategoryListener) element;
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          listener.categoryUpdated(events);
        }
      });
    }
  }
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.