Drive API v2 (revision 1)



com.google.api.services.drive
Class Drive.Parents

java.lang.Object
  extended by com.google.api.services.drive.Drive.Parents
Enclosing class:
Drive

public class Drive.Parents
extends Object

The "parents" collection of methods.


Nested Class Summary
 class Drive.Parents.Delete
           
 class Drive.Parents.Get
           
 class Drive.Parents.Insert
           
 class Drive.Parents.List
           
 
Constructor Summary
Drive.Parents()
           
 
Method Summary
 Drive.Parents.Delete delete(String fileId, String parentId)
          Removes a parent from a file.
 Drive.Parents.Get get(String fileId, String parentId)
          Gets a specific parent reference.
 Drive.Parents.Insert insert(String fileId, ParentReference content)
          Adds a parent folder for a file.
 Drive.Parents.List list(String fileId)
          Lists a file's parents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Drive.Parents

public Drive.Parents()
Method Detail

insert

public Drive.Parents.Insert insert(String fileId,
                                   ParentReference content)
                            throws IOException
Adds a parent folder for a file. Create a request for the method "parents.insert". This request holds the parameters needed by the the drive server. After setting any optional parameters, call the Drive.Parents.Insert.execute() method to invoke the remote operation.

Parameters:
fileId - The ID of the file.
content - the ParentReference
Returns:
the request
Throws:
IOException - if the initialization of the request fails

get

public Drive.Parents.Get get(String fileId,
                             String parentId)
                      throws IOException
Gets a specific parent reference. Create a request for the method "parents.get". This request holds the parameters needed by the the drive server. After setting any optional parameters, call the Drive.Parents.Get.execute() method to invoke the remote operation.

Parameters:
fileId - The ID of the file.
parentId - The ID of the parent.
Returns:
the request
Throws:
IOException - if the initialization of the request fails

list

public Drive.Parents.List list(String fileId)
                        throws IOException
Lists a file's parents. Create a request for the method "parents.list". This request holds the parameters needed by the the drive server. After setting any optional parameters, call the Drive.Parents.List.execute() method to invoke the remote operation.

Parameters:
fileId - The ID of the file.
Returns:
the request
Throws:
IOException - if the initialization of the request fails

delete

public Drive.Parents.Delete delete(String fileId,
                                   String parentId)
                            throws IOException
Removes a parent from a file. Create a request for the method "parents.delete". This request holds the parameters needed by the the drive server. After setting any optional parameters, call the Drive.Parents.Delete.execute() method to invoke the remote operation.

Parameters:
fileId - The ID of the file.
parentId - The ID of the parent.
Returns:
the request
Throws:
IOException - if the initialization of the request fails