public class JCRLocalBoxDrive
extends org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive
implements org.exoplatform.clouddrive.oauth2.UserTokenRefreshListener
| Modifier and Type | Class and Description |
|---|---|
class |
JCRLocalBoxDrive.BoxState
The Class BoxState.
|
protected class |
JCRLocalBoxDrive.Connect
Connect algorithm for Box drive.
|
protected class |
JCRLocalBoxDrive.EventsSync
Sync algorithm for Box drive based on drive changes obtained from Events service
http://developers.box.com/docs/#events.
|
protected class |
JCRLocalBoxDrive.FileAPI
The Class FileAPI.
|
protected class |
JCRLocalBoxDrive.FullSync
Sync algorithm for Box drive based on all remote files traversing: we do
compare all remote files with locals by its Etag and fetch an item if the tags differ.
|
org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.AbstractCommand, org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.AbstractFileAPI, org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.CommandCallable, org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.ConnectCommand, org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.DriveState, org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.ExoJCREnvironment, org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.ExoJCRSettings, org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.FileChange, org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.JCRListener, org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.NoConnectCommand, org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.NoSyncCommand, org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.SyncCommand, org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.SyncFilesCommand| Modifier and Type | Field and Description |
|---|---|
static long |
FULL_SYNC_PERIOD
Period to perform
JCRLocalBoxDrive.FullSync as a next sync request. |
accentsConverter, actionDrive, ALREADY_DONE, COMMAND_CHANGES_CHUNK, commandEnv, CURRENT_LOCALFORMAT, currentChangeId, currentConnect, currentSync, 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, rootUUID, rootWorkspace, sessionProviders, state, syncFilesMessages, syncLock, updating, user, USER_NODEPATH, USER_SESSIONPROVIDER, USER_WORKSPACE, workerExecutor| Modifier | Constructor and Description |
|---|---|
protected |
JCRLocalBoxDrive(org.exoplatform.clouddrive.box.BoxConnector.API apiBuilder,
BoxProvider provider,
javax.jcr.Node driveNode,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
org.exoplatform.clouddrive.jcr.NodeFinder finder,
org.exoplatform.clouddrive.utils.ExtendedMimeTypeResolver mimeTypes)
Instantiates a new JCR local box drive.
|
protected |
JCRLocalBoxDrive(BoxUser user,
javax.jcr.Node driveNode,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
org.exoplatform.clouddrive.jcr.NodeFinder finder,
org.exoplatform.clouddrive.utils.ExtendedMimeTypeResolver mimeTypes)
Instantiates a new JCR local box drive.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.exoplatform.clouddrive.CloudFileAPI |
createFileAPI() |
protected String |
findMimetype(String fileName)
Find mimetype.
|
protected org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.ConnectCommand |
getConnectCommand() |
protected Long |
getSequenceId(com.box.sdk.BoxItem.Info item)
Gets the sequence id.
|
JCRLocalBoxDrive.BoxState |
getState() |
protected org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.SyncCommand |
getSyncCommand() |
BoxUser |
getUser() |
protected boolean |
initBoxItem(javax.jcr.Node localNode,
com.box.sdk.BoxItem.Info item)
Initialize Box's common specifics of files and folders.
|
protected void |
initDrive(javax.jcr.Node driveNode) |
protected static BoxUser |
loadUser(org.exoplatform.clouddrive.box.BoxConnector.API apiBuilder,
BoxProvider provider,
javax.jcr.Node driveNode)
Load user from the drive Node.
|
protected boolean |
notInRange(String path,
Collection<String> range)
Not in range.
|
void |
onUserTokenRefresh(org.exoplatform.clouddrive.oauth2.UserToken token) |
void |
onUserTokenRemove() |
protected String |
previewLink(String type,
javax.jcr.Node fileNode) |
protected Long |
readChangeId() |
protected void |
refreshAccess() |
protected void |
saveChangeId(Long id) |
protected void |
updateAccess(org.exoplatform.clouddrive.CloudUser newUser) |
protected org.exoplatform.clouddrive.jcr.JCRLocalCloudFile |
updateItem(BoxAPI api,
com.box.sdk.BoxItem.Info item,
javax.jcr.Node parent,
javax.jcr.Node node)
Update or create a local node of Cloud File.
|
addJCRListener, addUpdating, await, checkNotTrashed, cleanName, cleanRemoved, cleanup, cleanUpdated, commitChanges, configure, connect, copyNode, create, currentUserName, disconnect, editLink, ensureSame, fileNode, findNode, findNodes, getChangeId, getConnectDate, getCurentCommand, getFile, getFileContent, getFilePreview, getId, getInitDate, getLink, getLocalUser, getOrCleanFileNode, getPath, getTitle, getWorkspace, hasChange, hasFile, hasRemoved, hasUpdated, ignore, initCommon, initCopy, initFile, initFolder, initRemove, initUpdating, isConnected, isDrive, isDrive, isIgnored, isInDrive, isInTrash, isLocal, isNew, isNewOrUpdating, isSameDrive, isSharingSupported, isUpdating, link, listFiles, listFiles, loadHistory, localChange, migrateName, moveFile, nextChangeId, nodeName, openFile, openFolder, readFile, readNode, readNodes, removeJCRListener, removeUpdating, rollback, rollbackAllChanges, rootNode, rootNode, saveChanges, savedChanges, session, setChangeId, shareFile, size, synchronize, systemSession, thumbnailLink, title, unignorepublic static final long FULL_SYNC_PERIOD
JCRLocalBoxDrive.FullSync as a next sync request. See implementation of
getSyncCommand().protected JCRLocalBoxDrive(BoxUser user, javax.jcr.Node driveNode, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders, org.exoplatform.clouddrive.jcr.NodeFinder finder, org.exoplatform.clouddrive.utils.ExtendedMimeTypeResolver mimeTypes) throws org.exoplatform.clouddrive.CloudDriveException, javax.jcr.RepositoryException
user - the userdriveNode - the drive nodesessionProviders - the session providersfinder - the findermimeTypes - the mime typesorg.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionjavax.jcr.RepositoryException - the repository exceptionprotected JCRLocalBoxDrive(org.exoplatform.clouddrive.box.BoxConnector.API apiBuilder,
BoxProvider provider,
javax.jcr.Node driveNode,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
org.exoplatform.clouddrive.jcr.NodeFinder finder,
org.exoplatform.clouddrive.utils.ExtendedMimeTypeResolver mimeTypes)
throws javax.jcr.RepositoryException,
org.exoplatform.clouddrive.CloudDriveException
apiBuilder - the api builderprovider - the providerdriveNode - the drive nodesessionProviders - the session providersfinder - the findermimeTypes - the mime typesjavax.jcr.RepositoryException - the repository exceptionorg.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionprotected void initDrive(javax.jcr.Node driveNode)
throws org.exoplatform.clouddrive.CloudDriveException,
javax.jcr.RepositoryException
initDrive in class org.exoplatform.clouddrive.jcr.JCRLocalCloudDriveorg.exoplatform.clouddrive.CloudDriveExceptionjavax.jcr.RepositoryExceptionprotected static BoxUser loadUser(org.exoplatform.clouddrive.box.BoxConnector.API apiBuilder, BoxProvider provider, javax.jcr.Node driveNode) throws javax.jcr.RepositoryException, BoxException, org.exoplatform.clouddrive.CloudDriveException
apiBuilder - BoxConnector.API API builderprovider - BoxProviderdriveNode - Node root of the driveBoxUserjavax.jcr.RepositoryException - the repository exceptionBoxException - the box exceptionorg.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionpublic void onUserTokenRefresh(org.exoplatform.clouddrive.oauth2.UserToken token)
throws org.exoplatform.clouddrive.CloudDriveException
onUserTokenRefresh in interface org.exoplatform.clouddrive.oauth2.UserTokenRefreshListenerorg.exoplatform.clouddrive.CloudDriveExceptionpublic void onUserTokenRemove()
throws org.exoplatform.clouddrive.CloudDriveException
onUserTokenRemove in interface org.exoplatform.clouddrive.oauth2.UserTokenRefreshListenerorg.exoplatform.clouddrive.CloudDriveExceptionprotected org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.ConnectCommand getConnectCommand()
throws org.exoplatform.clouddrive.DriveRemovedException,
javax.jcr.RepositoryException
getConnectCommand in class org.exoplatform.clouddrive.jcr.JCRLocalCloudDriveorg.exoplatform.clouddrive.DriveRemovedExceptionjavax.jcr.RepositoryExceptionprotected org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.SyncCommand getSyncCommand()
throws org.exoplatform.clouddrive.DriveRemovedException,
org.exoplatform.clouddrive.SyncNotSupportedException,
javax.jcr.RepositoryException
getSyncCommand in class org.exoplatform.clouddrive.jcr.JCRLocalCloudDriveorg.exoplatform.clouddrive.DriveRemovedExceptionorg.exoplatform.clouddrive.SyncNotSupportedExceptionjavax.jcr.RepositoryExceptionprotected org.exoplatform.clouddrive.CloudFileAPI createFileAPI()
throws org.exoplatform.clouddrive.DriveRemovedException,
org.exoplatform.clouddrive.SyncNotSupportedException,
javax.jcr.RepositoryException
createFileAPI in class org.exoplatform.clouddrive.jcr.JCRLocalCloudDriveorg.exoplatform.clouddrive.DriveRemovedExceptionorg.exoplatform.clouddrive.SyncNotSupportedExceptionjavax.jcr.RepositoryExceptionprotected Long readChangeId() throws javax.jcr.RepositoryException, org.exoplatform.clouddrive.CloudDriveException
readChangeId in class org.exoplatform.clouddrive.jcr.JCRLocalCloudDrivejavax.jcr.RepositoryExceptionorg.exoplatform.clouddrive.CloudDriveExceptionprotected void saveChangeId(Long id) throws org.exoplatform.clouddrive.CloudDriveException, javax.jcr.RepositoryException
saveChangeId in class org.exoplatform.clouddrive.jcr.JCRLocalCloudDriveorg.exoplatform.clouddrive.CloudDriveExceptionjavax.jcr.RepositoryExceptionpublic BoxUser getUser()
getUser in class org.exoplatform.clouddrive.CloudDrivepublic JCRLocalBoxDrive.BoxState getState() throws org.exoplatform.clouddrive.DriveRemovedException, org.exoplatform.clouddrive.CloudProviderException, javax.jcr.RepositoryException, org.exoplatform.clouddrive.RefreshAccessException
getState in class org.exoplatform.clouddrive.jcr.JCRLocalCloudDriveorg.exoplatform.clouddrive.DriveRemovedExceptionorg.exoplatform.clouddrive.CloudProviderExceptionjavax.jcr.RepositoryExceptionorg.exoplatform.clouddrive.RefreshAccessExceptionprotected void refreshAccess()
throws org.exoplatform.clouddrive.CloudDriveException
refreshAccess in class org.exoplatform.clouddrive.CloudDriveorg.exoplatform.clouddrive.CloudDriveExceptionprotected void updateAccess(org.exoplatform.clouddrive.CloudUser newUser)
throws org.exoplatform.clouddrive.CloudDriveException,
javax.jcr.RepositoryException
updateAccess in class org.exoplatform.clouddrive.CloudDriveorg.exoplatform.clouddrive.CloudDriveExceptionjavax.jcr.RepositoryExceptionprotected boolean initBoxItem(javax.jcr.Node localNode,
com.box.sdk.BoxItem.Info item)
throws javax.jcr.RepositoryException,
BoxException
localNode - Nodeitem - BoxItem.Infotrue if Box file was changed comparing to previous state, falsejavax.jcr.RepositoryException - the repository exceptionBoxException - the box exceptionprotected String findMimetype(String fileName)
fileName - the file nameprotected org.exoplatform.clouddrive.jcr.JCRLocalCloudFile updateItem(BoxAPI api, com.box.sdk.BoxItem.Info item, javax.jcr.Node parent, javax.jcr.Node node) throws javax.jcr.RepositoryException, org.exoplatform.clouddrive.CloudDriveException
null then it will be open on the
given parent and created if not already exists.api - BoxAPIitem - BoxItem.Infoparent - Nodenode - Node, can be nullJCRLocalCloudFilejavax.jcr.RepositoryException - for storage errorsorg.exoplatform.clouddrive.CloudDriveException - for drive or format errorsprotected boolean notInRange(String path, Collection<String> range)
path - the pathrange - the rangeprotected Long getSequenceId(com.box.sdk.BoxItem.Info item) throws BoxFormatException
item - the itemBoxFormatException - the box format exceptionCopyright © 2003–2017 eXo Platform SAS. All rights reserved.