Package com.logicaldoc.google
Class DriveClient
java.lang.Object
com.logicaldoc.google.GoogleClient
com.logicaldoc.google.DriveClient
Facade for Google Drive.
To handle the API: https://console.developers.google.com
- Since:
- 7.3
- Author:
- Marco Meschieri - LogicalDOC
-
Method Summary
Modifier and TypeMethodDescriptionvoid
convertFile
(String fileId, File dest) createFolder
(String name) void
deleteFile
(String fileId) void
downloadFile
(String fileId, File dest) static DriveClient
com.google.api.services.drive.model.File
List
<com.google.api.services.drive.model.File> uploadFile
(com.google.api.client.http.AbstractInputStreamContent mediaContent, String fileName, boolean convert) uploadFile
(File file, String fileName, boolean convert) uploadFile
(InputStream is, String fileName, boolean convert) Methods inherited from class com.logicaldoc.google.GoogleClient
connect, getAccessToken, getRefreshToken, getUserName, isConnected, loadSettings
-
Method Details
-
get
public static DriveClient get(String name) throws com.logicaldoc.core.PersistenceException, com.logicaldoc.util.security.StringEncrypter.EncryptionException, IOException - Throws:
com.logicaldoc.core.PersistenceException
com.logicaldoc.util.security.StringEncrypter.EncryptionException
IOException
-
getFile
- Throws:
IOException
-
uploadFile
- Throws:
IOException
-
uploadFile
- Throws:
IOException
-
uploadFile
public String uploadFile(com.google.api.client.http.AbstractInputStreamContent mediaContent, String fileName, boolean convert) throws IOException - Throws:
IOException
-
create
- Throws:
IOException
-
createFolder
- Throws:
IOException
-
downloadFile
- Throws:
IOException
-
convertFile
- Throws:
IOException
-
deleteFile
- Throws:
IOException
-
search
- Throws:
IOException
-