/*
- * jSite2 - ClientPutComplexDir.java -
- * Copyright © 2008 David Roden
+ * jFCPlib - ClientPutComplexDir.java - Copyright © 2008 David Roden
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* The “ClientPutComplexDir” lets you upload a directory with different sources
* for each file.
- *
+ *
* @see FileEntry
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
/**
* Creates a new “ClientPutComplexDir” with the given identifier and URI.
- *
+ *
* @param identifier
* The identifier of the request
* @param uri
/**
* Sets the verbosity of the request.
- *
+ *
* @param verbosity
* The verbosity of the request
*/
/**
* Sets the maximum number of retries for failed blocks.
- *
+ *
* @param maxRetries
* The maximum number of retries for failed blocks, or
* <code>-1</code> to retry endlessly
/**
* Sets the priority of the request.
- *
+ *
* @param priority
* The priority of the request
*/
/**
* Sets whether to generate the final URI only.
- *
+ *
* @param getCHKOnly
* <code>true</code> to generate the final CHK only,
* <code>false</code> to complete the insert
/**
* Sets whether the request is on the global queue.
- *
+ *
* @param global
* <code>true</code> to put the request on the global queue,
* <code>false</code> to put it on the client-local queue
/**
* Sets whether the node should not try to compress the data.
- *
+ *
* @param dontCompress
* <code>true</code> to skip compression of the data,
* <code>false</code> to try and compress the data
/**
* Sets the client token of the request.
- *
+ *
* @param clientToken
* The client token of the request
*/
/**
* Sets the persistence of the request.
- *
+ *
* @param persistence
* The persistence of the request
*/
/**
* Sets the target filename of the request. This is useful for inserts that
* go to “CHK@” only and creates a manifest with a single file.
- *
+ *
* @param targetFilename
* The target filename
*/
/**
* Sets whether to encode the complete data early to generate the
* {@link URIGenerated} message early.
- *
+ *
* @param earlyEncode
* <code>true</code> to encode the complete data early,
* <code>false</code> otherwise
/**
* Sets the default name. This is the name of the file that should be shown
* if no file was specified.
- *
+ *
* @param defaultName
* The default name
*/
/**
* Adds an entry for a file.
- *
+ *
* @param fileEntry
* The file entry to add
*/
public void addFileEntry(FileEntry fileEntry) {
Map<String, String> fields = fileEntry.getFields();
- for (Entry<String, String> fieldEntry: fields.entrySet()) {
+ for (Entry<String, String> fieldEntry : fields.entrySet()) {
setField("Files." + fileIndex + "." + fieldEntry.getKey(), fieldEntry.getValue());
}
fileIndex++;
* {@inheritDoc}
* <p>
* Do not call this method to add input streams! The input streams, if any,
- * will be taken directly from the {@link FileEntry}s and the stream you
- * set here will be overridden!
+ * will be taken directly from the {@link FileEntry}s and the stream you set
+ * here will be overridden!
*/
@Override
public void setPayloadInputStream(InputStream payloadInputStream) {