org.exoplatform.clouddrive.cmis
Class JCRLocalCMISDrive.Sync.ChangesAlgorithm

java.lang.Object
  extended by org.exoplatform.clouddrive.cmis.JCRLocalCMISDrive.Sync.ChangesAlgorithm
Enclosing class:
JCRLocalCMISDrive.Sync

protected class JCRLocalCMISDrive.Sync.ChangesAlgorithm
extends Object

An implementation of sync based on an CMIS change log.


Field Summary
protected  CMISAPI.ChangesIterator changes
          Changes from drive to apply.
protected  Set<javax.jcr.Node> synced
          Existing files being synchronized with cloud.
 
Constructor Summary
protected JCRLocalCMISDrive.Sync.ChangesAlgorithm()
           
 
Method Summary
protected  void deleteFile(String fileId, Set<String> parentIds)
          Remove file's node.
protected  CMISAPI.ChangeToken syncFiles(CMISAPI.ChangeToken fromChangeToken)
           
protected  void updateFile(org.apache.chemistry.opencmis.client.api.CmisObject file, Set<String> parentIds, boolean isFolder)
          Create or update file's node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

changes

protected CMISAPI.ChangesIterator changes
Changes from drive to apply.


synced

protected final Set<javax.jcr.Node> synced
Existing files being synchronized with cloud.

Constructor Detail

JCRLocalCMISDrive.Sync.ChangesAlgorithm

protected JCRLocalCMISDrive.Sync.ChangesAlgorithm()
Method Detail

syncFiles

protected CMISAPI.ChangeToken syncFiles(CMISAPI.ChangeToken fromChangeToken)
                                 throws org.exoplatform.clouddrive.CloudDriveException,
                                        javax.jcr.RepositoryException
Throws:
org.exoplatform.clouddrive.CloudDriveException
javax.jcr.RepositoryException

deleteFile

protected void deleteFile(String fileId,
                          Set<String> parentIds)
                   throws javax.jcr.RepositoryException,
                          CMISException,
                          org.exoplatform.clouddrive.CloudDriveAccessException,
                          org.exoplatform.clouddrive.NotFoundException
Remove file's node.

Parameters:
fileId - String
parentIds - set of Ids of parents (folders)
Throws:
javax.jcr.RepositoryException
org.exoplatform.clouddrive.NotFoundException
org.exoplatform.clouddrive.CloudDriveAccessException
CMISException

updateFile

protected void updateFile(org.apache.chemistry.opencmis.client.api.CmisObject file,
                          Set<String> parentIds,
                          boolean isFolder)
                   throws org.exoplatform.clouddrive.CloudDriveException,
                          javax.jcr.RepositoryException
Create or update file's node.

Parameters:
file - CmisObject
parentIds - set of Ids of parents (folders)
Throws:
org.exoplatform.clouddrive.CloudDriveException
IOException
javax.jcr.RepositoryException
InterruptedException


Copyright © 2003–2015 eXo Platform SAS. All rights reserved.