Package org.syncany.operations.init
Class ConnectOperation
- java.lang.Object
-
- org.syncany.operations.Operation
-
- org.syncany.operations.init.AbstractInitOperation
-
- org.syncany.operations.init.ConnectOperation
-
public class ConnectOperation extends AbstractInitOperation
The connect operation connects to an existing repository at a given remote storage location. Its responsibilities include:- Downloading of the repo file. If it is encrypted, also downloading the master file to allow decrypting the repo file.
- If encrypted: Querying the user for the password and creating the master key using the password and the master salt.
- If encrypted: Decrypting and verifying the repo file.
- Creating the local Syncany folder structure in the local directory (.syncany folder and the sub-structure) and copying the repo/master file to it.
-
-
Field Summary
-
Fields inherited from class org.syncany.operations.init.AbstractInitOperation
eventBus, listener
-
-
Constructor Summary
Constructors Constructor Description ConnectOperation(ConnectOperationOptions options, UserInteractionListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.io.File
downloadFile(TransferManager transferManager, RemoteFile remoteFile)
ConnectOperationResult
execute()
Executes the operation synchronously and returns a result when the operation exits.-
Methods inherited from class org.syncany.operations.init.AbstractInitOperation
createAppDirs, createTransferManagerFromNullConfig, deleteAppDirs, fireNotifyCreateMaster
-
-
-
-
Constructor Detail
-
ConnectOperation
public ConnectOperation(ConnectOperationOptions options, UserInteractionListener listener)
-
-
Method Detail
-
execute
public ConnectOperationResult execute() throws java.lang.Exception
Description copied from class:Operation
Executes the operation synchronously and returns a result when the operation exits. Using covariance is recommend, that is OperationFoo should override execute so as to return a OperationFooResult rather than OperationResult.
-
downloadFile
protected java.io.File downloadFile(TransferManager transferManager, RemoteFile remoteFile) throws StorageException
- Throws:
StorageException
-
-