profileManager.readyToPut(userProfile, pid);
}
private void processSharedWithMe() throws Hive2HiveException {
/** 1. add the tree to the root node in the user profile */
UserProfileManager profileManager = networkManager.getSession().getProfileManager();
String pid = UUID.randomUUID().toString();
UserProfile userProfile = profileManager.getUserProfile(pid, true);
// add it to the root (by definition)
userProfile.getRoot().addChild(sharedIndex);
sharedIndex.setParent(userProfile.getRoot());
profileManager.readyToPut(userProfile, pid);
logger.debug("Added the newly shared folder to the own user profile.");
/** 2. Notify others that files are available */
notifyOtherClients(new UploadNotificationMessageFactory(sharedIndex, null));
logger.debug("Notified other client that new (shared) files are available for download.");