Package org.hive2hive.core.model

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


    // if the friend receives write access, he gets the protection key
    if (context.getPermissionType() == PermissionType.WRITE) {
      logger.debug("Friend '{}' gets WRITE access to the shared folder '{}'.", context.getFriendId(),
          context.getFolder().getName());
      sharedNode.share(context.consumeNewProtectionKeys());
    } else {
      logger.debug("Friend '{}' gets READ access to the shared folder '{}'.",
          context.getFriendId(), context.getFolder().getName());
      sharedNode.share(null);
    }
View Full Code Here


          context.getFolder().getName());
      sharedNode.share(context.consumeNewProtectionKeys());
    } else {
      logger.debug("Friend '{}' gets READ access to the shared folder '{}'.",
          context.getFriendId(), context.getFolder().getName());
      sharedNode.share(null);
    }

    // remove the parent and only send the sub-tree
    sharedNode.setParent(null);
View Full Code Here

        logger.debug("Sharing an already shared folder '{}' with friend '{}'.",
            folderIndex.getName(), context.getFriendId());
        folderIndex.addUserPermissions(context.getUserPermission());
      } else {
        // make the node shared with the new protection keys
        folderIndex.share(context.consumeNewProtectionKeys());
        // add read/write user permission of friend
        folderIndex.addUserPermissions(context.getUserPermission());
        // add write user permission of user itself
        folderIndex.addUserPermissions(new UserPermission(userId, PermissionType.WRITE));
      }
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.