/** * Creates a new remote file by its name. The name is used by {@link TransferManager}s * to identify a file on the remote storage. * * <p>The constructor parses and validates the given name using the * {@link #validateName(String) validateName()} method. While <tt>RemoteFile</tt> has no name * pattern (and never throws an exception), sub-classes might. * * <p><b>Important:</b> Sub-classes must also implement a one-parameter constructor that takes a * <tt>String</tt> argument. This constructor is required by the {@link RemoteFileFactory}. * * @param name The name of the file (as it is identified by Syncany) * @throws StorageException If the name does not match the name pattern defined by the class.<br /> * <b>Note:</b> <tt>RemoteFile</tt> does never throw this exceptions, however, subclasses might. */ public RemoteFile(String name) throws StorageException { this.name = validateName(name); this.attributes = Maps.newHashMap(); }