From: David ‘Bombe’ Roden Date: Sun, 18 Mar 2012 00:33:11 +0000 (+0100) Subject: Add methods to store and load use-early-encode option. X-Git-Tag: 0.10-rc1~12 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=f22329cd64c5818593a8dbc314544848e914d909;p=jSite.git Add methods to store and load use-early-encode option. --- diff --git a/src/de/todesbaum/jsite/main/Configuration.java b/src/de/todesbaum/jsite/main/Configuration.java index a4e7f29..45bcc9e 100644 --- a/src/de/todesbaum/jsite/main/Configuration.java +++ b/src/de/todesbaum/jsite/main/Configuration.java @@ -570,4 +570,27 @@ public class Configuration { } } + /** + * Returns whether to use the “early encode“ flag for the insert. + * + * @return {@code true} to set the “early encode” flag for the insert, + * {@code false} otherwise + */ + public boolean useEarlyEncode() { + return getNodeBooleanValue(new String[] { "use-early-encode" }, false); + } + + /** + * 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 + * @return This configuration + */ + public Configuration setUseEarlyEncode(boolean useEarlyEncode) { + rootNode.replace("use-early-encode", String.valueOf(useEarlyEncode)); + return this; + } + }