protected class JCRLocalGoogleDrive.Sync extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.exoplatform.clouddrive.gdrive.GoogleDriveAPI |
api
Google Drive service API.
|
protected org.exoplatform.clouddrive.gdrive.GoogleDriveAPI.ChangesIterator |
changes |
protected Long |
lastChangeId
Last change ID fetched and applied to the drive.
|
| Modifier | Constructor and Description |
|---|---|
protected |
JCRLocalGoogleDrive.Sync()
Create command for Google Drive synchronization.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
deleteFile(String fileId)
Remove file node.
|
protected String[] |
getParents(com.google.api.services.drive.model.File gfile) |
protected boolean |
isRemoved(com.google.api.services.drive.model.File gfile)
Check if file isn't deleted/trashed in Google Drive, explicitly or as a part of its
ancestor deletion/trashing.
|
protected void |
preSaveChunk() |
protected void |
syncFiles() |
protected void |
syncNext() |
protected void |
updateFile(com.google.api.services.drive.model.File gf,
String[] parentIds)
Create or update file's node.
|
protected final org.exoplatform.clouddrive.gdrive.GoogleDriveAPI api
protected org.exoplatform.clouddrive.gdrive.GoogleDriveAPI.ChangesIterator changes
protected Long lastChangeId
preSaveChunk().protected JCRLocalGoogleDrive.Sync()
throws javax.jcr.RepositoryException,
org.exoplatform.clouddrive.DriveRemovedException
javax.jcr.RepositoryExceptionorg.exoplatform.clouddrive.DriveRemovedExceptionprotected void syncFiles()
throws javax.jcr.RepositoryException,
org.exoplatform.clouddrive.CloudDriveException
javax.jcr.RepositoryExceptionorg.exoplatform.clouddrive.CloudDriveExceptionprotected void syncNext()
throws javax.jcr.RepositoryException,
org.exoplatform.clouddrive.CloudDriveException
javax.jcr.RepositoryExceptionorg.exoplatform.clouddrive.CloudDriveExceptionprotected void preSaveChunk()
throws org.exoplatform.clouddrive.CloudDriveException,
javax.jcr.RepositoryException
org.exoplatform.clouddrive.CloudDriveExceptionjavax.jcr.RepositoryExceptionprotected void deleteFile(String fileId) throws javax.jcr.RepositoryException, org.exoplatform.clouddrive.CloudDriveException
fileId - Stringjavax.jcr.RepositoryExceptionorg.exoplatform.clouddrive.CloudDriveExceptionprotected void updateFile(com.google.api.services.drive.model.File gf,
String[] parentIds)
throws org.exoplatform.clouddrive.CloudDriveException,
javax.jcr.RepositoryException
gf - FileparentIds - array of Ids of parents (folders)org.exoplatform.clouddrive.CloudDriveExceptionIOExceptionjavax.jcr.RepositoryExceptionInterruptedExceptionprotected String[] getParents(com.google.api.services.drive.model.File gfile)
protected boolean isRemoved(com.google.api.services.drive.model.File gfile)
throws GoogleDriveException
file - FileBoolean true if the file or its ancestor was deleted or trashed,
false otherwiseGoogleDriveExceptionCopyright © 2003–2016 eXo Platform SAS. All rights reserved.