Package org.hive2hive.core.model

Examples of org.hive2hive.core.model.UserPermission


    // sharing root folder is not allowed
    if (folder.toPath().toString().equals(root.toString()))
      throw new IllegalFileLocation("Root folder of the H2H directory can't be shared.");

    IProcessComponent shareProcess = ProcessFactory.instance().createShareProcess(folder,
        new UserPermission(userId, permission), networkManager);

    AsyncComponent asyncProcess = new AsyncComponent(shareProcess);

    submitProcess(asyncProcess);
    return asyncProcess;
View Full Code Here


  }

  public static void shareFolder(NetworkManager networkManager, File folder, String friendId, PermissionType permission)
      throws IllegalFileLocation, IllegalArgumentException, NoSessionException, NoPeerConnectionException {
    ProcessComponent process = ProcessFactory.instance().createShareProcess(folder,
        new UserPermission(friendId, permission), networkManager);
    executeProcess(process);
  }
View Full Code Here

        // 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));
      }

      // upload modified profile
      profileManager.readyToPut(userProfile, getID());
View Full Code Here

TOP

Related Classes of org.hive2hive.core.model.UserPermission

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.