Class JCRLocalCMISDrive.Sync.ChangesAlgorithm

  • Enclosing class:
    JCRLocalCMISDrive.Sync

    protected class JCRLocalCMISDrive.Sync.ChangesAlgorithm
    extends Object
    An implementation of sync based on an CMIS change log.
    • Constructor Detail

      • ChangesAlgorithm

        protected ChangesAlgorithm()
    • Method Detail

      • getLastChangeToken

        protected CMISAPI.ChangeToken getLastChangeToken()
        Gets the last change token.
        Returns:
        the last change token
      • syncFiles

        protected void syncFiles​(CMISAPI.ChangeToken fromChangeToken)
                          throws org.exoplatform.services.cms.clouddrives.CloudDriveException,
                                 javax.jcr.RepositoryException
        Sync files.
        Parameters:
        fromChangeToken - the from change token
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
        javax.jcr.RepositoryException - the repository exception
      • deleteFile

        protected void deleteFile​(String fileId,
                                  Set<String> parentIds)
                           throws javax.jcr.RepositoryException,
                                  org.exoplatform.services.cms.clouddrives.CloudDriveException
        Remove file's node.
        Parameters:
        fileId - String
        parentIds - set of Ids of parents (folders)
        Throws:
        javax.jcr.RepositoryException - the repository exception
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
      • updateFile

        protected void updateFile​(org.apache.chemistry.opencmis.client.api.CmisObject file,
                                  Set<String> parentIds,
                                  boolean isFolder)
                           throws org.exoplatform.services.cms.clouddrives.CloudDriveException,
                                  javax.jcr.RepositoryException
        Create or update file's node.
        Parameters:
        file - CmisObject
        parentIds - set of Ids of parents (folders)
        isFolder - the is folder
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
        javax.jcr.RepositoryException - the repository exception