protected class JCRLocalDropboxDrive.DropboxDrive extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
JCRLocalDropboxDrive.DropboxDrive.LocalItem |
| Modifier and Type | Field and Description |
|---|---|
protected DropboxAPI |
api
Cloud drive API.
|
protected Map<String,javax.jcr.Node> |
pathNodes
Nodes read/created by Dropbox path in this sync.
|
protected javax.jcr.Node |
rootNode
The root node of the tree.
|
| Modifier | Constructor and Description |
|---|---|
protected |
DropboxDrive(DropboxAPI api,
javax.jcr.Node rootNode)
Instantiates a new drive tree.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
close()
Close the tree and cleanup its temporal resources.
|
JCRLocalDropboxDrive.DropboxDrive.LocalItem |
findByLocalPath(String jcrPath)
Find local item by its path in the storage (JCR).
|
protected javax.jcr.Node |
findDropboxNode(String dbxPath)
Deprecated.
|
JCRLocalDropboxDrive.DropboxDrive.LocalItem |
getItem(String dbxPath)
Gets the local item.
|
String |
getLocalPath(String dbxPath)
Construct a JCR path of an item from given Dropbox path.
|
String |
getRemotePath(String jcrPath)
Construct a Dropbox path of an item from given JCR path.
|
protected JCRLocalDropboxDrive.DropboxDrive.LocalItem |
readItem(String dbxPath)
Read item from local storage.
|
javax.jcr.Node |
restore(javax.jcr.Node node)
Restore given node at a Dropbox path saved in it or remove the node if
it's a connected cloud file.
|
protected final DropboxAPI api
protected final javax.jcr.Node rootNode
protected DropboxDrive(DropboxAPI api, javax.jcr.Node rootNode)
api - the apirootNode - the root nodeprotected void close()
public String getRemotePath(String jcrPath) throws javax.jcr.RepositoryException
jcrPath - the JCR pathjavax.jcr.RepositoryException - the repository exceptionpublic String getLocalPath(String dbxPath) throws javax.jcr.RepositoryException
dbxPath - the dbx pathjavax.jcr.RepositoryException - the repository exceptionpublic JCRLocalDropboxDrive.DropboxDrive.LocalItem findByLocalPath(String jcrPath) throws javax.jcr.RepositoryException
null will be returned.jcrPath - the JCR pathnull of path outside the drive
root nodejavax.jcr.RepositoryException - the repository exceptionpublic JCRLocalDropboxDrive.DropboxDrive.LocalItem getItem(String dbxPath) throws javax.jcr.RepositoryException
dbxPath - the Dropbox pathJCRLocalDropboxDrive.DropboxDrive.LocalItem, never nulljavax.jcr.RepositoryException - the repository exceptionprotected JCRLocalDropboxDrive.DropboxDrive.LocalItem readItem(String dbxPath) throws javax.jcr.RepositoryException
dbxPath - the Dropbox pathjavax.jcr.RepositoryException - the repository exception@Deprecated protected javax.jcr.Node findDropboxNode(String dbxPath) throws javax.jcr.RepositoryException
dbxPath - the Dropbox dbxPathjavax.jcr.RepositoryException - the repository exceptionpublic javax.jcr.Node restore(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - the nodenull if node cannot be found or was
removedjavax.jcr.RepositoryException - the repository exceptionCopyright © 2003–2020 eXo Platform SAS. All rights reserved.