Package org.hive2hive.core.model

Examples of org.hive2hive.core.model.FolderIndex.removeChild()


      FolderIndex oldParent = movedNode.getParent();
      oldParentKey = oldParent.getFileKeys().getPublic();

      // source's parent needs to be updated, no matter if it's root or not
      oldParent.removeChild(movedNode);

      // add to the new parent
      FolderIndex newParent = (FolderIndex) userProfile.getFileByPath(context.getDestination()
          .getParentFile(), networkManager.getSession().getRoot());
      movedNode.setParent(newParent);
View Full Code Here


      } catch (GetFailedException e) {
        return;
      }
      FolderIndex parentNode = (FolderIndex) userProfile.getFileById(parentKey);
      Index childNode = parentNode.getChildByName(context.getFile().getName());
      parentNode.removeChild(childNode);
      try {
        profileManager.readyToPut(userProfile, getID());
        modified = false;
      } catch (PutFailedException e) {
        // ignore
View Full Code Here

    if (!parent.canWrite(sender)) {
      logger.error("User without WRITE permissions tried to delete a file.");
      return null;
    }

    parent.removeChild(toDelete);
    profileManager.readyToPut(userProfile, randomPID);
    logger.debug("Removed the dead link from the user profile.");
    return toDelete;
  }
View Full Code Here

      }
    }

    // remove the node from the tree
    FolderIndex parentIndex = index.getParent();
    parentIndex.removeChild(index);

    // store for later
    context.provideIndex(index);
    context.setParentNode(parentIndex);
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.