Class JCRLocalDropboxDrive.Connect
- java.lang.Object
-
- org.exoplatform.clouddrive.dropbox.JCRLocalDropboxDrive.Connect
-
- All Implemented Interfaces:
JCRLocalDropboxDrive.Changes,org.exoplatform.services.cms.clouddrives.CloudDrive.Command
- Enclosing class:
- JCRLocalDropboxDrive
protected class JCRLocalDropboxDrive.Connect extends Object implements JCRLocalDropboxDrive.Changes
Connect algorithm for Drobpox drive.
-
-
Field Summary
Fields Modifier and Type Field Description protected DropboxAPIapiThe api.
-
Constructor Summary
Constructors Modifier Constructor Description protectedConnect()Instantiates a new connect.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudFile local)Process locally applied file (it can be any extra operations including the gathering of effected files/stats or chunk saving in JCR).booleancanApply(String parentId, String fileId)Answers if given file ID under its parent (by ID) already applied locally.protected voidexecLocal()Execute Connect from current thread.protected voidfetchFiles()voidundo(org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudFile local)Undo locally applied file or remove existing.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.exoplatform.clouddrive.dropbox.JCRLocalDropboxDrive.Changes
removed
-
-
-
-
Field Detail
-
api
protected final DropboxAPI api
The api.
-
-
Constructor Detail
-
Connect
protected Connect() throws javax.jcr.RepositoryException, org.exoplatform.services.cms.clouddrives.DriveRemovedExceptionInstantiates a new connect.- Throws:
javax.jcr.RepositoryException- the repository exceptionorg.exoplatform.services.cms.clouddrives.DriveRemovedException- the drive removed exception
-
-
Method Detail
-
fetchFiles
protected void fetchFiles() throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryException- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveExceptionjavax.jcr.RepositoryException
-
execLocal
protected void execLocal() throws org.exoplatform.services.cms.clouddrives.CloudDriveException, javax.jcr.RepositoryExceptionExecute Connect from current thread.- Throws:
org.exoplatform.services.cms.clouddrives.CloudDriveException- the cloud drive exceptionjavax.jcr.RepositoryException- the repository exception
-
apply
public void apply(org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudFile local) throws javax.jcr.RepositoryException, org.exoplatform.services.cms.clouddrives.CloudDriveExceptionProcess locally applied file (it can be any extra operations including the gathering of effected files/stats or chunk saving in JCR).- Specified by:
applyin interfaceJCRLocalDropboxDrive.Changes- Parameters:
local-JCRLocalCloudFilechanged file- Throws:
javax.jcr.RepositoryException- the repository exceptionorg.exoplatform.services.cms.clouddrives.CloudDriveException- the cloud drive exception
-
undo
public void undo(org.exoplatform.services.cms.clouddrives.jcr.JCRLocalCloudFile local) throws javax.jcr.RepositoryException, org.exoplatform.services.cms.clouddrives.CloudDriveExceptionUndo locally applied file or remove existing.- Specified by:
undoin interfaceJCRLocalDropboxDrive.Changes- Parameters:
local- the changed file- Throws:
javax.jcr.RepositoryException- the repository exceptionorg.exoplatform.services.cms.clouddrives.CloudDriveException- the cloud drive exception
-
canApply
public boolean canApply(String parentId, String fileId)
Answers if given file ID under its parent (by ID) already applied locally.- Specified by:
canApplyin interfaceJCRLocalDropboxDrive.Changes- Parameters:
parentId-StringfileId-String- Returns:
- boolean,
trueif file was already applied,falseotherwise.
-
-