Package org.exoplatform.clouddrive.box
Class JCRLocalBoxDrive.FullSync
- java.lang.Object
-
- org.exoplatform.clouddrive.box.JCRLocalBoxDrive.FullSync
-
- All Implemented Interfaces:
org.exoplatform.services.cms.clouddrives.CloudDrive.Command
- Enclosing class:
- JCRLocalBoxDrive
protected class JCRLocalBoxDrive.FullSync extends Object
Sync algorithm for Box drive based on all remote files traversing: we do compare all remote files with locals by its Etag and fetch an item if the tags differ.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFullSync()Create command for Box synchronization.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidexecLocal()Execute full sync from current thread.protected voidpreSaveChunk()protected com.box.sdk.BoxFolder.InfosyncChilds(String folderId, javax.jcr.Node parent)Sync childs.protected voidsyncFiles()
-
-
-
Field Detail
-
api
protected final BoxAPI api
Box API.
-
-
Constructor Detail
-
FullSync
protected FullSync() throws javax.jcr.RepositoryException, org.exoplatform.services.cms.clouddrives.DriveRemovedExceptionCreate command for Box synchronization.- Throws:
javax.jcr.RepositoryException- the repository exceptionorg.exoplatform.services.cms.clouddrives.DriveRemovedException- the drive removed exception
-
-
Method Detail
-
syncFiles
protected void syncFiles() throws javax.jcr.RepositoryException, org.exoplatform.services.cms.clouddrives.CloudDriveException- Throws:
javax.jcr.RepositoryExceptionorg.exoplatform.services.cms.clouddrives.CloudDriveException
-
syncChilds
protected com.box.sdk.BoxFolder.Info syncChilds(String folderId, javax.jcr.Node parent) throws javax.jcr.RepositoryException, org.exoplatform.services.cms.clouddrives.CloudDriveException
Sync childs.- Parameters:
folderId- the folder idparent- the parent- Returns:
- the box folder. info
- Throws:
javax.jcr.RepositoryException- the repository exceptionorg.exoplatform.services.cms.clouddrives.CloudDriveException- the cloud drive exception
-
execLocal
protected void execLocal() throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryExceptionExecute full sync from current thread.- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveException- the cloud drive exceptionjavax.jcr.RepositoryException- the repository exception
-
preSaveChunk
protected void preSaveChunk() throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
-