Package org.syncany.operations.init
Class ApplicationLink
- java.lang.Object
-
- org.syncany.operations.init.ApplicationLink
-
public class ApplicationLink extends java.lang.Object
The application link class represents asyncany://link. It allowed creating and parsing a link. The class has two modes of operation:To create a new application link from an existing repository, call the
ApplicationLink(org.syncany.plugins.transfer.TransferSettings, boolean)constructor and subsequently either callcreatePlaintextLink()orcreateEncryptedLink(SaltedSecretKey). This method will typically be called during the 'init' or 'genlink' process.To parse an existing application link and return the relevant
TransferSettings, call theApplicationLink(String)constructor and subsequently callcreateTransferSettings()orcreateTransferSettings(SaltedSecretKey). This method will typically be called during the 'connect' process.
-
-
Constructor Summary
Constructors Constructor Description ApplicationLink(java.lang.String applicationLink)ApplicationLink(TransferSettings transferSettings, boolean shortUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcreateEncryptedLink(SaltedSecretKey masterKey)java.lang.StringcreatePlaintextLink()TransferSettingscreateTransferSettings()TransferSettingscreateTransferSettings(SaltedSecretKey masterKey)byte[]getMasterKeySalt()booleanisEncrypted()
-
-
-
Constructor Detail
-
ApplicationLink
public ApplicationLink(TransferSettings transferSettings, boolean shortUrl)
-
ApplicationLink
public ApplicationLink(java.lang.String applicationLink) throws java.lang.IllegalArgumentException, StorageException
- Throws:
java.lang.IllegalArgumentExceptionStorageException
-
-
Method Detail
-
isEncrypted
public boolean isEncrypted()
-
getMasterKeySalt
public byte[] getMasterKeySalt()
-
createTransferSettings
public TransferSettings createTransferSettings(SaltedSecretKey masterKey) throws java.lang.Exception
- Throws:
java.lang.Exception
-
createTransferSettings
public TransferSettings createTransferSettings() throws java.lang.Exception
- Throws:
java.lang.Exception
-
createEncryptedLink
public java.lang.String createEncryptedLink(SaltedSecretKey masterKey) throws java.lang.Exception
- Throws:
java.lang.Exception
-
createPlaintextLink
public java.lang.String createPlaintextLink() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-