protected class JCRLocalGoogleDrive.Sync extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.exoplatform.services.cms.clouddrives.gdrive.GoogleDriveAPI |
api
Google Drive service API.
|
protected org.exoplatform.services.cms.clouddrives.gdrive.GoogleDriveAPI.ChangesIterator |
changes
The changes.
|
protected Long |
lastChangeId
Last change ID fetched and applied to the drive.
|
| Modifier | Constructor and Description |
|---|---|
protected |
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)
Gets the parents.
|
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()
Sync next.
|
protected void |
updateFile(com.google.api.services.drive.model.File gf,
String[] parentIds)
Create or update file's node.
|
protected final org.exoplatform.services.cms.clouddrives.gdrive.GoogleDriveAPI api
protected org.exoplatform.services.cms.clouddrives.gdrive.GoogleDriveAPI.ChangesIterator changes
protected Long lastChangeId
preSaveChunk().protected Sync()
throws javax.jcr.RepositoryException,
org.exoplatform.services.cms.clouddrives.DriveRemovedException
javax.jcr.RepositoryException - the repository exceptionorg.exoplatform.services.cms.clouddrives.DriveRemovedException - the drive removed exceptionprotected void syncFiles()
throws javax.jcr.RepositoryException,
org.exoplatform.services.cms.clouddrives.CloudDriveException
javax.jcr.RepositoryExceptionorg.exoplatform.services.cms.clouddrives.CloudDriveExceptionprotected void syncNext()
throws javax.jcr.RepositoryException,
org.exoplatform.services.cms.clouddrives.CloudDriveException
javax.jcr.RepositoryException - the repository exceptionorg.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exceptionprotected void preSaveChunk()
throws org.exoplatform.services.cms.clouddrives.CloudDriveException,
javax.jcr.RepositoryException
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryExceptionprotected void deleteFile(String fileId) throws javax.jcr.RepositoryException, org.exoplatform.services.cms.clouddrives.CloudDriveException
fileId - Stringjavax.jcr.RepositoryException - the repository exceptionorg.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exceptionprotected void updateFile(com.google.api.services.drive.model.File gf,
String[] parentIds)
throws org.exoplatform.services.cms.clouddrives.CloudDriveException,
javax.jcr.RepositoryException
gf - FileparentIds - array of Ids of parents (folders)org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exceptionjavax.jcr.RepositoryException - the repository exceptionprotected String[] getParents(com.google.api.services.drive.model.File gfile)
gfile - the gfileprotected boolean isRemoved(com.google.api.services.drive.model.File gfile)
throws GoogleDriveException
gfile - the gfileBoolean true if the file or its ancestor was
deleted or trashed, false otherwiseGoogleDriveException - the google drive exceptionCopyright © 2003–2020 eXo Platform SAS. All rights reserved.