Package org.rssowl.core.model.events

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


  public void testDeepFolderAddedEvents() throws Exception {
    FolderListener folderListener = null;
    BookMarkListener bookMarkListener = null;
    FeedListener feedListener = null;
    SearchMarkListener searchMarkListener = null;
    SearchConditionListener searchConditionListener = null;
    try {

      /* Check Folder Added */
      IFolder root = fFactory.createFolder(null, null, "Root");
      IFolder rootChild = fFactory.createFolder(null, root, "Root Child");
View Full Code Here


  public void testDeepFolderDeletedEvents() throws Exception {
    FolderListener folderListener = null;
    BookMarkListener bookMarkListener = null;
    FeedListener feedListener = null;
    SearchMarkListener searchMarkListener = null;
    SearchConditionListener searchConditionListener = null;
    try {
      /* Check Folder Deleted */
      IFolder root = fFactory.createFolder(null, null, "Root");
      root = fDao.saveFolder(root);
      final FolderReference rootRef = new FolderReference(root.getId());
View Full Code Here

   *
   * @throws Exception
   */
  @Test
  public void testFlatSearchConditionEvents() throws Exception {
    SearchConditionListener searchConditionListener = null;
    try {
      /* Add */
      FolderReference folderRef = new FolderReference(fDao.saveFolder(fFactory.createFolder(null, null, "Folder")).getId());
      SearchMarkReference searchMarkRef = new SearchMarkReference(fDao.saveSearchMark(fFactory.createSearchMark(null, folderRef.resolve(), "SearchMark")).getId());
      ISearchField field = fFactory.createSearchField(IExtendableType.ALL_FIELDS, INews.class);
      ISearchCondition searchCondition = fFactory.createSearchCondition(null, searchMarkRef.resolve(), field, SearchSpecifier.CONTAINS, "Foo", true);
      final boolean searchConditionEvents[] = new boolean[3];
      final SearchConditionReference searchConditionReference[] = new SearchConditionReference[1];
      searchConditionListener = new SearchConditionListener() {
        public void searchConditionAdded(Set<SearchConditionEvent> events) {
          for (SearchConditionEvent event : events) {
            assertTrue("Expected this Event to be Root Event", event.isRoot());
            searchConditionEvents[0] = true;
          }
View Full Code Here

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

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

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

TOP

Related Classes of org.rssowl.core.model.events.SearchConditionListener

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.