Mercurial > dive4elements > framework
changeset 61:911c684c8a1c
Removed config path of chart template which doesn't belong here from Config.
artifacts/trunk@432 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 15 Dec 2009 15:47:16 +0000 |
parents | 85d996328c8a |
children | 76abf0c64d3b |
files | ChangeLog artifact-database/src/main/java/de/intevation/artifactdatabase/Config.java |
diffstat | 2 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Dec 11 10:12:15 2009 +0000 +++ b/ChangeLog Tue Dec 15 15:47:16 2009 +0000 @@ -1,3 +1,10 @@ +2009-12-15 Ingo Weinzierl <ingo.weinzierl@intevation.de> + + Issue106 + + * artifact-database/src/main/java/de/intevation/artifactdatabase/Config.java: + Removed path to chart template which doesn't belong here. + 2009-12-11 Sascha L. Teichmann <sascha.teichmann@intevation.de> * artifact-database/src/main/java/de/intevation/artifactdatabase/ProxyArtifact.java:
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/Config.java Fri Dec 11 10:12:15 2009 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/Config.java Tue Dec 15 15:47:16 2009 +0000 @@ -33,8 +33,6 @@ public static final String CONFIG_FILE = "conf.xml"; - public static final String CHART_TEMPLATE = "charttemplate.xml"; - public static final String CONFIG_DIR_PLACEHOLDER = "${artifacts.config.dir}"; private static Document config; @@ -44,15 +42,11 @@ public static synchronized final Document getConfig() { if (config == null) { - config = loadConfig(CONFIG_FILE); + config = loadConfig(); } return config; } - public static Document getChartTemplate() { - return loadConfig(CHART_TEMPLATE); - } - public static File getConfigDirectory() { String configDirString = System.getProperty(CONFIG_DIR); @@ -73,11 +67,11 @@ return path.replace(CONFIG_DIR_PLACEHOLDER, configDir); } - private static Document loadConfig(String config) { + private static Document loadConfig() { File configDir = getConfigDirectory(); - File file = new File(configDir, config); + File file = new File(configDir, CONFIG_FILE); if (!file.canRead() && !file.isFile()) { logger.error("Cannot read config file '"