Package com.google.api.services.drive.model

Examples of com.google.api.services.drive.model.Permission


   * @throws Exception
   */
  public void shareFileWith(String fileId, String userEmail) throws Exception {
    Drive driveService = getDriveService();
   
    Permission newPermission = new Permission();

    newPermission.setValue(userEmail);
      newPermission.setType("user");
      newPermission.setRole("writer");
   
    driveService.permissions().insert(fileId, newPermission).setSendNotificationEmails(false).execute();
  }
View Full Code Here

TOP

Related Classes of com.google.api.services.drive.model.Permission

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.