From 0e6e082a6cb587f93cd364d08bea23bde9191c82 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 14 Jun 2011 20:36:39 +0200 Subject: [PATCH] Add enumeration for location of the configuration file. --- src/de/todesbaum/jsite/main/Configuration.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/de/todesbaum/jsite/main/Configuration.java b/src/de/todesbaum/jsite/main/Configuration.java index d03d70a..bffea23 100644 --- a/src/de/todesbaum/jsite/main/Configuration.java +++ b/src/de/todesbaum/jsite/main/Configuration.java @@ -49,6 +49,27 @@ import de.todesbaum.util.xml.XML; */ public class Configuration { + /** + * The location of the configuration directory. + * + * @author David ‘Bombe’ Roden <bombe@freenetproject.org> + */ + public enum ConfigurationDirectory { + + /** The configuration is in the same directory as the JAR file. */ + NEXT_TO_JAR_FILE, + + /** + * The configuration is in the user’s home directory. This is the + * pre-0.9.3 default. + */ + HOME_DIRECTORY; + + } + + /** The configuration directory. */ + private ConfigurationDirectory configurationDirectory = ConfigurationDirectory.HOME_DIRECTORY; + /** The name of the file the configuration is stored to. */ private String filename; -- 2.7.4