Package org.rssowl.core.model.events

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


    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 folderAdded(Set<FolderEvent> events) {
        fail("Unexpected folder added event");
      }
View Full Code Here


      IFolder rootChildChild1Child = fFactory.createFolder(null, rootChildChild1, "Root Child Child #1 Child");

      final boolean[] folderEventsIssued = new boolean[5];
      final Folder[] folders = new Folder[] { (Folder) root, (Folder) rootChild, (Folder) rootChildChild1, (Folder) rootChildChild2, (Folder) rootChildChild1Child };

      folderListener = new FolderAdapter() {
        @Override
        public void folderAdded(Set<FolderEvent> events) {
          for (FolderEvent event : events) {
            IFolder folder = event.getEntity();
View Full Code Here

      FolderReference rootChildChild1ChildRef = new FolderReference(rootChildChild1Child.getId());

      final boolean[] folderEventsIssued = new boolean[5];
      final FolderReference[] folderReferences = new FolderReference[] { rootRef, rootChildRef, rootChildChild1Ref, rootChildChild2Ref, rootChildChild1ChildRef };

      folderListener = new FolderAdapter() {
        @Override
        public void folderDeleted(Set<FolderEvent> events) {
          for (FolderEvent event : events) {
            IFolder folder = event.getEntity();
View Full Code Here

      /* Delete by calling delete */
      fDao.deleteFolder(new FolderReference(folder.getId()));

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

   * @throws Exception
   */
  @SuppressWarnings("nls")
  @Test
  public void testNoUpdateEventForDeletedChildsOfSavedParent() throws Exception {
    FolderAdapter folderListener= null;

    try {
      IFolder root = fFactory.createFolder(null, null, "Root");
      root = fDao.saveFolder(root);

      IFolder folder1 = fFactory.createFolder(null, root, "Folder #1");
      root = fDao.saveFolder(root);
      folder1 = root.getFolders().get(0);
     
      IFolder folder2 =fFactory.createFolder(null, root, "Folder #2");
      root = fDao.saveFolder(root);
      folder2 = root.getFolders().get(1);

      IFeed feed = fFactory.createFeed(null, new URL("http://www.feed.com"));
      fFactory.createNews(null, feed, new Date());
      FeedReference feedRef = new FeedReference(fDao.saveFeed(feed).getId());

      fFactory.createBookMark(null, folder1, feed.getLink(), feedRef, "BookMark");
      folder1 = fDao.saveFolder(folder1);

      assertEquals(1, new FeedReference(feed.getId()).resolve().getNews().size());

      folderListener= new FolderAdapter() {
        @Override
        public void folderUpdated(Set<FolderEvent> events) {
          for (FolderEvent folderEvent : events) {
            IFolder folder = folderEvent.getEntity();
            if (folder.getName().startsWith("Folder"))
View Full Code Here

    final Folder[] updatedFolder = new Folder[1];
    final boolean[] folderAddedCalled = new boolean[] { false };
    final boolean[] folderUpdatedCalled = new boolean[] { false };
    FolderListener folderListener = null;
    try {
      folderListener = new FolderAdapter() {
        @Override
        public void folderAdded(Set<FolderEvent> events) {
          for (FolderEvent event : events) {
            try {
              folderAddedCalled[0] = true;
View Full Code Here

    final Folder[] updatedFolder = new Folder[1];
    final boolean[] folderAddedCalled = new boolean[] { false };
    final boolean[] folderUpdatedCalled = new boolean[] { false };
    FolderListener folderListener = null;
    try {
      folderListener = new FolderAdapter() {
        @Override
        public void folderAdded(Set<FolderEvent> events) {
          for (FolderEvent event : events) {
            try {
              folderAddedCalled[0] = true;
View Full Code Here

    } catch (PersistenceException e) {
      fail(e.getMessage());
    }
    FolderListener folderListener = null;
    try {
      folderListener = new FolderAdapter() {
        @Override
        public void folderAdded(Set<FolderEvent> events) {
          for (FolderEvent event : events) {
            if (folderName[0].equals(event.getEntity().getName())) {
              assertEquals(true, event.isRoot());
View Full Code Here

TOP

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

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.