public class JCRLocalGoogleDrive
extends org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive
implements org.exoplatform.clouddrive.oauth2.UserTokenRefreshListener
| Modifier and Type | Class and Description |
|---|---|
protected class |
JCRLocalGoogleDrive.Connect
Connect algorithm for Google Drive.
|
protected class |
JCRLocalGoogleDrive.FileAPI |
protected class |
JCRLocalGoogleDrive.Sync
Sync algorithm for Google Drive.
|
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.SyncFilesCommandaccentsConverter, actionDrive, ALREADY_DONE, commandEnv, CURRENT_LOCALFORMAT, currentChangeId, currentConnect, currentSync, 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, noConnect, noSyncCommand, 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 |
JCRLocalGoogleDrive(org.exoplatform.clouddrive.gdrive.GoogleDriveConnector.API apiBuilder,
GoogleProvider 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)
Create drive by loading it from local JCR node.
|
protected |
JCRLocalGoogleDrive(GoogleUser 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)
Create newly connecting drive.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkAccessScope(org.exoplatform.clouddrive.CloudDriveAccessException cause)
Throw
RefreshAccessException if currently coded scope doesn't match the one used by the drive
access tokens. |
protected org.exoplatform.clouddrive.CloudFileAPI |
createFileAPI() |
protected org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.ConnectCommand |
getConnectCommand() |
protected org.exoplatform.clouddrive.jcr.JCRLocalCloudDrive.SyncCommand |
getSyncCommand() |
GoogleUser |
getUser() |
protected void |
initDrive(javax.jcr.Node driveNode) |
protected boolean |
isAccessScopeMatch()
Check if currently coded scope match the one used by the drive access tokens.
|
protected static GoogleUser |
loadUser(org.exoplatform.clouddrive.gdrive.GoogleDriveConnector.API apiBuilder,
GoogleProvider provider,
javax.jcr.Node driveNode)
Load user from the drive Node.
|
protected List<com.google.api.services.drive.model.ParentReference> |
mergeParents(String parentId,
List<com.google.api.services.drive.model.ParentReference> cloudParents,
Collection<String> localParentIds)
Merge file's local and cloud parents (in case of move replace source on destination).
|
void |
onUserTokenRefresh(org.exoplatform.clouddrive.oauth2.UserToken token) |
protected Long |
readChangeId() |
protected void |
refreshAccess() |
protected void |
saveChangeId(Long id) |
protected void |
updateAccess(org.exoplatform.clouddrive.CloudUser newUser) |
addJCRListener, addUpdating, checkNotTrashed, cleanName, cleanNode, cleanRemoved, cleanup, cleanUpdated, commitChanges, configure, connect, copyNode, create, disconnect, editLink, ensureSame, fileNode, findNode, findNodes, getChangeId, getConnectDate, getFile, getId, getInitDate, getLink, getLocalUser, getOrCleanFileNode, getPath, getState, getTitle, hasFile, hasRemoved, hasUpdated, ignore, initCommon, initCopy, initFile, initFolder, initRemove, initUpdating, isConnected, isDrive, isDrive, isIgnored, isInDrive, isLocal, isNew, isNewOrUpdating, isSameDrive, isUpdating, link, listFiles, listFiles, listFiles, loadHistory, migrateName, moveFile, nextChangeId, openFile, openFolder, previewLink, readFile, readNode, readNodes, removeJCRListener, removeUpdating, rollback, rollbackAllChanges, rollbackChanges, rootNode, saveChanges, savedChanges, session, setChangeId, synchronize, systemSession, thumbnailLink, title, unignoreprotected JCRLocalGoogleDrive(GoogleUser 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 - driveNode - sessionProviders - org.exoplatform.clouddrive.CloudDriveExceptionjavax.jcr.RepositoryExceptionprotected JCRLocalGoogleDrive(org.exoplatform.clouddrive.gdrive.GoogleDriveConnector.API apiBuilder,
GoogleProvider 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,
GoogleDriveException,
org.exoplatform.clouddrive.CloudDriveException
apiBuilder - GoogleDriveConnector.API API builderprovider - GoogleProviderdriveNode - Node root of the drivesessionProviders - javax.jcr.RepositoryException - if local storage errororg.exoplatform.clouddrive.CloudDriveException - if cannot load tokens stored locallyGoogleDriveException - if error communicating with Google Drive servicesprotected static GoogleUser loadUser(org.exoplatform.clouddrive.gdrive.GoogleDriveConnector.API apiBuilder, GoogleProvider provider, javax.jcr.Node driveNode) throws javax.jcr.RepositoryException, GoogleDriveException, org.exoplatform.clouddrive.CloudDriveException
apiBuilder - GoogleDriveConnector.API API builderprovider - GoogleProviderdriveNode - Node root of the driveGoogleUserjavax.jcr.RepositoryExceptionGoogleDriveExceptionorg.exoplatform.clouddrive.CloudDriveExceptionpublic GoogleUser getUser()
getUser in class org.exoplatform.clouddrive.CloudDrivepublic void onUserTokenRefresh(org.exoplatform.clouddrive.oauth2.UserToken token)
throws org.exoplatform.clouddrive.CloudDriveException
onUserTokenRefresh in interface org.exoplatform.clouddrive.oauth2.UserTokenRefreshListenerorg.exoplatform.clouddrive.CloudDriveExceptionprotected void refreshAccess()
throws GoogleDriveException
refreshAccess in class org.exoplatform.clouddrive.CloudDriveGoogleDriveExceptionprotected 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 isAccessScopeMatch()
throws javax.jcr.RepositoryException,
org.exoplatform.clouddrive.DriveRemovedException
org.exoplatform.clouddrive.DriveRemovedExceptionjavax.jcr.RepositoryExceptionprotected boolean checkAccessScope(org.exoplatform.clouddrive.CloudDriveAccessException cause)
throws javax.jcr.RepositoryException,
org.exoplatform.clouddrive.RefreshAccessException,
org.exoplatform.clouddrive.DriveRemovedException
RefreshAccessException if currently coded scope doesn't match the one used by the drive
access tokens.cause - CloudDriveAccessExceptionfalse if access coded and currently used access scopes match, otherwise
RefreshAccessException will be thrown with given cause CloudDriveAccessExceptionjavax.jcr.RepositoryExceptionorg.exoplatform.clouddrive.RefreshAccessExceptionorg.exoplatform.clouddrive.DriveRemovedExceptionprotected 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.RepositoryExceptionprotected 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 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 List<com.google.api.services.drive.model.ParentReference> mergeParents(String parentId, List<com.google.api.services.drive.model.ParentReference> cloudParents, Collection<String> localParentIds)
Copyright © 2003–2014 eXo Platform SAS. All rights reserved.