From: David ‘Bombe’ Roden Date: Sun, 18 Mar 2012 00:33:36 +0000 (+0100) Subject: Make use of the early-encode flag configurable. X-Git-Tag: 0.10-rc1~11 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=00f27e897343477574139a11bf5c4200fc868702;p=jSite.git Make use of the early-encode flag configurable. --- diff --git a/src/de/todesbaum/jsite/application/ProjectInserter.java b/src/de/todesbaum/jsite/application/ProjectInserter.java index b328527..7c7c89c 100644 --- a/src/de/todesbaum/jsite/application/ProjectInserter.java +++ b/src/de/todesbaum/jsite/application/ProjectInserter.java @@ -90,6 +90,9 @@ public class ProjectInserter implements FileScannerListener, Runnable { /** Progress listener for payload transfers. */ private ProgressListener progressListener; + /** Whether to use “early encode.” */ + private boolean useEarlyEncode; + /** * Adds a listener to the list of registered listeners. * @@ -216,6 +219,17 @@ public class ProjectInserter implements FileScannerListener, Runnable { } /** + * Sets whether to use the “early encode“ flag for the insert. + * + * @param useEarlyEncode + * {@code true} to set the “early encode” flag for the insert, + * {@code false} otherwise + */ + public void setUseEarlyEncode(boolean useEarlyEncode) { + this.useEarlyEncode = useEarlyEncode; + } + + /** * Starts the insert. * * @param progressListener @@ -405,7 +419,7 @@ public class ProjectInserter implements FileScannerListener, Runnable { } putDir.setVerbosity(Verbosity.ALL); putDir.setMaxRetries(-1); - putDir.setEarlyEncode(false); + putDir.setEarlyEncode(useEarlyEncode); putDir.setManifestPutter(ManifestPutter.DEFAULT); for (ScannedFile file : files) { FileEntry fileEntry = createFileEntry(file, edition);