Class 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.
    • Field Detail

      • api

        protected final BoxAPI api
        Box API.
    • Constructor Detail

      • FullSync

        protected FullSync()
                    throws javax.jcr.RepositoryException,
                           org.exoplatform.services.cms.clouddrives.DriveRemovedException
        Create command for Box synchronization.
        Throws:
        javax.jcr.RepositoryException - the repository exception
        org.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.RepositoryException
        org.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 id
        parent - the parent
        Returns:
        the box folder. info
        Throws:
        javax.jcr.RepositoryException - the repository exception
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
      • execLocal

        protected void execLocal()
                          throws org.exoplatform.services.cms.clouddrives.CloudDriveException,
                                 javax.jcr.RepositoryException
        Execute full sync from current thread.
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
        javax.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.CloudDriveException
        javax.jcr.RepositoryException