Class JCRLocalDropboxDrive

  • All Implemented Interfaces:
    org.exoplatform.services.cms.clouddrives.CloudDriveSecurity, org.exoplatform.services.cms.clouddrives.CloudDriveStorage, org.exoplatform.services.cms.clouddrives.oauth2.UserTokenRefreshListener

    public class JCRLocalDropboxDrive
    extends org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
    implements org.exoplatform.services.cms.clouddrives.oauth2.UserTokenRefreshListener
    Local drive for Dropbox provider.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static interface  JCRLocalDropboxDrive.Changes
      Applicable changes of local Drobpox drive.
      protected class  JCRLocalDropboxDrive.Connect
      Connect algorithm for Drobpox drive.
      protected class  JCRLocalDropboxDrive.DeletedInfo
      The Class DeletedInfo.
      protected class  JCRLocalDropboxDrive.DropboxDrive
      The Class DropboxDrive.
      class  JCRLocalDropboxDrive.DropboxState
      The Class DropboxState.
      protected class  JCRLocalDropboxDrive.EventsSync
      An implementation of JCRLocalCloudDrive.SyncCommand based on an abstract deltas queue proposed and maintained by the cloud service.
      protected class  JCRLocalDropboxDrive.FileAPI
      CloudFileAPI implementation for Dropbox synchronization.
      protected class  JCRLocalDropboxDrive.FileInfo
      The Class FileInfo.
      protected class  JCRLocalDropboxDrive.FolderInfo
      The Class FolderInfo.
      protected class  JCRLocalDropboxDrive.ItemInfo
      Dropbox item helper to extract info from its file/folder metadata object.
      class  JCRLocalDropboxDrive.JCRLocalDropboxFile
      Deprecated.
      protected class  JCRLocalDropboxDrive.MetadataInfo
      Dropbox item helper to extract info from its metadata object.
      protected class  JCRLocalDropboxDrive.MovedFile
      The Class MovedFile.
      protected class  JCRLocalDropboxDrive.UnknownInfo
      The Class UnknownInfo for not recognized changes.
      • Nested classes/interfaces inherited from class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive

        org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive.AbstractCommand, org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive.AbstractFileAPI, org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive.CommandCallable, org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive.ConnectCommand, org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive.DriveState, org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive.ExoJCREnvironment, org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive.ExoJCRSettings, org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive.FileChange, org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive.JCRListener, org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive.NoConnectCommand, org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive.NoSyncCommand, org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive.SyncCommand, org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive.SyncFilesCommand
      • Nested classes/interfaces inherited from class org.exoplatform.services.cms.clouddrives.CloudDrive

        org.exoplatform.services.cms.clouddrives.CloudDrive.Command, org.exoplatform.services.cms.clouddrives.CloudDrive.CommandProgress, org.exoplatform.services.cms.clouddrives.CloudDrive.FilesState, org.exoplatform.services.cms.clouddrives.CloudDrive.ListenerSupport
      • Nested classes/interfaces inherited from interface org.exoplatform.services.cms.clouddrives.CloudDriveStorage

        org.exoplatform.services.cms.clouddrives.CloudDriveStorage.Change<R extends Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String FOLDER_REV
      The Constant FOLDER_REV.
      static String FOLDER_TYPE
      The Constant FOLDER_TYPE.
      protected JCRLocalDropboxDrive.DropboxState state
      Dropbox drive state.
      • Fields inherited from class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive

        accentsConverter, actionDrive, ALREADY_DONE, COMMAND_CHANGES_CHUNK, commandEnv, CURRENT_LOCALFORMAT, currentChangeId, currentConnect, currentSync, delayedSyncFiles, driveCommands, DUMMY_DATA, ECD_CLOUDDRIVE, ECD_CLOUDFILE, ECD_CLOUDFILERESOURCE, ECD_CLOUDFOLDER, ECD_IGNORED, ECD_LOCALFORMAT, EXO_DATETIME, EXO_MODIFY, EXO_THUMBNAIL, EXO_THUMBNAILS, EXO_TRASHFOLDER, fileAPI, fileChanges, fileChangeSequencer, fileCopies, fileHistory, fileRemovals, fileSynchronizers, fileTrash, finder, HISTORY_EXPIRATION, HISTORY_MAX_LENGTH, jcrListener, mimeTypes, MIX_REFERENCEABLE, MIX_VERSIONABLE, noConnect, noSync, NT_FILE, NT_FOLDER, NT_RESOURCE, NT_UNSTRUCTURED, repository, rootNodeHolder, rootSystemNodeHolder, rootUUID, rootWorkspace, sessionProviders, syncFilesMessages, syncLock, updating, user, USER_NODEPATH, USER_SESSIONPROVIDER, USER_WORKSPACE, workerExecutor
      • Fields inherited from class org.exoplatform.services.cms.clouddrives.CloudDrive

        listeners, LOG
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected JCRLocalDropboxDrive​(org.exoplatform.clouddrive.dropbox.DropboxConnector.API apiFactory, DropboxProvider provider, javax.jcr.Node driveNode, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders, org.exoplatform.services.cms.clouddrives.jcr.NodeFinder finder, org.exoplatform.services.cms.clouddrives.utils.ExtendedMimeTypeResolver mimeTypes)
      Instantiates a new JCR local dropbox drive.
      protected JCRLocalDropboxDrive​(DropboxUser user, javax.jcr.Node driveNode, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders, org.exoplatform.services.cms.clouddrives.jcr.NodeFinder finder, org.exoplatform.services.cms.clouddrives.utils.ExtendedMimeTypeResolver mimeTypes)
      Instantiates a new JCR local dropbox drive.
    • Constructor Detail

      • JCRLocalDropboxDrive

        protected JCRLocalDropboxDrive​(DropboxUser user,
                                       javax.jcr.Node driveNode,
                                       org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
                                       org.exoplatform.services.cms.clouddrives.jcr.NodeFinder finder,
                                       org.exoplatform.services.cms.clouddrives.utils.ExtendedMimeTypeResolver mimeTypes)
                                throws org.exoplatform.services.cms.clouddrives.CloudDriveException,
                                       javax.jcr.RepositoryException
        Instantiates a new JCR local dropbox drive.
        Parameters:
        user - the user
        driveNode - the drive node
        sessionProviders - the session providers
        finder - the finder
        mimeTypes - the mime types
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
        javax.jcr.RepositoryException - the repository exception
      • JCRLocalDropboxDrive

        protected JCRLocalDropboxDrive​(org.exoplatform.clouddrive.dropbox.DropboxConnector.API apiFactory,
                                       DropboxProvider provider,
                                       javax.jcr.Node driveNode,
                                       org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
                                       org.exoplatform.services.cms.clouddrives.jcr.NodeFinder finder,
                                       org.exoplatform.services.cms.clouddrives.utils.ExtendedMimeTypeResolver mimeTypes)
                                throws javax.jcr.RepositoryException,
                                       org.exoplatform.services.cms.clouddrives.CloudDriveException
        Instantiates a new JCR local dropbox drive.
        Parameters:
        apiFactory - the API factory
        provider - the provider
        driveNode - the drive node
        sessionProviders - the session providers
        finder - the finder
        mimeTypes - the mime types
        Throws:
        javax.jcr.RepositoryException - the repository exception
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
    • Method Detail

      • initDrive

        protected void initDrive​(javax.jcr.Node driveNode)
                          throws org.exoplatform.services.cms.clouddrives.CloudDriveException,
                                 javax.jcr.RepositoryException
        Overrides:
        initDrive in class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException
        javax.jcr.RepositoryException
      • updateState

        protected void updateState​(String cursor)
        Update state.
        Parameters:
        cursor - the cursor
      • loadUser

        protected static DropboxUser loadUser​(org.exoplatform.clouddrive.dropbox.DropboxConnector.API apiFactory,
                                              DropboxProvider provider,
                                              javax.jcr.Node driveNode)
                                       throws javax.jcr.RepositoryException,
                                              DropboxException,
                                              org.exoplatform.services.cms.clouddrives.CloudDriveException
        Load user from the drive Node.
        Parameters:
        apiFactory - DropboxConnector.API API factory
        provider - DropboxProvider
        driveNode - Node root of the drive
        Returns:
        DropboxUser
        Throws:
        javax.jcr.RepositoryException - the repository exception
        DropboxException - the dropbox exception
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
      • onUserTokenRefresh

        public void onUserTokenRefresh​(org.exoplatform.services.cms.clouddrives.oauth2.UserToken token)
                                throws org.exoplatform.services.cms.clouddrives.CloudDriveException
        Specified by:
        onUserTokenRefresh in interface org.exoplatform.services.cms.clouddrives.oauth2.UserTokenRefreshListener
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException
      • onUserTokenRemove

        public void onUserTokenRemove()
                               throws org.exoplatform.services.cms.clouddrives.CloudDriveException
        Specified by:
        onUserTokenRemove in interface org.exoplatform.services.cms.clouddrives.oauth2.UserTokenRefreshListener
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException
      • getFileContent

        public org.exoplatform.services.cms.clouddrives.viewer.ContentReader getFileContent​(String idPath)
                                                                                     throws javax.jcr.RepositoryException,
                                                                                            org.exoplatform.services.cms.clouddrives.CloudDriveException
        Specified by:
        getFileContent in interface org.exoplatform.services.cms.clouddrives.CloudDriveStorage
        Overrides:
        getFileContent in class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
        Throws:
        javax.jcr.RepositoryException
        org.exoplatform.services.cms.clouddrives.CloudDriveException
      • getState

        public org.exoplatform.services.cms.clouddrives.CloudDrive.FilesState getState()
                                                                                throws org.exoplatform.services.cms.clouddrives.DriveRemovedException,
                                                                                       org.exoplatform.services.cms.clouddrives.RefreshAccessException,
                                                                                       org.exoplatform.services.cms.clouddrives.CloudProviderException,
                                                                                       javax.jcr.RepositoryException
        Overrides:
        getState in class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
        Throws:
        org.exoplatform.services.cms.clouddrives.DriveRemovedException
        org.exoplatform.services.cms.clouddrives.RefreshAccessException
        org.exoplatform.services.cms.clouddrives.CloudProviderException
        javax.jcr.RepositoryException
      • isSharingSupported

        public boolean isSharingSupported()
        Specified by:
        isSharingSupported in interface org.exoplatform.services.cms.clouddrives.CloudDriveSecurity
        Overrides:
        isSharingSupported in class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
      • shareFile

        public void shareFile​(javax.jcr.Node fileNode,
                              String... users)
                       throws javax.jcr.RepositoryException,
                              org.exoplatform.services.cms.clouddrives.CloudDriveException
        Specified by:
        shareFile in interface org.exoplatform.services.cms.clouddrives.CloudDriveSecurity
        Overrides:
        shareFile in class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
        Throws:
        javax.jcr.RepositoryException
        org.exoplatform.services.cms.clouddrives.CloudDriveException
      • unshareFile

        public void unshareFile​(javax.jcr.Node fileNode,
                                String... users)
                         throws javax.jcr.RepositoryException,
                                org.exoplatform.services.cms.clouddrives.CloudDriveException
        Specified by:
        unshareFile in interface org.exoplatform.services.cms.clouddrives.CloudDriveSecurity
        Overrides:
        unshareFile in class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
        Throws:
        javax.jcr.RepositoryException
        org.exoplatform.services.cms.clouddrives.CloudDriveException
      • getConnectCommand

        protected org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive.ConnectCommand getConnectCommand()
                                                                                                            throws org.exoplatform.services.cms.clouddrives.DriveRemovedException,
                                                                                                                   javax.jcr.RepositoryException
        Specified by:
        getConnectCommand in class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
        Throws:
        org.exoplatform.services.cms.clouddrives.DriveRemovedException
        javax.jcr.RepositoryException
      • getSyncCommand

        protected org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive.SyncCommand getSyncCommand()
                                                                                                      throws org.exoplatform.services.cms.clouddrives.DriveRemovedException,
                                                                                                             org.exoplatform.services.cms.clouddrives.SyncNotSupportedException,
                                                                                                             javax.jcr.RepositoryException
        Specified by:
        getSyncCommand in class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
        Throws:
        org.exoplatform.services.cms.clouddrives.DriveRemovedException
        org.exoplatform.services.cms.clouddrives.SyncNotSupportedException
        javax.jcr.RepositoryException
      • createFileAPI

        protected org.exoplatform.services.cms.clouddrives.CloudFileAPI createFileAPI()
                                                                               throws org.exoplatform.services.cms.clouddrives.DriveRemovedException,
                                                                                      org.exoplatform.services.cms.clouddrives.SyncNotSupportedException,
                                                                                      javax.jcr.RepositoryException
        Specified by:
        createFileAPI in class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
        Throws:
        org.exoplatform.services.cms.clouddrives.DriveRemovedException
        org.exoplatform.services.cms.clouddrives.SyncNotSupportedException
        javax.jcr.RepositoryException
      • readChangeId

        protected Long readChangeId()
                             throws javax.jcr.RepositoryException,
                                    org.exoplatform.services.cms.clouddrives.CloudDriveException
        Specified by:
        readChangeId in class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
        Throws:
        javax.jcr.RepositoryException
        org.exoplatform.services.cms.clouddrives.CloudDriveException
      • saveChangeId

        protected void saveChangeId​(Long id)
                             throws org.exoplatform.services.cms.clouddrives.CloudDriveException,
                                    javax.jcr.RepositoryException
        Specified by:
        saveChangeId in class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException
        javax.jcr.RepositoryException
      • getUser

        public DropboxUser getUser()
        Specified by:
        getUser in class org.exoplatform.services.cms.clouddrives.CloudDrive
      • refreshAccess

        protected void refreshAccess()
                              throws org.exoplatform.services.cms.clouddrives.CloudDriveException
        Specified by:
        refreshAccess in class org.exoplatform.services.cms.clouddrives.CloudDrive
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException
      • updateAccess

        protected void updateAccess​(org.exoplatform.services.cms.clouddrives.CloudUser newUser)
                             throws org.exoplatform.services.cms.clouddrives.CloudDriveException,
                                    javax.jcr.RepositoryException
        Specified by:
        updateAccess in class org.exoplatform.services.cms.clouddrives.CloudDrive
        Throws:
        org.exoplatform.services.cms.clouddrives.CloudDriveException
        javax.jcr.RepositoryException
      • fixNameConflict

        protected void fixNameConflict​(javax.jcr.Node file)
                                throws javax.jcr.RepositoryException
        Overrides:
        fixNameConflict in class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
        Throws:
        javax.jcr.RepositoryException
      • normalizeName

        protected void normalizeName​(javax.jcr.Node fileNode)
                              throws javax.jcr.RepositoryException
        Ensure the Dropbox file node has name in lower-case. If name requires change it will be renamed in the current session.
        This step required for JCRLocalDropboxDrive.DropboxDrive work.
        NOTE: this method does't check if it is a cloud file and doesn't respect JCR namespaces and will check against the whole name of the file.
        Parameters:
        fileNode - Node
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • initDropboxFile

        protected void initDropboxFile​(javax.jcr.Node localNode,
                                       String rev,
                                       Long size)
                                throws javax.jcr.RepositoryException,
                                       DropboxException
        Initialize Dropbox file.
        Parameters:
        localNode - Node
        rev - the rev
        size - the size
        Throws:
        javax.jcr.RepositoryException - the repository exception
        DropboxException - the dropbox exception
      • initDropboxFolder

        protected void initDropboxFolder​(javax.jcr.Node localNode,
                                         String cursor)
                                  throws javax.jcr.RepositoryException,
                                         DropboxException
        Initialize Dropbox folder.
        Parameters:
        localNode - Node
        cursor - String a cursor of last synchronization, if null it will be ignored
        Throws:
        javax.jcr.RepositoryException - the repository exception
        DropboxException - the dropbox exception
      • initDropboxPath

        protected void initDropboxPath​(javax.jcr.Node localNode,
                                       String path)
                                throws javax.jcr.RepositoryException
        Init Dropbox dbxPath of local item.
        Parameters:
        localNode - the local node
        path - the path
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • getDropboxPath

        protected String getDropboxPath​(javax.jcr.Node localNode)
                                 throws javax.jcr.RepositoryException
        Get Dropbox path saved in local item. If this path not found in the item, a null will be returned.
        Parameters:
        localNode - the local node
        Returns:
        the Dropbox path or null
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • updateItem

        protected org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudFile updateItem​(DropboxAPI api,
                                                                                            JCRLocalDropboxDrive.MetadataInfo update,
                                                                                            javax.jcr.Node parent,
                                                                                            javax.jcr.Node node)
                                                                                     throws javax.jcr.RepositoryException,
                                                                                            org.exoplatform.services.cms.clouddrives.CloudDriveException
        Update, create or delete a local node of Cloud File. If the node is null then it will be open on the given parent and created if not already exists. If item metadata is not file or folder type, then CloudDriveException will be thrown.
        Parameters:
        api - DropboxAPI
        update - the update
        parent - Node, can be null if node given
        node - Node, can be null if parent given
        Returns:
        JCRLocalCloudFile
        Throws:
        javax.jcr.RepositoryException - for storage errors
        org.exoplatform.services.cms.clouddrives.CloudDriveException - for drive or format errors, or if item metadata not of existing file or folder
      • createSharedLink

        protected String createSharedLink​(javax.jcr.Node fileNode)
                                   throws javax.jcr.RepositoryException,
                                          org.exoplatform.services.cms.clouddrives.CloudDriveException
        Creates the shared link.
        Parameters:
        fileNode - the file node
        Returns:
        the string
        Throws:
        javax.jcr.RepositoryException - the repository exception
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
      • link

        protected String link​(javax.jcr.Node fileNode)
                       throws javax.jcr.RepositoryException
        Overrides:
        link in class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
        Throws:
        javax.jcr.RepositoryException
      • previewLink

        protected String previewLink​(String type,
                                     javax.jcr.Node fileNode)
                              throws javax.jcr.RepositoryException
        Overrides:
        previewLink in class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
        Throws:
        javax.jcr.RepositoryException
      • findMimetype

        protected String findMimetype​(String fileName)
        Find mimetype.
        Parameters:
        fileName - the file name
        Returns:
        the string
      • fetchSubtree

        protected org.exoplatform.clouddrive.dropbox.DropboxAPI.ListFolder fetchSubtree​(DropboxAPI api,
                                                                                        String itemId,
                                                                                        javax.jcr.Node node,
                                                                                        Collection<org.exoplatform.services.cms.clouddrives.utils.ChunkIterator<?>> iterators,
                                                                                        JCRLocalDropboxDrive.Changes changes)
                                                                                 throws javax.jcr.RepositoryException,
                                                                                        org.exoplatform.services.cms.clouddrives.CloudDriveException
        Fetch subtree (children) of given item from remote side.
        Parameters:
        api - the api
        itemId - the item id
        node - the node
        iterators - the iterators
        changes - the changes
        Returns:
        the list folder
        Throws:
        javax.jcr.RepositoryException - the repository exception
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
      • fetchItem

        protected void fetchItem​(DropboxAPI api,
                                 JCRLocalDropboxDrive.MetadataInfo item,
                                 String parentId,
                                 javax.jcr.Node parentNode,
                                 Collection<org.exoplatform.services.cms.clouddrives.utils.ChunkIterator<?>> iterators,
                                 JCRLocalDropboxDrive.Changes changes)
                          throws javax.jcr.RepositoryException,
                                 org.exoplatform.services.cms.clouddrives.NotFoundException,
                                 org.exoplatform.services.cms.clouddrives.CloudDriveException
        Fetch remote item, for a folder do recursive.
        Parameters:
        api - the api
        item - the item metadata
        parentId - the parent ID
        parentNode - the parent node
        iterators - the iterators for progress tracking, can be null
        changes - the changes command (e.g. connect, sync or restore), never null
        Throws:
        javax.jcr.RepositoryException - the repository exception
        org.exoplatform.services.cms.clouddrives.NotFoundException - the not found exception
        org.exoplatform.services.cms.clouddrives.CloudDriveException - the cloud drive exception
      • folderCursor

        protected String folderCursor​(javax.jcr.Node node)
                               throws javax.jcr.RepositoryException
        Folder cursor.
        Parameters:
        node - the node
        Returns:
        the string
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • nodeName

        protected String nodeName​(String title)
        Overrides:
        nodeName in class org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudDrive
      • itemInfo

        protected JCRLocalDropboxDrive.MetadataInfo itemInfo​(com.dropbox.core.v2.files.Metadata item)
        Metadata info.
        Parameters:
        item - the item
        Returns:
        the info
      • hasLocationChanged

        protected boolean hasLocationChanged​(javax.jcr.Node node,
                                             JCRLocalDropboxDrive.ItemInfo item)
                                      throws javax.jcr.RepositoryException
        Checks for location changed.
        Parameters:
        node - the local item node
        item - the remote item
        Returns:
        true, if successful
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • hasSameId

        protected boolean hasSameId​(javax.jcr.Node node,
                                    JCRLocalDropboxDrive.ItemInfo item)
                             throws javax.jcr.RepositoryException
        Checks for same ID of local node and remote item.
        Parameters:
        node - the node
        item - the item
        Returns:
        true, if successful
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • hasDifferentRev

        protected boolean hasDifferentRev​(javax.jcr.Node node,
                                          JCRLocalDropboxDrive.FileInfo file)
                                   throws javax.jcr.RepositoryException
        Checks for different rev.
        Parameters:
        node - the node
        file - the file
        Returns:
        true, if successful
        Throws:
        javax.jcr.RepositoryException - the repository exception
      • cleanPath

        protected String cleanPath​(String path)
        Clean path from leading and ending slashes.
        Parameters:
        path - the path
        Returns:
        the string