protected class JCRLocalDropboxDrive.EventsSync extends Object implements JCRLocalDropboxDrive.Changes
SyncCommand based on an abstract deltas queue
proposed and maintained by the cloud service.| Modifier and Type | Field and Description |
|---|---|
protected DropboxAPI |
api
Internal API.
|
| Modifier | Constructor and Description |
|---|---|
protected |
EventsSync()
Create command for Template synchronization.
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(org.exoplatform.clouddrive.jcr.JCRLocalCloudFile local)
Process locally applied file (it can be any extra operations including
the gathering of effected files/stats or chunk saving in JCR).
|
boolean |
canApply(String parentId,
String fileId)
Answers if given file ID under its parent (by ID) already applied
locally.
|
protected void |
preSaveChunk() |
boolean |
removed(String path)
Adds the removed path to the scope of changes.
|
protected void |
syncFiles() |
void |
undo(org.exoplatform.clouddrive.jcr.JCRLocalCloudFile local)
Undo locally applied file or remove existing.
|
protected final DropboxAPI api
protected EventsSync()
throws javax.jcr.RepositoryException,
org.exoplatform.clouddrive.DriveRemovedException
javax.jcr.RepositoryException - the repository exceptionorg.exoplatform.clouddrive.DriveRemovedException - the drive removed exceptionprotected void syncFiles()
throws org.exoplatform.clouddrive.CloudDriveException,
javax.jcr.RepositoryException
org.exoplatform.clouddrive.CloudDriveExceptionjavax.jcr.RepositoryExceptionpublic void apply(org.exoplatform.clouddrive.jcr.JCRLocalCloudFile local)
throws javax.jcr.RepositoryException,
org.exoplatform.clouddrive.CloudDriveException
apply in interface JCRLocalDropboxDrive.Changeslocal - JCRLocalCloudFile changed filejavax.jcr.RepositoryException - the repository exceptionorg.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionpublic void undo(org.exoplatform.clouddrive.jcr.JCRLocalCloudFile local)
throws javax.jcr.RepositoryException,
org.exoplatform.clouddrive.CloudDriveException
undo in interface JCRLocalDropboxDrive.Changeslocal - the changed filejavax.jcr.RepositoryException - the repository exceptionorg.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionpublic boolean removed(String path) throws javax.jcr.RepositoryException, org.exoplatform.clouddrive.CloudDriveException
AbstractCommand it effectively should add the path to its removed
list.removed in interface JCRLocalDropboxDrive.Changespath - the pathjavax.jcr.RepositoryException - the repository exceptionorg.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionpublic boolean canApply(String parentId, String fileId)
canApply in interface JCRLocalDropboxDrive.ChangesparentId - StringfileId - Stringtrue if file was already applied,
false otherwise.protected void preSaveChunk()
throws org.exoplatform.clouddrive.CloudDriveException,
javax.jcr.RepositoryException
org.exoplatform.clouddrive.CloudDriveExceptionjavax.jcr.RepositoryExceptionCopyright © 2003–2020 eXo Platform SAS. All rights reserved.