Class TransactionRemoteFile
- java.lang.Object
-
- org.syncany.plugins.transfer.files.RemoteFile
-
- org.syncany.plugins.transfer.files.TransactionRemoteFile
-
public class TransactionRemoteFile extends RemoteFile
The transaction file represents a manifest of a transaction on the remote storage.Name pattern: The name pattern of a transaction file is transaction-<filehexhashcode>.
-
-
Constructor Summary
Constructors Constructor Description TransactionRemoteFile(java.lang.String name)Initializes a new transaction file, given a name.TransactionRemoteFile(RemoteTransaction remoteTransaction)Initializes a new transaction file, given the transaction itself.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringvalidateName(java.lang.String name)Parses the name of the file and validates it against the classes name pattern.-
Methods inherited from class org.syncany.plugins.transfer.files.RemoteFile
createRemoteFile, createRemoteFile, equals, getAttributes, getName, hashCode, setAttributes, toString
-
-
-
-
Constructor Detail
-
TransactionRemoteFile
public TransactionRemoteFile(java.lang.String name) throws StorageException
Initializes a new transaction file, given a name.- Parameters:
name- transaction file name; must always match theNAME_PATTERN- Throws:
StorageException- If the name is not match the name pattern
-
TransactionRemoteFile
public TransactionRemoteFile(RemoteTransaction remoteTransaction) throws StorageException
Initializes a new transaction file, given the transaction itself.- Parameters:
remoteTransaction- the remoteTransaction for which a file is needed- Throws:
StorageException- If the name is not match the name pattern
-
-
Method Detail
-
validateName
protected java.lang.String validateName(java.lang.String name) throws StorageException
Description copied from class:RemoteFileParses the name of the file and validates it against the classes name pattern. WhileRemoteFilehas no name pattern (and never throws an exception), sub-classes might by overriding this method.- Overrides:
validateNamein classRemoteFile- Parameters:
name- The name of the file (as it is identified by Syncany)- Returns:
- Returns a (potentially changed) name, after validating the name
- Throws:
StorageException- If the name does not match the name pattern defined by the class.
Note:RemoteFiledoes never throw this exceptions, however, subclasses might.
-
-