Mercurial > dive4elements > framework
changeset 54:c2fc85e55f9f
Applied patch from slt to set the Configuration Folder into the AbsoluteFileName issue59
artifacts/trunk@257 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Wed, 21 Oct 2009 11:06:23 +0000 |
parents | fecd142b6856 |
children | 9a29899b31e5 |
files | ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/Config.java |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Oct 07 10:59:19 2009 +0000 +++ b/ChangeLog Wed Oct 21 11:06:23 2009 +0000 @@ -1,3 +1,8 @@ +2009-10-21 Tim Englich <tim.englich@intevation.de> + + * src/main/java/de/intevation/artifactdatabase/Config.java (replaceConfigDir): + Applied patch from slt to set the Configuration Folder into the AbsoluteFileName issue59 + 2009-10-07 Sascha L. Teichmann <sascha.teichmann@intevation.de> RELEASE 0.1
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/Config.java Wed Oct 07 10:59:19 2009 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/Config.java Wed Oct 21 11:06:23 2009 +0000 @@ -33,6 +33,8 @@ public static final String CONFIG_FILE = "conf.xml"; + public static final String CONFIG_DIR_PLACEHOLDER = "${artifacts.config.dir}"; + private static Document config; private Config() { @@ -60,6 +62,11 @@ return configDir; } + public static String replaceConfigDir(String path) { + String configDir = getConfigDirectory().getAbsolutePath(); + return path.replace(CONFIG_DIR_PLACEHOLDER, configDir); + } + private static Document loadConfig() { File configDir = getConfigDirectory();