From 00f27e897343477574139a11bf5c4200fc868702 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 18 Mar 2012 01:33:36 +0100 Subject: [PATCH] Make use of the early-encode flag configurable. --- src/de/todesbaum/jsite/application/ProjectInserter.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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); -- 2.7.4