Class JCRLocalCMISDrive.Sync

  • All Implemented Interfaces:
    org.exoplatform.services.cms.clouddrives.CloudDrive.Command
    Enclosing class:
    JCRLocalCMISDrive

    protected class JCRLocalCMISDrive.Sync
    extends Object
    A facade JCRLocalCloudDrive.SyncCommand implementation. This command will choose an actual type of the synchronization depending on the CMIS repository capabilities (Changes Log support).
    • Field Detail

      • api

        protected final CMISAPI api
        Internal API.
      • preSyncError

        protected org.exoplatform.services.cms.clouddrives.CloudDriveException preSyncError
        The pre sync error.
    • Constructor Detail

      • Sync

        protected Sync()
        Instantiates a new sync.
    • Method Detail

      • preSyncFiles

        protected void preSyncFiles()
                             throws org.exoplatform.services.cms.clouddrives.CloudDriveException,
                                    javax.jcr.RepositoryException,
                                    InterruptedException
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException
        javax.jcr.RepositoryException
        InterruptedException
      • syncFiles

        protected void syncFiles()
                          throws org.exoplatform.services.cms.clouddrives.CloudDriveException,
                                 javax.jcr.RepositoryException,
                                 InterruptedException
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException
        javax.jcr.RepositoryException
        InterruptedException
      • preSaveChunk

        protected void preSaveChunk()
                             throws org.exoplatform.services.cms.clouddrives.CloudDriveException,
                                    javax.jcr.RepositoryException
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException
        javax.jcr.RepositoryException
      • wasRenamed

        protected boolean wasRenamed​(javax.jcr.Node fileNode,
                                     String changeName)
                              throws javax.jcr.RepositoryException
        Check if the file was renamed locally from given name. Such check actual when we receive remote changes happened before a local rename of the file.
        Parameters:
        fileNode - the file node
        changeName - the change name
        Returns:
        true, if successful
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • cleanRenamed

        protected void cleanRenamed​(javax.jcr.Node fileNode,
                                    String fileName)
                             throws javax.jcr.RepositoryException
        Remove a fact of local rename of the file from given name. This method should be called when syncing from remote to local.
        Parameters:
        fileNode - the file node
        fileName - the file name
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • wasMoved

        @Deprecated
        protected boolean wasMoved​(javax.jcr.Node fileNode,
                                   String changeParentId)
                            throws javax.jcr.RepositoryException
        Deprecated.
        Check if the file was moved locally from given parent. Such check actual when we receive remote changes happened before a local move of the file.
        Parameters:
        fileNode - the file node
        changeParentId - the change parent id
        Returns:
        true, if successful
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • cleanMoved

        @Deprecated
        protected void cleanMoved​(javax.jcr.Node fileNode,
                                  String parentId)
                           throws javax.jcr.RepositoryException
        Deprecated.
        Remove a fact of local move of the file from given parent. This method should be called when syncing from remote to local.
        Parameters:
        fileNode - the file node
        parentId - the parent id
        Throws:
        javax.jcr.RepositoryException - the repository exception