Examples of FolderListener


Examples of org.rssowl.core.persist.event.FolderListener

   *
   * @throws Exception
   */
  @Test
  public void testDeepFolderDeletedEvents() throws Exception {
    FolderListener folderListener = null;
    BookMarkListener bookMarkListener = null;
    FeedListener feedListener = null;
    SearchMarkListener searchMarkListener = null;
    SearchConditionListener searchConditionListener = null;
    try {
View Full Code Here

Examples of org.rssowl.core.persist.event.FolderListener

  }

  private void registerListeners() {

    /* Folder Listener */
    fFolderListener = new FolderListener() {

      /* Folders got updated */
      public void entitiesUpdated(final Set<FolderEvent> events) {
        JobRunner.runInUIThread(fViewer.getControl(), new Runnable() {
          public void run() {
View Full Code Here

Examples of org.rssowl.core.persist.event.FolderListener

   *
   * @throws Exception
   */
  @Test
  public void testFlatFolderEvents() throws Exception {
    FolderListener folderListener = null;
    try {
      /* Add */
      final FolderReference rootFolder = new FolderReference(DynamicDAO.save(fFactory.createFolder(null, null, "Root")).getId());

      IFolder folder = fFactory.createFolder(null, rootFolder.resolve(), "Folder");
      final boolean folderEvents[] = new boolean[3];
      final FolderReference folderReference[] = new FolderReference[1];
      folderListener = new FolderListener() {
        boolean updateEventOccurred = false;

        public void entitiesAdded(Set<FolderEvent> events) {
          for (FolderEvent event : events) {
            assertTrue("Expected this Event to be Root Event", event.isRoot());
View Full Code Here

Examples of org.rssowl.core.persist.event.FolderListener

      /* Delete by calling delete */
      DynamicDAO.delete(folder);

      final long rootFolderId = root.getId();
      FolderListener folderListener = new FolderAdapter() {
        @Override
        public void entitiesUpdated(Set<FolderEvent> events) {
          for (FolderEvent event : events) {
            if (event.getEntity().getId() == rootFolderId)
              assertTrue(event.isRoot());
View Full Code Here

Examples of org.rssowl.core.persist.event.FolderListener

   *
   * @throws Exception
   */
  @Test
  public void testReparentFolderAndMark() throws Exception {
    FolderListener folderListener = null;
    BookMarkListener bookMarkListener = null;
    SearchMarkListener searchMarkListener = null;
    try {
      /* Add */
      final IFolder oldMarkParent = fFactory.createFolder(null, null, "Old parent");
      final IBookMark bookMark = fFactory.createBookMark(null, oldMarkParent, new FeedLinkReference(new URI("http://www.link.com")), "bookmark");
      final ISearchMark searchMark = fFactory.createSearchMark(null, oldMarkParent, "searchmark");
      DynamicDAO.save(oldMarkParent);

      final IFolder newMarkParent = fFactory.createFolder(null, null, "New parent");
      fFactory.createFolder(null, newMarkParent, "New parent child");
      DynamicDAO.save(newMarkParent);

      /* Add */
      final IFolder oldFolderParent = fFactory.createFolder(null, null, "Old parent");
      final IFolder folder = fFactory.createFolder(null, oldFolderParent, "Folder");
      DynamicDAO.save(oldFolderParent);

      final IFolder newFolderParent = fFactory.createFolder(null, null, "New parent");
      fFactory.createFolder(null, newFolderParent, "New parent child");
      DynamicDAO.save(newFolderParent);

      final boolean[] folderUpdateEventOccurred = new boolean[1];
      folderListener = new FolderListener() {
        public void entitiesAdded(Set<FolderEvent> events) {
          fail("Unexpected event");
        }

        public void entitiesDeleted(Set<FolderEvent> events) {
View Full Code Here

Examples of org.rssowl.core.persist.event.FolderListener

   *
   * @throws Exception
   */
  @Test
  public void testDeepFolderDeletedEvents() throws Exception {
    FolderListener folderListener = null;
    BookMarkListener bookMarkListener = null;
    FeedListener feedListener = null;
    SearchMarkListener searchMarkListener = null;
    SearchConditionListener searchConditionListener = null;
    try {
View Full Code Here

Examples of org.rssowl.core.persist.event.FolderListener

  /*
   * @see org.rssowl.core.internal.persist.dao.CachingDAO#createEntityListener()
   */
  @Override
  protected FolderListener createEntityListener() {
    return new FolderListener() {
      public void entitiesAdded(Set<FolderEvent> events) {
        for (FolderEvent folderEvent : events) {
          IFolder folder = folderEvent.getEntity();
          getCache().put(folder.getId(), folder);
          if (folder.getParent() == null)
View Full Code Here

Examples of org.rssowl.core.persist.event.FolderListener

    foldersToRemove.add(savedChildFolder1);
    foldersToRemove.add(savedChildFolder2);

    final boolean[] folderDeletedCalled = new boolean[1];
    final boolean[] folderUpdatedCalled = new boolean[1];
    FolderListener listener = new FolderAdapter() {
      @Override
      public void entitiesAdded(Set<FolderEvent> events) {
        fail("Unexpected folder added event");
      }
View Full Code Here

Examples of org.rssowl.core.persist.event.FolderListener

    IFolder folder = fFactory.createFolder(null, null, "Folder");
    fFactory.createSearchMark(null, folder, "Mark");
    final IFolder savedFolder = DynamicDAO.save(folder);

    final boolean[] folderUpdatedCalled = new boolean[1];
    FolderListener folderListener = new FolderListener() {
      public void entitiesAdded(Set<FolderEvent> events) {
        fail("folderAdded should not be called");
      }

      public void entitiesDeleted(Set<FolderEvent> events) {
View Full Code Here

Examples of org.rssowl.core.persist.event.FolderListener

    return listener;
  }

  private FolderListener registerFolderListener() {
    FolderListener listener = new FolderAdapter() {
      @Override
      public void entitiesUpdated(Set<FolderEvent> events) {
        for (FolderEvent event : events) {
          if (event.isRoot() && event.getOldParent() != null) {
            notifySettingsChanged();
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.