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.
|
protected Map<String,javax.jcr.Node> |
pathNodes
Nodes read/created by Dropbox path in this sync.
|
| 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 JRC).
|
boolean |
canApply(String parentId,
String fileId)
Answers if given file ID under its parent (by ID) already applied locally.
|
protected javax.jcr.Node |
getExistingAncestor(JCRLocalDropboxDrive.DbxFileInfo file)
Find nearest existing ancestor of the file using its Dropbox path (lower-case or natural form).
|
protected javax.jcr.Node |
getFile(JCRLocalDropboxDrive.DbxFileInfo file)
Find file node by its Dropbox path (lower-case or natural form).
|
protected javax.jcr.Node |
getParent(JCRLocalDropboxDrive.DbxFileInfo file)
Return parent node of the given file path.
|
protected void |
preSaveChunk() |
protected javax.jcr.Node |
readNode(JCRLocalDropboxDrive.DbxFileInfo file)
Read node.
|
protected boolean |
removeFile(JCRLocalDropboxDrive.DbxFileInfo file)
Remove file or folder node by its Dropbox path (lower-case or natural form).
|
protected void |
syncFiles() |
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 boolean canApply(String parentId, String fileId)
canApply in interface JCRLocalDropboxDrive.ChangesparentId - StringfileId - Stringtrue if file was already applied, false otherwise.protected javax.jcr.Node getFile(JCRLocalDropboxDrive.DbxFileInfo file) throws javax.jcr.RepositoryException, org.exoplatform.clouddrive.CloudDriveException
file - JCRLocalDropboxDrive.DbxFileInfoNodejavax.jcr.RepositoryException - the repository exceptionorg.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionprotected boolean removeFile(JCRLocalDropboxDrive.DbxFileInfo file) throws javax.jcr.RepositoryException, org.exoplatform.clouddrive.CloudDriveException
file - JCRLocalDropboxDrive.DbxFileInfotrue if file found and successfully removed, false otherwisejavax.jcr.RepositoryException - the repository exceptionorg.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionprotected javax.jcr.Node getExistingAncestor(JCRLocalDropboxDrive.DbxFileInfo file) throws javax.jcr.RepositoryException, org.exoplatform.clouddrive.CloudDriveException, IllegalArgumentException
file - JCRLocalDropboxDrive.DbxFileInfoNodejavax.jcr.RepositoryException - the repository exceptionorg.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionIllegalArgumentException - when file argument is a root drive of Dropboxprotected javax.jcr.Node readNode(JCRLocalDropboxDrive.DbxFileInfo file) throws javax.jcr.RepositoryException, org.exoplatform.clouddrive.CloudDriveException
file - the filejavax.jcr.RepositoryException - the repository exceptionorg.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionprotected javax.jcr.Node getParent(JCRLocalDropboxDrive.DbxFileInfo file) throws javax.jcr.RepositoryException, org.exoplatform.clouddrive.CloudDriveException
file - JCRLocalDropboxDrive.DbxFileInfoNodejavax.jcr.RepositoryException - the repository exceptionorg.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionprotected void preSaveChunk()
throws org.exoplatform.clouddrive.CloudDriveException,
javax.jcr.RepositoryException
org.exoplatform.clouddrive.CloudDriveExceptionjavax.jcr.RepositoryExceptionCopyright © 2003–2017 eXo Platform SAS. All rights reserved.