Class JCRLocalGoogleDrive.FileAPI
- java.lang.Object
-
- org.exoplatform.services.cms.clouddrives.gdrive.JCRLocalGoogleDrive.FileAPI
-
- All Implemented Interfaces:
org.exoplatform.services.cms.clouddrives.CloudFileAPI
- Enclosing class:
- JCRLocalGoogleDrive
protected class JCRLocalGoogleDrive.FileAPI extends Object
The Class FileAPI.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.exoplatform.services.cms.clouddrives.gdrive.GoogleDriveAPIapiGoogle Drive service API.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.exoplatform.services.cms.clouddrives.CloudFilecopyFile(javax.jcr.Node srcFileNode, javax.jcr.Node destFileNode)org.exoplatform.services.cms.clouddrives.CloudFilecopyFolder(javax.jcr.Node srcFolderNode, javax.jcr.Node destFolderNode)protected com.google.api.services.drive.model.FilecopySubtree(javax.jcr.Node folderNode)Copy subtree.org.exoplatform.services.cms.clouddrives.CloudFilecreateFile(javax.jcr.Node fileNode, Calendar created, Calendar modified, String mimeType, InputStream content)org.exoplatform.services.cms.clouddrives.CloudFilecreateFolder(javax.jcr.Node folderNode, Calendar created)booleanisTrashSupported()booleanremoveFile(String id)booleanremoveFolder(String id)org.exoplatform.services.cms.clouddrives.CloudFilerestore(String id, String path)booleantrashFile(String id)booleantrashFolder(String id)org.exoplatform.services.cms.clouddrives.CloudFileuntrashFile(javax.jcr.Node fileNode)org.exoplatform.services.cms.clouddrives.CloudFileuntrashFolder(javax.jcr.Node folderNode)org.exoplatform.services.cms.clouddrives.CloudFileupdateFile(javax.jcr.Node fileNode, Calendar modified)org.exoplatform.services.cms.clouddrives.CloudFileupdateFileContent(javax.jcr.Node fileNode, Calendar modified, String mimeType, InputStream content)org.exoplatform.services.cms.clouddrives.CloudFileupdateFolder(javax.jcr.Node folderNode, Calendar modified)
-
-
-
Method Detail
-
createFile
public org.exoplatform.services.cms.clouddrives.CloudFile createFile(javax.jcr.Node fileNode, Calendar created, Calendar modified, String mimeType, InputStream content) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
createFolder
public org.exoplatform.services.cms.clouddrives.CloudFile createFolder(javax.jcr.Node folderNode, Calendar created) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
updateFile
public org.exoplatform.services.cms.clouddrives.CloudFile updateFile(javax.jcr.Node fileNode, Calendar modified) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
updateFolder
public org.exoplatform.services.cms.clouddrives.CloudFile updateFolder(javax.jcr.Node folderNode, Calendar modified) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
updateFileContent
public org.exoplatform.services.cms.clouddrives.CloudFile updateFileContent(javax.jcr.Node fileNode, Calendar modified, String mimeType, InputStream content) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
copyFile
public org.exoplatform.services.cms.clouddrives.CloudFile copyFile(javax.jcr.Node srcFileNode, javax.jcr.Node destFileNode) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
copyFolder
public org.exoplatform.services.cms.clouddrives.CloudFile copyFolder(javax.jcr.Node srcFolderNode, javax.jcr.Node destFolderNode) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
copySubtree
protected com.google.api.services.drive.model.File copySubtree(javax.jcr.Node folderNode) throws javax.jcr.RepositoryException, GoogleDriveException, org.exoplatform.services.cms.clouddrives.DriveRemovedException, org.exoplatform.services.cms.clouddrives.CloudDriveAccessException, org.exoplatform.services.cms.clouddrives.NotFoundExceptionCopy subtree.- Parameters:
folderNode- the folder node- Returns:
- the file
- Throws:
javax.jcr.RepositoryException- the repository exceptionGoogleDriveException- the google drive exceptionorg.exoplatform.services.cms.clouddrives.DriveRemovedException- the drive removed exceptionorg.exoplatform.services.cms.clouddrives.CloudDriveAccessException- the cloud drive access exceptionorg.exoplatform.services.cms.clouddrives.NotFoundException- the not found exception
-
removeFile
public boolean removeFile(String id) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException
- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
removeFolder
public boolean removeFolder(String id) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException
- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
trashFile
public boolean trashFile(String id) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException
- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
trashFolder
public boolean trashFolder(String id) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException
- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
untrashFile
public org.exoplatform.services.cms.clouddrives.CloudFile untrashFile(javax.jcr.Node fileNode) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
untrashFolder
public org.exoplatform.services.cms.clouddrives.CloudFile untrashFolder(javax.jcr.Node folderNode) throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
isTrashSupported
public boolean isTrashSupported()
-
restore
public org.exoplatform.services.cms.clouddrives.CloudFile restore(String id, String path) throws org.exoplatform.services.cms.clouddrives.NotFoundException, org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException
- Throws:
org.exoplatform.services.cms.clouddrives.NotFoundExceptionorg.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
-