diff artifact-database/src/main/java/de/intevation/artifactdatabase/Config.java @ 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 8cd770330f1b
children 8447467cef86
line wrap: on
line diff
--- 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 '"

http://dive4elements.wald.intevation.org