Modified config system:
authormh <mh>
Mon, 17 Sep 2001 21:00:57 +0000 (21:00 +0000)
committermh <mh>
Mon, 17 Sep 2001 21:00:57 +0000 (21:00 +0000)
created MirConfig class, a subclass of Configuration.
Dropped the "Home" and "ActionRoot" config entries

We now find them via the servlet context. all config values are loaded in
a HashMap accessible via MirConfig.getProp("propname").
NOTE: this replaces Configuration.getProperty("name").

56 files changed:
source/Mir.java
source/OpenMir.java
source/config.properties-dist
source/mir/entity/AbstractEntity.java
source/mir/entity/EntityList.java
source/mir/misc/Configuration.java
source/mir/misc/HTMLTemplateProcessor.java
source/mir/misc/Helper.java
source/mir/misc/MirConfig.java [new file with mode: 0755]
source/mir/servlet/AbstractServlet.java
source/mir/servlet/ServletModule.java
source/mir/servlet/ServletModuleMonitor.java
source/mir/storage/Database.java
source/mir/storage/DatabaseAdaptorMySQL.java
source/mir/storage/DatabaseAdaptorOracle.java
source/mir/storage/DatabaseAdaptorPostgresql.java
source/mir/storage/DatabaseAdaptorSybase.java
source/mircoders/input/XmlInputParser.java
source/mircoders/module/ModuleBreaking.java
source/mircoders/module/ModuleComment.java
source/mircoders/module/ModuleContent.java
source/mircoders/module/ModuleFeature.java
source/mircoders/module/ModuleGruppen.java
source/mircoders/module/ModuleImages.java
source/mircoders/module/ModuleLanguage.java
source/mircoders/module/ModuleLinksImcs.java
source/mircoders/module/ModuleMediafolder.java
source/mircoders/module/ModuleMessage.java
source/mircoders/module/ModuleSchwerpunkt.java
source/mircoders/module/ModuleTopics.java
source/mircoders/module/ModuleUsers.java
source/mircoders/producer/Producer.java
source/mircoders/producer/ProducerContent.java
source/mircoders/producer/ProducerFeature.java
source/mircoders/producer/ProducerImages.java
source/mircoders/producer/ProducerList.java
source/mircoders/producer/ProducerNavigation.java
source/mircoders/producer/ProducerOpenPosting.java
source/mircoders/producer/ProducerOverview.java
source/mircoders/producer/ProducerStartPage.java
source/mircoders/producer/ProducerTopics.java
source/mircoders/producer/ProducerWap.java
source/mircoders/servlet/ServletModuleBreaking.java
source/mircoders/servlet/ServletModuleComment.java
source/mircoders/servlet/ServletModuleContent.java
source/mircoders/servlet/ServletModuleGroups.java
source/mircoders/servlet/ServletModuleImages.java
source/mircoders/servlet/ServletModuleLanguage.java
source/mircoders/servlet/ServletModuleLinksImcs.java
source/mircoders/servlet/ServletModuleMediafolder.java
source/mircoders/servlet/ServletModuleMessage.java
source/mircoders/servlet/ServletModuleOpenIndy.java
source/mircoders/servlet/ServletModuleProducer.java
source/mircoders/servlet/ServletModuleSchwerpunkt.java
source/mircoders/servlet/ServletModuleTopics.java
source/mircoders/servlet/ServletModuleUsers.java

index 72432f0..d4fca0c 100755 (executable)
@@ -177,7 +177,7 @@ public class Mir extends AbstractServlet
       SimpleHash modelRoot = new SimpleHash();
       modelRoot.put("errorstring", new SimpleScalar(errorString));
       modelRoot.put("date", new SimpleScalar(StringUtil.date2readableDateTime(new GregorianCalendar())));
-      HTMLTemplateProcessor.process(res,Configuration.getProperty("Mir.ErrorTemplate"),modelRoot,out);
+      HTMLTemplateProcessor.process(res,MirConfig.getProp("Mir.ErrorTemplate"),modelRoot,out);
       out.close();
     }
     catch (Exception e) {
index 4b1d178..37b4d8a 100755 (executable)
@@ -72,7 +72,7 @@ public class OpenMir extends AbstractServlet {
       SimpleHash modelRoot = new SimpleHash();
       modelRoot.put("errorstring", new SimpleScalar(errorString));
       modelRoot.put("date", new SimpleScalar(StringUtil.date2readableDateTime(new GregorianCalendar())));
-      HTMLTemplateProcessor.process(res,Configuration.getProperty("Mir.ErrorTemplate"),modelRoot,out);
+      HTMLTemplateProcessor.process(res,MirConfig.getProp("Mir.ErrorTemplate"),modelRoot,out);
       out.close();
     }
     catch (Exception e) {
index 9c87ced..b235bc7 100755 (executable)
@@ -64,29 +64,6 @@ Producer.StorageRoot=/pub/Dokumente/Indymedia/de-tech/Mir/produced
 # DYNAMIC SITE CONFIG 
 #
 
-# Home is the directory in which the compiled Java binaries are stored.
-# Think of it as "install directory" of Mir.
-# This collection of binaries is also referred to as "webapp" in Tomcat
-# terms.
-# Because Mir is a collection of servlets, Tomcat has to know where the
-# servlets reside. So you have to add a link to the below directory in the
-# webapps directory of Tomcat:
-# cd /usr/share/tomcat/webapps ; ln -s $Home Mir
-# where $Home is the below directory and Mir is the first directory level
-# in HTMLTemplateProcessor.ActionRoot
-# The trailing slash is important.
-Home=/pub/Dokumente/Indymedia/de-tech/Mir/
-
-# The following item is the class that is to be invoked by Tomcat for admin
-# maintainance. It is relative to the webapps directory in Tomcat.
-# To determine what class file is to be loaded, start in the webapps
-# directory. In the following config item, replace "/servlet/" by
-# "/WEB-INF/classes/" and append ".class". This is the name of the class
-# file to be executed.
-HTMLTemplateProcessor.ActionRoot=/Mir/servlet/Mir
-
-HTMLTemplateProcessor.DocRoot=/Mir
-
 # the url of the openposting-servlet
 Producer.OpenAction=http://indy.code-fu.de/Mir/servlet/OpenMir
 
@@ -323,4 +300,4 @@ Xsl.Fo.Content=producer/frontpage_fo.xsl
 Xsl.StartPage=producer/index.xsl
 Xsl.TopicList=producer/topic.xsl
 Xsl.OpenList=producer/open.xsl
-Xsl.Wap=producer/wml2.xsl
\ No newline at end of file
+Xsl.Wap=producer/wml2.xsl
index 3f2c0db..2c2061c 100755 (executable)
@@ -30,7 +30,7 @@ public class AbstractEntity implements Entity
        protected ArrayList         streamedInput=null;
        private static int instances = 0;
                static {
-                       theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Entity.Logfile"));
+                       theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Entity.Logfile"));
                }
 
                public AbstractEntity() {
index 98883c8..64fcac4 100755 (executable)
@@ -33,7 +33,7 @@ public class EntityList {
                public EntityList(){
                        this.theEntityArrayList = new ArrayList();
                        if (theLog == null)
-                        this.theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Entity.Logfile"));
+                        this.theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Entity.Logfile"));
                }
 
        /**
index b8f5d4d..43bd06f 100755 (executable)
@@ -9,7 +9,6 @@ import  java.net.*;
 import  java.io.*;
 import  java.util.*;
 import  java.lang.*;
-import  com.javaexchange.dbConnectionBroker.*;
 
 
 /**
@@ -18,50 +17,21 @@ import  com.javaexchange.dbConnectionBroker.*;
  */
 public class Configuration {
 
+  private static int      instances=0;
+
   private static HashMap  confs = new HashMap(); // key: conffilename, confHash
-  private static HashMap c = new HashMap();
   private String          confFilename;
   
   private static String   defaultconfFilename;
-  private static int      instances=0;
   static ResourceBundle conf;
 
-  public static void initConfig(String confName) {
+  protected static void initConfResource(String confName) {
     conf = ResourceBundle.getBundle(confName);
     confs.put("confname",confName);
   }
 
-  public static void addBroker(String driver, String URL){
-
-    System.err.println("--trying to add broker");
-    String username,passwd,min,max,log,reset;
-
-    if(!c.containsKey("Pool.broker")){
-      username=conf.getString("Database.Username");
-      passwd=conf.getString("Database.Password");
-      min=conf.getString("Database.poolMin");
-      max=conf.getString("Database.poolMax");
-      log=conf.getString("Home") + conf.getString("Database.PoolLog");
-      reset=conf.getString("Database.poolResetTime");
-
-      try{
-        System.err.println("-- making Broker for -"
-                            +driver+" - " +URL
-                            + " log " + log + " user "
-                            + username + " pass: " + passwd);
-
-        DbConnectionBroker br = new DbConnectionBroker(driver,URL,username,passwd,(new Integer(min)).intValue(),
-                                                      (new Integer(max)).intValue(),log,(new Float(reset)).floatValue());
-        if (br!=null){
-          instances++;
-          c.put("Pool.broker",br);
-        } else {
-            throw new Exception();
-        }
-      } catch(Exception e){
-        System.err.println("Der ConnectionBroker konnte nicht initializiert werden"+ e.toString());e.printStackTrace();
-      }
-    } // end if
+  protected static Enumeration getResourceKeys() {
+    return conf.getKeys(); 
   }
 
 
@@ -69,7 +39,7 @@ public class Configuration {
    * Fragt ab, ob das Betriebssystem Windows ist.
    * @return true wenn ja, sonst false.
    */
-  public static boolean isWindows() {
+  protected static boolean isWindows() {
     return System.getProperty("os.name").toLowerCase().indexOf("win") >= 0;
   }
 
@@ -78,7 +48,7 @@ public class Configuration {
    * @param propName
    * @return Wert der Property
    */
-  public static String getProperty(String propName) {  // default
+  protected static String getProperty(String propName) {  // default
     return conf.getString(propName);
   }
   
@@ -86,7 +56,7 @@ public class Configuration {
    * Checks if open posting should be direct or indirect
    * @return true if open posting should be direct
    */
-  public static boolean directOp() {
+  protected static boolean directOp() {
     String op = conf.getString("DirectOpenposting");
     if(op.equals("yes") || op.equals("Yes") || op.equals("y") || op.equals("Y")){
       return true;
@@ -101,7 +71,7 @@ public class Configuration {
    * @param propName
    * @return Wert der Property
    */
-  public String getProperty(String filename ,String theModule, String propName) {
+  protected String getProperty(String filename ,String theModule, String propName) {
     return getProperty(filename, theModule + "." + propName);
   }
 
@@ -111,7 +81,7 @@ public class Configuration {
    * @param propName
    * @return Wert der Property
    */
-  public static String getProperty(String filename, String propName) {
+  protected static String getProperty(String filename, String propName) {
     if (filename != null) {
       String prop = null;
       HashMap conf = ((HashMap)confs.get("confname"));
@@ -136,20 +106,6 @@ public class Configuration {
   }
 
   /**
-   * Liefert DBConnectionBroker einer Configuration zurueck
-   * @param confFilename
-   * @return DBConnectionBroker
-   */
-  public static DbConnectionBroker getBroker() {
-    DbConnectionBroker broker=null;
-    broker=(DbConnectionBroker)c.get("Pool.broker");
-    if (broker==null) {
-      System.err.println("Konnte kein ConnectionPoolBroker initialisiert werden");
-    }
-    return broker;
-  }
-
-  /**
    * Liefert Hashtabel mit den Konfigurationen
    * @return
    */
@@ -157,26 +113,15 @@ public class Configuration {
     return confs;
   }
 
-  public static DbConnectionBroker getBrokerInfo(){
-    return (DbConnectionBroker)c.get("Pool.broker");
-  }
-
 
   /**
    * Finalize Methode
    */
-  public void finalize(){
+  protected void finalize(){
     instances --;
     try {
       super.finalize();
     } catch (Throwable t) {}
   }
 
-  /**
-   * Liefert Anzahl der Instantiierten DBConnectionBroker zurueck
-   * @return
-   */
-  public static int getBrokerInstances() {
-    return instances;
-  }
 } //end of class
index 195adee..1b2ae16 100755 (executable)
@@ -30,28 +30,28 @@ public final class HTMLTemplateProcessor {
     private static String               videoHost;
     private static String               imageHost;
     private static String               openAction;
-    protected static String producerDocRoot = Configuration.getProperty("Producer.DocRoot");
-    protected static String producerStorageRoot = Configuration.getProperty("Producer.StorageRoot");
+    protected static String producerDocRoot = MirConfig.getProp("Producer.DocRoot");
+    protected static String producerStorageRoot = MirConfig.getProp("Producer.StorageRoot");
 
 
     //
     // Initialisierung
 
     static {
-      templateDir = Configuration.getProperty("Home") + Configuration.getProperty("HTMLTemplateProcessor.Dir");
+      templateDir = MirConfig.getProp("Home") + MirConfig.getProp("HTMLTemplateProcessor.Dir");
       templateCache = new FileTemplateCache(templateDir);
       templateCache.setLoadingPolicy(templateCache.LOAD_ON_DEMAND);
-      //templateCache.startAutoUpdate();
-      theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("HTMLTemplateProcessor.Logfile"));
-      docRoot = Configuration.getProperty("HTMLTemplateProcessor.DocRoot");
-      actionRoot = Configuration.getProperty("HTMLTemplateProcessor.ActionRoot");
-      openAction = Configuration.getProperty("Producer.OpenAction");
-      productionHost = Configuration.getProperty("Producer.ProductionHost");
-      videoHost = Configuration.getProperty("Producer.VideoHost");
-      audioHost = Configuration.getProperty("Producer.AudioHost");
-      imageHost = Configuration.getProperty("Producer.Image.Host");
-      producerDocRoot = Configuration.getProperty("Producer.DocRoot");
-      producerStorageRoot = Configuration.getProperty("Producer.StorageRoot");
+      templateCache.startAutoUpdate();
+      theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("HTMLTemplateProcessor.Logfile"));
+      docRoot = MirConfig.getProp("RootUri");
+      actionRoot = docRoot + "/servlet/" + MirConfig.getProp("ServletName");
+      openAction = MirConfig.getProp("Producer.OpenAction");
+      productionHost = MirConfig.getProp("Producer.ProductionHost");
+      videoHost = MirConfig.getProp("Producer.VideoHost");
+      audioHost = MirConfig.getProp("Producer.AudioHost");
+      imageHost = MirConfig.getProp("Producer.Image.Host");
+      producerDocRoot = MirConfig.getProp("Producer.DocRoot");
+      producerStorageRoot = MirConfig.getProp("Producer.StorageRoot");
 
 
     }
index 0dad690..7fce85f 100755 (executable)
@@ -20,7 +20,7 @@ public class Helper {
         * returns 255 if rsync should not be used
    */
   public static int rsync(){
-               if(!Configuration.getProperty("Rsync").toLowerCase().equals("yes")){
+               if(!MirConfig.getProp("Rsync").toLowerCase().equals("yes")){
                        return 255;
                }
                
@@ -28,7 +28,7 @@ public class Helper {
     int returnValue = -1;
     try {
       Runtime run = Runtime.getRuntime();
-      p = run.exec(Configuration.getProperty("Rsync.Script.Path"));
+      p = run.exec(MirConfig.getProp("Rsync.Script.Path"));
       returnValue = p.waitFor();
     } catch (IOException e) {
       return returnValue;
diff --git a/source/mir/misc/MirConfig.java b/source/mir/misc/MirConfig.java
new file mode 100755 (executable)
index 0000000..2aa322c
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * put your module comment here
+ */
+
+
+package  mir.misc;
+
+import  javax.servlet.http.*;
+import  java.net.*;
+import  java.io.*;
+import  java.util.*;
+import  java.lang.*;
+import  com.javaexchange.dbConnectionBroker.*;
+
+/**
+ * Title:        Mir
+ * Description:  Class that allows access to all Mir 
+ *               config values
+ * Copyright:    Copyright (c) 2001
+ * Company:      Indymedia
+ * @author       mh <heckmann@hbe.ca>
+ * @version 0.1
+ */
+
+
+/**
+ * This class is a layer above the Configuration
+ * It manages access to config variables that are 
+ * both generated on the fly and found in the config file.
+ */
+
+public class MirConfig extends Configuration {
+  private static HashMap configHash = new HashMap();
+  private static HashMap brokerHash = new HashMap();
+
+  private static int      instances=0;
+
+  /**
+   * Initializes Configuration hash that contains all values.
+   * loads the config.properties file and any other values
+   * @param Uri, the root Uri of the install
+   * @param Home, The absolute path if the install root.
+   * @param Name, The name of the servlet (usually "Mir")
+   * @param confName, the name of the config file to load.
+   */
+  public static void initConfig(String Home, String Uri, String Name, String confName) {
+    initConfResource(confName);
+
+    configHash.put("Home", Home);
+    configHash.put("RootUri", Uri);
+    configHash.put("ServletName", Name);
+   
+    Enumeration ResKeys = getResourceKeys();
+    while(ResKeys.hasMoreElements()) {
+      String keyNm = (String)ResKeys.nextElement();
+      configHash.put(keyNm, getProperty(keyNm));
+    }
+  }
+
+  /**
+   * Returns the property asked for by pulling it out a HashMap
+   * @param a String containing the property name (key)
+   * @return a String containing the prop. value
+   */
+  public static String getProp(String PropName) {
+    return (String)configHash.get(PropName);
+  }
+
+  public static void addBroker(String driver, String URL){
+
+    System.err.println("--trying to add broker");
+    String username,passwd,min,max,log,reset;
+
+    if(!brokerHash.containsKey("Pool.broker")){
+      username=getProp("Database.Username");
+      passwd=getProp("Database.Password");
+      min=getProp("Database.poolMin");
+      max=getProp("Database.poolMax");
+      log=getProp("Home") + configHash.get("Database.PoolLog");
+      reset=getProp("Database.poolResetTime");
+
+      try{
+        System.err.println("-- making Broker for -"
+                            +driver+" - " +URL
+                            + " log " + log + " user "
+                            + username + " pass: " + passwd);
+
+        DbConnectionBroker br = new DbConnectionBroker(driver,URL,username,passwd,(new Integer(min)).intValue(),
+                                                      (new Integer(max)).intValue(),log,(new Float(reset)).floatValue());
+        if (br!=null){
+          instances++;
+          brokerHash.put("Pool.broker",br);
+        } else {
+            throw new Exception();
+        }
+      } catch(Exception e){
+        System.err.println("Der ConnectionBroker konnte nicht initializiert werden"+ e.toString());e.printStackTrace();
+      }
+    } // end if
+  }
+
+  /**
+   * Liefert DBConnectionBroker einer Configuration zurueck
+   * @param confFilename
+   * @return DBConnectionBroker
+   */
+  public static DbConnectionBroker getBroker() {
+    DbConnectionBroker broker=null;
+    broker=(DbConnectionBroker)brokerHash.get("Pool.broker");
+    if (broker==null) {
+      System.err.println("Konnte kein ConnectionPoolBroker initialisiert werden");
+    }
+    return broker;
+  }
+
+  /**
+   * Liefert Anzahl der Instantiierten DBConnectionBroker zurueck
+   * @return
+   */
+  public static int getBrokerInstances() {
+    return instances;
+  }
+
+  public static DbConnectionBroker getBrokerInfo(){
+    return (DbConnectionBroker)brokerHash.get("Pool.broker");
+  }
+
+  /**
+   * Finalize Methode
+   */
+  public void finalize(){
+    instances --;
+    try {
+      super.finalize();
+    } catch (Throwable t) {}
+  }
+
+
+}
index 1a19445..fb774c6 100755 (executable)
@@ -1,13 +1,16 @@
 package mir.servlet;
 
+//import javax.servlet.*;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 import java.io.File;
 import java.util.Locale;
+import java.util.HashMap;
 
 import mir.misc.HTMLTemplateProcessor;
-import mir.misc.Configuration;
+import mir.misc.StringUtil;
+import mir.misc.MirConfig;
 import mir.misc.Logfile;
 
 /**
@@ -24,12 +27,21 @@ public abstract class AbstractServlet extends HttpServlet {
   protected static Logfile theLog;
 
   /**
-   * get the configration
+   * the configration
    */
   protected boolean getConfig(HttpServletRequest req) {
-    Configuration.initConfig(getInitParameter("Config"));
-    theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Mir.Logfile"));
-    theLog.printInfo(super.getServletName() + " started.");
+
+    String RealPath = super.getServletContext().getRealPath("/"); 
+    String Uri = req.getRequestURI();
+    String Name = super.getServletName();
+    String RootUri = StringUtil.replace(Uri, "/servlet/" + Name, "");
+
+    MirConfig.initConfig(RealPath, RootUri, Name, getInitParameter("Config"));
+    theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Mir.Logfile"));
+    theLog.printInfo(Name + " started.");
+    theLog.printInfo("Path is: " + MirConfig.getProp("Home"));
+    theLog.printInfo("Root URI is: " + MirConfig.getProp("RootUri"));
+    theLog.printInfo("Lang is: " + MirConfig.getProp("StandardLanguage"));
     return true;
   }
 
@@ -64,7 +76,7 @@ public abstract class AbstractServlet extends HttpServlet {
     //is there an existing template-path?
     if(!f.isDirectory()){
       //no there isn't. we use standard-language
-      lang = Configuration.getProperty("StandardLanguage");
+      lang = MirConfig.getProp("StandardLanguage");
       theLog.printDebugInfo("language not existing");
     }
     theLog.printDebugInfo("Language: " + lang);
index 9827329..9de043c 100755 (executable)
@@ -49,7 +49,7 @@ public abstract class ServletModule {
     HttpSession session = req.getSession(false);
     String language = (String)session.getAttribute("Language");
     if(language==null){
-      language=Configuration.getProperty("StandardLanguage");
+      language=MirConfig.getProp("StandardLanguage");
     }
     return language;
   }
index e6a7334..0a5b387 100755 (executable)
@@ -66,7 +66,7 @@ public class ServletModuleMonitor extends ServletModule
     return broker.getUseCount();
   }
   protected int getConfBrokerCnt(){
-    return Configuration.getBrokerInstances();
+    return MirConfig.getBrokerInstances();
   }
   protected int getBrokerSize(DbConnectionBroker broker){
     return broker.getSize();
@@ -85,7 +85,7 @@ public class ServletModuleMonitor extends ServletModule
     for (int i=0;i<set.size();i++){
       key=(String)it.next();
       out.write("<table><tr><td>Konfiguration : </td><td>" + confs.get(key)+ "</td></tr>\n" );
-      broker=Configuration.getBrokerInfo();
+      broker=MirConfig.getBrokerInfo();
       //broker=(DbConnectionBroker) ((HashMap)confs.get(key)).get("Pool.broker");
       if(broker!=null)  out.write(getBrokerInfo(broker));
       else
index 4f73324..f7c6ba8 100755 (executable)
@@ -60,20 +60,20 @@ public class Database implements StorageObject {
         * @param   String confFilename Dateiname der Konfigurationsdatei
         */
        public Database() {
-       theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Database.Logfile"));
-               String database_username=Configuration.getProperty("Database.Username");
-               String database_password=Configuration.getProperty("Database.Password");
-               String database_host=Configuration.getProperty("Database.Host");
-               String theAdaptorName=Configuration.getProperty("Database.Adaptor");
+       theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Database.Logfile"));
+               String database_username=MirConfig.getProp("Database.Username");
+               String database_password=MirConfig.getProp("Database.Password");
+               String database_host=MirConfig.getProp("Database.Host");
+               String theAdaptorName=MirConfig.getProp("Database.Adaptor");
                try {
                        theEntityClass = Class.forName("mir.entity.GenericEntity");
                        theAdaptor = (DatabaseAdaptor)Class.forName(theAdaptorName).newInstance();
-                       defaultLimit = Integer.parseInt(Configuration.getProperty("Database.Limit"));
+                       defaultLimit = Integer.parseInt(MirConfig.getProp("Database.Limit"));
                        database_driver=theAdaptor.getDriver();
                        database_url=theAdaptor.getURL(database_username,database_password,database_host);
                        theLog.printDebugInfo("adding Broker with: " +database_driver+":"+database_url  );
-                       Configuration.addBroker(database_driver,database_url);
-                       myBroker=Configuration.getBroker();
+                       MirConfig.addBroker(database_driver,database_url);
+                       myBroker=MirConfig.getBroker();
                }
                catch (Exception e){
                        theLog.printError("Bei Konstruktion von Database() with " + theAdaptorName + " -- " +e.toString());
index c917f82..887caf8 100755 (executable)
@@ -13,11 +13,11 @@ import mir.misc.*;
 public final class DatabaseAdaptorMySQL implements DatabaseAdaptor{
 
     public String getDriver() {
-       return Configuration.getProperty("Adaptor.MySQL.Driver");
+       return MirConfig.getProp("Adaptor.MySQL.Driver");
     }
 
     public String getURL(String user, String pass, String host) {
-           return Configuration.getProperty("Adaptor.MySQL.URL");
+           return MirConfig.getProp("Adaptor.MySQL.URL");
     }
 
     public  boolean hasLimit() {
index 44b85b4..25ef661 100755 (executable)
@@ -24,7 +24,7 @@ public final class DatabaseAdaptorOracle
         * @return Adaptorklasse als String
         */
     public String getDriver() {
-           return Configuration.getProperty("Adaptor.Oracle.Driver");
+           return MirConfig.getProp("Adaptor.Oracle.Driver");
     }
 
        /**
@@ -37,7 +37,7 @@ public final class DatabaseAdaptorOracle
         * @return url als String
         */
     public String getURL(String user, String pass, String host) {
-           return Configuration.getProperty("Adaptor.Oracle.URL");
+           return MirConfig.getProp("Adaptor.Oracle.URL");
                /** @todo   hier muesste bessererweise $HOST durch HOST ersetzt, etc. werden */
 
     }
index 56d329e..9954a4b 100755 (executable)
@@ -13,11 +13,11 @@ import mir.misc.*;
 public final class DatabaseAdaptorPostgresql implements DatabaseAdaptor{
 
     public String getDriver() {
-       return Configuration.getProperty("Adaptor.PostgreSQL.Driver");
+       return MirConfig.getProp("Adaptor.PostgreSQL.Driver");
     }
 
     public String getURL(String user, String pass, String host) {
-           return Configuration.getProperty("Adaptor.PostgreSQL.URL");
+           return MirConfig.getProp("Adaptor.PostgreSQL.URL");
     }
 
     public  boolean hasLimit() {
index 2bd9643..c534ed9 100755 (executable)
@@ -24,7 +24,7 @@ public final class DatabaseAdaptorSybase
         * @return Adaptorklasse als String
         */
     public String getDriver() {
-           return Configuration.getProperty("Adaptor.Sybase.Driver");
+           return MirConfig.getProp("Adaptor.Sybase.Driver");
     }
 
        /**
@@ -37,7 +37,7 @@ public final class DatabaseAdaptorSybase
         * @return url als String
         */
     public String getURL(String user, String pass, String host) {
-           return Configuration.getProperty("Adaptor.Sybase.URL");
+           return MirConfig.getProp("Adaptor.Sybase.URL");
                /** @todo  hier muesste bessererweise $HOST durch HOST ersetzt, etc. werden */
     }
 
index 3d851b7..696c667 100755 (executable)
@@ -44,7 +44,9 @@ public class XmlInputParser {
     logger = Logfile.getInstance(args[0] + "LOG/xml.log");
     XmlInputParser xmlInputParser = new XmlInputParser();
     //get the config-file
-    Configuration.initConfig("config");
+    /* Commented out for now since it seems unused and need more
+     * info regarding it. Marc Heckmann <heckmann@hbe.ca>
+    MirConfig.initConfig("config"); */
     //parse the xml-files in the given directory
     xmlInputParser.parse(args[0]);
     // stop freemarker templateCache (cracy)
index c3ca9d4..a33b383 100755 (executable)
@@ -34,7 +34,7 @@ public class ModuleBreaking extends AbstractModule
 
        public ModuleBreaking (StorageObject theStorage)
        {
-               if (theLog == null) theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Module.Breaking.Logfile"));
+               if (theLog == null) theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Breaking.Logfile"));
                if (theStorage == null) theLog.printWarning("ModuleBreaking -- StorageObject was null!");
                this.theStorage = theStorage;
        }
index 4ef659f..f809b0f 100755 (executable)
@@ -31,7 +31,7 @@ public class ModuleComment extends AbstractModule
   // Contructor
   public ModuleComment(StorageObject theStorage)
   {
-    if (theLog == null) theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Module.Comment.Logfile"));
+    if (theLog == null) theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Comment.Logfile"));
     if (theStorage == null) theLog.printWarning("StorageObject was null!");
     this.theStorage = theStorage;
   }
index fd0dd25..4840a60 100755 (executable)
@@ -28,12 +28,12 @@ public class ModuleContent extends AbstractModule
 
        public ModuleContent() {
                super();
-               if (theLog == null) theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Module.Content.Logfile"));
+               if (theLog == null) theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Content.Logfile"));
        }
 
        public ModuleContent(StorageObject theStorage) {
                this.theStorage = theStorage;
-               if (theLog == null) theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Module.Content.Logfile"));
+               if (theLog == null) theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Content.Logfile"));
        }
 
        //
index 1b29bac..3b6023a 100755 (executable)
@@ -32,7 +32,7 @@ public class ModuleFeature extends AbstractModule
                        this.theStorage = theStorage;
 
        if (theLog == null)
-       theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Module.Feature.Logfile"));
+       theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Feature.Logfile"));
 
                }
 
index 52e8a07..f7bb24c 100755 (executable)
@@ -34,7 +34,7 @@ public class ModuleGruppen extends AbstractModule
        public ModuleGruppen(StorageObject theStorage)
        {
 
-               if (theLog == null) theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Module.Gruppen.Logfile"));
+               if (theLog == null) theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Gruppen.Logfile"));
                if (theStorage == null) theLog.printWarning("StorageObject was null!");
 
                this.theStorage = theStorage;
index 500887e..6b86c62 100755 (executable)
@@ -24,7 +24,7 @@ public class ModuleImages extends AbstractModule {
 
        public ModuleImages(StorageObject theStorage) {
 
-               if (theLog == null) theLog = Logfile.getInstance(Configuration.getProperty("Home")+Configuration.getProperty("Module.Bilder.Logfile"));
+               if (theLog == null) theLog = Logfile.getInstance(MirConfig.getProp("Home")+MirConfig.getProp("Module.Bilder.Logfile"));
                if (theStorage == null) theLog.printWarning("StorageObject was null!");
                this.theStorage = theStorage;
 
index 65a1ce7..d3e5e37 100755 (executable)
@@ -34,7 +34,7 @@ public class ModuleLanguage extends AbstractModule {
        // Kontruktor
        public ModuleLanguage (StorageObject theStorage)        {
 
-               if (theLog == null) theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Module.Language.Logfile"));
+               if (theLog == null) theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Language.Logfile"));
                if (theStorage == null) theLog.printWarning("ModuleLanguage -- StorageObject was null!");
 
                this.theStorage = theStorage;
index 9fbbdf5..b0d732a 100755 (executable)
@@ -32,7 +32,7 @@ public class ModuleLinksImcs extends AbstractModule
     public ModuleLinksImcs(StorageObject theStorage) {
            this.theStorage = theStorage;
            if (theLog == null)
-             theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Module.LinksImcs.Logfile"));
+             theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.LinksImcs.Logfile"));
     }
 
     public SimpleHash getLinksImcsAsSimpleHash() {
index 1e6a3cb..14dbcdd 100755 (executable)
@@ -35,7 +35,7 @@ public class ModuleMediafolder extends AbstractModule
 
        public ModuleMediafolder(StorageObject theStorage)
        {
-               if (theLog == null) theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Module.Mediafolder.Logfile"));
+               if (theLog == null) theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Mediafolder.Logfile"));
                if (theStorage == null) theLog.printWarning("StorageObject was null!");
                this.theStorage = theStorage;
        }
index f67ddfe..e8f00e0 100755 (executable)
@@ -37,7 +37,7 @@ public class ModuleMessage extends AbstractModule
        public ModuleMessage (StorageObject theStorage)
        {
 
-               if (theLog == null) theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Module.Messages.Logfile"));
+               if (theLog == null) theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Messages.Logfile"));
                if (theStorage == null) theLog.printWarning("ModuleMessage -- StorageObject was null!");
 
                this.theStorage = theStorage;
index 4bcfc8d..e867cd1 100755 (executable)
@@ -33,7 +33,7 @@ public class ModuleSchwerpunkt extends AbstractModule
                        this.theStorage = theStorage;
 
        if (theLog == null)
-       theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Module.Schwerpunkt.Logfile"));
+       theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Schwerpunkt.Logfile"));
 
                }
 
index 7c48025..ac951cc 100755 (executable)
@@ -32,7 +32,7 @@ public class ModuleTopics extends AbstractModule
     public ModuleTopics(StorageObject theStorage) {
            this.theStorage = theStorage;
            if (theLog == null)
-             theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Module.Themen.Logfile"));
+             theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Themen.Logfile"));
     }
 
     public SimpleList getTopicsAsSimpleList() {
index f5c4699..0d166d7 100755 (executable)
@@ -35,7 +35,7 @@ public class ModuleUsers extends AbstractModule
        public ModuleUsers(StorageObject theStorage)
        {
 
-               if (theLog == null) theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Module.Users.Logfile"));
+               if (theLog == null) theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Users.Logfile"));
                if (theStorage == null) theLog.printWarning("StorageObject was null!");
                this.theStorage = theStorage;
 
index 74c30bb..cc639ad 100755 (executable)
@@ -14,11 +14,11 @@ import mircoders.storage.*;
 
 abstract public class Producer {
 
-       protected static String producerDocRoot = Configuration.getProperty("Producer.DocRoot");
-  protected static String producerStorageRoot = Configuration.getProperty("Producer.StorageRoot");
-       protected static String producerProductionHost = Configuration.getProperty("Producer.ProductionHost");
-       protected static String producerOpenAction = Configuration.getProperty("Producer.OpenAction");;
-       protected static Logfile theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Producer.Logfile"));
+       protected static String producerDocRoot = MirConfig.getProp("Producer.DocRoot");
+  protected static String producerStorageRoot = MirConfig.getProp("Producer.StorageRoot");
+       protected static String producerProductionHost = MirConfig.getProp("Producer.ProductionHost");
+       protected static String producerOpenAction = MirConfig.getProp("Producer.OpenAction");;
+       protected static Logfile theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Producer.Logfile"));
        protected static ModuleTopics         topicsModule;
        protected static ModuleSchwerpunkt    schwerpunktModule;
        protected static ModuleFeature        featureModule;
index 9651787..ceb8e7f 100755 (executable)
@@ -18,8 +18,14 @@ import mircoders.storage.*;
 public class ProducerContent extends Producer {
 
   public static void main(String argv[]){
-    Configuration.initConfig("config");
-    System.out.println(Configuration.getProperty("Producer.DocRoot"));
+    /**
+     * Why are we reloading the config here?
+     * Can someone please explain this?
+     * Hope I didn't break anything
+     * -mh. <heckmann@hbe.ca>
+     */
+    //Configuration.initConfig("config");
+    System.out.println(MirConfig.getProp("Producer.DocRoot"));
 
     try {
       new ProducerContent().handle(new PrintWriter(System.out), null, false,false);
@@ -43,12 +49,12 @@ public class ProducerContent extends Producer {
   public void handle(PrintWriter htmlout, EntityUsers user, boolean force, boolean sync, String id)
     throws StorageObjectException, ModuleException {
 
-    String contentTemplate = Configuration.getProperty("Producer.Content.Template");
-    int contentBatchsize = Integer.parseInt(Configuration.getProperty("Producer.Content.Batchsize"));
-    String extLinkName = Configuration.getProperty("Producer.ExtLinkName");
-    String intLinkName = Configuration.getProperty("Producer.IntLinkName");
-    String mailLinkName = Configuration.getProperty("Producer.MailLinkName");
-    String imageRoot = Configuration.getProperty("Producer.ImageRoot");
+    String contentTemplate = MirConfig.getProp("Producer.Content.Template");
+    int contentBatchsize = Integer.parseInt(MirConfig.getProp("Producer.Content.Batchsize"));
+    String extLinkName = MirConfig.getProp("Producer.ExtLinkName");
+    String intLinkName = MirConfig.getProp("Producer.IntLinkName");
+    String mailLinkName = MirConfig.getProp("Producer.MailLinkName");
+    String imageRoot = MirConfig.getProp("Producer.ImageRoot");
 
     long                sessionConnectTime = 0;
     long                startTime = (new java.util.Date()).getTime();
index d62c1f3..a8c54d1 100755 (executable)
@@ -28,7 +28,7 @@ public class ProducerFeature extends ProducerList {
        public void handle(PrintWriter htmlout, EntityUsers user, boolean force, boolean sync)
                throws StorageObjectException, ModuleException {
                orderBy="date desc";
-               listTemplate = Configuration.getProperty("Producer.FeatureList.Template");
+               listTemplate = MirConfig.getProp("Producer.FeatureList.Template");
                EntityList featureEntityList = featureModule.getByWhereClause("","title", -1);
                SimpleList featureList = HTMLTemplateProcessor.makeSimpleList(featureEntityList);
                boolean first=true;
index 760aebc..8d1f0c0 100755 (executable)
@@ -41,10 +41,10 @@ public class ProducerImages extends Producer {
                EntityImage         currentImage;
                EntityList          batchEntityList;
 
-    int contentBatchsize = Integer.parseInt(Configuration.getProperty("Producer.Content.Batchsize"));
-    String imageHost = Configuration.getProperty("Producer.Image.Host");
-         String imagePath = Configuration.getProperty("Producer.Image.Path");
-         String iconPath = Configuration.getProperty("Producer.Image.IconPath");
+    int contentBatchsize = Integer.parseInt(MirConfig.getProp("Producer.Content.Batchsize"));
+    String imageHost = MirConfig.getProp("Producer.Image.Host");
+         String imagePath = MirConfig.getProp("Producer.Image.Path");
+         String iconPath = MirConfig.getProp("Producer.Image.IconPath");
 
                // get batch of non-produced images, that are to be published
                whereClause="is_published='1'";
index f13b775..da5ea9b 100755 (executable)
@@ -35,7 +35,7 @@ abstract public class ProducerList extends Producer {
                throws StorageObjectException, ModuleException {
 
                logHTML(htmlout, "Producer.List: started");
-    int newsPerPage = Integer.parseInt(Configuration.getProperty("Producer.StartPage.Newswire"));
+    int newsPerPage = Integer.parseInt(MirConfig.getProp("Producer.StartPage.Newswire"));
                long                sessionConnectTime = 0;
                long                startTime = (new java.util.Date()).getTime();
                String              htmlFileName = "";
@@ -47,7 +47,7 @@ abstract public class ProducerList extends Producer {
                int size = 0;
                int listSize = 0;
 
-               int maxItemsOnPage = Integer.parseInt(Configuration.getProperty("Lists.Max.Items"));
+               int maxItemsOnPage = Integer.parseInt(MirConfig.getProp("Lists.Max.Items"));
 
                try {
                        listSize = contentModule.getSize(whereClause);
index 1c6cd17..841e26e 100755 (executable)
@@ -24,7 +24,7 @@ import mircoders.entity.*;
 
 public class ProducerNavigation extends Producer {
 
-  private static String naviPageTemplate = Configuration.getProperty("Producer.Navigation.Template");
+  private static String naviPageTemplate = MirConfig.getProp("Producer.Navigation.Template");
 
   public void handle(PrintWriter htmlout, EntityUsers user, boolean forced, boolean sync)
     throws mir.module.ModuleException, mir.storage.StorageObjectException {
index a42f3ee..6204916 100755 (executable)
@@ -27,7 +27,7 @@ public class ProducerOpenPosting extends ProducerList {
        public void handle(PrintWriter htmlout, EntityUsers user, boolean force, boolean sync)
                throws StorageObjectException, ModuleException {
 
-    listTemplate = Configuration.getProperty("Producer.OpenPosting.Template");
+    listTemplate = MirConfig.getProp("Producer.OpenPosting.Template");
     whereClause="is_published='1'";
     orderBy="date desc, webdb_create desc";
     fileDesc="open";
index 4604686..c6f94e1 100755 (executable)
@@ -26,9 +26,9 @@ public class ProducerOverview extends Producer {
 
        static {
                // Initialierung
-               monthTemplate = Configuration.getProperty("Producer.Overview.MonthTemplate");
-               yearTemplate = Configuration.getProperty("Producer.Overview.YearTemplate");
-               numberOfTermine = Integer.parseInt(Configuration.getProperty("Producer.Startseite.Termine"));
+               monthTemplate = MirConfig.getProp("Producer.Overview.MonthTemplate");
+               yearTemplate = MirConfig.getProp("Producer.Overview.YearTemplate");
+               numberOfTermine = Integer.parseInt(MirConfig.getProp("Producer.Startseite.Termine"));
        }
 
        public static void main(String argv[]){
index 1659b74..fdae520 100755 (executable)
@@ -18,13 +18,16 @@ import mircoders.entity.*;
 
 public class ProducerStartPage extends Producer {
 
-  private static String startPageTemplate = Configuration.getProperty("Producer.StartPage.Template");
-  private static int itemsPerPage = Integer.parseInt(Configuration.getProperty("Producer.StartPage.Items"));
-  private static int newsPerPage = Integer.parseInt(Configuration.getProperty("Producer.StartPage.Newswire"));
+  private static String startPageTemplate = MirConfig.getProp("Producer.StartPage.Template");
+  private static int itemsPerPage = Integer.parseInt(MirConfig.getProp("Producer.StartPage.Items"));
+  private static int newsPerPage = Integer.parseInt(MirConfig.getProp("Producer.StartPage.Newswire"));
 
   public static void main(String argv[]){
     try {
-      Configuration.initConfig(argv[0]);
+      // Why are we reloading the configuration here?
+      // is there something I'm missing?
+      // mh. <heckmann@hbe.ca>
+      // Configuration.initConfig(argv[0]);
       new ProducerStartPage().handle(new PrintWriter(System.out), null);
     } catch(Exception e) {
       System.err.println(e.toString());
@@ -36,10 +39,10 @@ public class ProducerStartPage extends Producer {
   {
     printHTML(htmlout, "Producer.StartPage: started");
 
-    String extLinkName = Configuration.getProperty("Producer.ExtLinkName");
-    String intLinkName = Configuration.getProperty("Producer.IntLinkName");
-    String mailLinkName = Configuration.getProperty("Producer.MailLinkName");
-    String imageRoot = Configuration.getProperty("Producer.ImageRoot");
+    String extLinkName = MirConfig.getProp("Producer.ExtLinkName");
+    String intLinkName = MirConfig.getProp("Producer.IntLinkName");
+    String mailLinkName = MirConfig.getProp("Producer.MailLinkName");
+    String imageRoot = MirConfig.getProp("Producer.ImageRoot");
 
     long                sessionConnectTime = 0;
     long                startTime = (new java.util.Date()).getTime();
index e357ad4..75356d4 100755 (executable)
@@ -35,7 +35,7 @@ public class ProducerTopics extends ProducerList {
                throws StorageObjectException, ModuleException {
 
                orderBy="date desc, webdb_create desc";
-               listTemplate = Configuration.getProperty("Producer.TopicList.Template");
+               listTemplate = MirConfig.getProp("Producer.TopicList.Template");
 
     EntityList topicsEntityList;
     if(where==null){
index fc186c7..282c85b 100755 (executable)
@@ -24,13 +24,14 @@ public class ProducerWap extends Producer {
 
        // Initialierung
        static {
-               wapTemplate = Configuration.getProperty("Producer.Wap.Template");
-               itemsPerPage = Integer.parseInt(Configuration.getProperty("Producer.Wap.Items"));
+               wapTemplate = MirConfig.getProp("Producer.Wap.Template");
+               itemsPerPage = Integer.parseInt(MirConfig.getProp("Producer.Wap.Items"));
        }
 
        public static void main(String argv[]){
                try {
-                       Configuration.initConfig(argv[0]);
+            // do we need the following? -mh <heckmann@hbe.ca>
+                       //Configuration.initConfig(argv[0]);
                        new ProducerWap().handle(new PrintWriter(System.out), null);
                } catch(Exception e) {
                        System.err.println(e.toString());
@@ -82,7 +83,7 @@ public class ProducerWap extends Producer {
                try {
                        InputStream is = new FileInputStream(producerStorageRoot+xmlFileName);
                        OutputStream os = new FileOutputStream(producerStorageRoot+wmlFileName);
-                       String contentXsl = Configuration.getProperty("Home") + "templates/" + Configuration.getProperty("Xsl.Wap");
+                       String contentXsl = MirConfig.getProp("Home") + "templates/" + MirConfig.getProp("Xsl.Wap");
                        logHTML(htmlout,"using style " + contentXsl);
                        styler.style(contentXsl,is,os);
       is.close();
index 83638ed..289afb9 100755 (executable)
@@ -30,10 +30,10 @@ public class ServletModuleBreaking extends ServletModule
 
        private ServletModuleBreaking() {
 
-               theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("ServletModule.Breaking.Logfile"));
-               templateListString = Configuration.getProperty("ServletModule.Breaking.ListTemplate");
-               templateObjektString = Configuration.getProperty("ServletModule.Breaking.ObjektTemplate");
-               templateConfirmString = Configuration.getProperty("ServletModule.Breaking.ConfirmTemplate");
+               theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("ServletModule.Breaking.Logfile"));
+               templateListString = MirConfig.getProp("ServletModule.Breaking.ListTemplate");
+               templateObjektString = MirConfig.getProp("ServletModule.Breaking.ObjektTemplate");
+               templateConfirmString = MirConfig.getProp("ServletModule.Breaking.ConfirmTemplate");
                try {
       DatabaseBreaking dbb = DatabaseBreaking.getInstance();
                        mainModule = new ModuleBreaking(dbb);
index 3f9c1a6..77f7fef 100755 (executable)
@@ -36,10 +36,10 @@ public class ServletModuleComment extends ServletModule
        public static ServletModule getInstance() { return instance; }
 
        private ServletModuleComment() {
-               theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("ServletModule.Comment.Logfile"));
-               templateListString = Configuration.getProperty("ServletModule.Comment.ListTemplate");
-               templateObjektString = Configuration.getProperty("ServletModule.Comment.ObjektTemplate");
-               templateConfirmString = Configuration.getProperty("ServletModule.Comment.ConfirmTemplate");
+               theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("ServletModule.Comment.Logfile"));
+               templateListString = MirConfig.getProp("ServletModule.Comment.ListTemplate");
+               templateObjektString = MirConfig.getProp("ServletModule.Comment.ObjektTemplate");
+               templateConfirmString = MirConfig.getProp("ServletModule.Comment.ConfirmTemplate");
                try {
                        mainModule = new ModuleComment(DatabaseComment.getInstance());
                        moduleContent = new ModuleContent(DatabaseContent.getInstance());
index 9d54349..9a24af2 100755 (executable)
@@ -46,11 +46,11 @@ public class ServletModuleContent extends ServletModule
 
   private ServletModuleContent() {
     try {
-      theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("ServletModule.Content.Logfile"));
-      templateListString = Configuration.getProperty("ServletModule.Content.ListTemplate");
-      templateOpString = Configuration.getProperty("ServletModule.Content.OpTemplate");
-      templateObjektString = Configuration.getProperty("ServletModule.Content.ObjektTemplate");
-      templateConfirmString = Configuration.getProperty("ServletModule.Content.ConfirmTemplate");
+      theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("ServletModule.Content.Logfile"));
+      templateListString = MirConfig.getProp("ServletModule.Content.ListTemplate");
+      templateOpString = MirConfig.getProp("ServletModule.Content.OpTemplate");
+      templateObjektString = MirConfig.getProp("ServletModule.Content.ObjektTemplate");
+      templateConfirmString = MirConfig.getProp("ServletModule.Content.ConfirmTemplate");
       mainModule = new ModuleContent(DatabaseContent.getInstance());
       themenModule = new ModuleTopics(DatabaseTopics.getInstance());
       schwerpunktModule = new ModuleSchwerpunkt(DatabaseFeature.getInstance());
index a8497ea..b164d20 100755 (executable)
@@ -33,10 +33,10 @@ public class ServletModuleGroups extends ServletModule
   public static ServletModule getInstance() { return instance; }
 
   private ServletModuleGroups() {
-       theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("ServletModule.Gruppen.Logfile"));
-       templateListString = Configuration.getProperty("ServletModule.Gruppen.ListTemplate");
-       templateObjektString = Configuration.getProperty("ServletModule.Gruppen.ObjektTemplate");
-       templateConfirmString = Configuration.getProperty("ServletModule.Gruppen.ConfirmTemplate");
+       theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("ServletModule.Gruppen.Logfile"));
+       templateListString = MirConfig.getProp("ServletModule.Gruppen.ListTemplate");
+       templateObjektString = MirConfig.getProp("ServletModule.Gruppen.ObjektTemplate");
+       templateConfirmString = MirConfig.getProp("ServletModule.Gruppen.ConfirmTemplate");
         try {
           mainModule = new ModuleGruppen(DatabaseGroups.getInstance());
         }
index 834dd46..8e4d19e 100755 (executable)
@@ -45,10 +45,10 @@ public class ServletModuleImages extends mir.servlet.ServletModule
 
 
        private ServletModuleImages() {
-               theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("ServletModule.Bilder.Logfile"));
-               templateListString = Configuration.getProperty("ServletModule.Bilder.ListTemplate");
-               templateObjektString = Configuration.getProperty("ServletModule.Bilder.ObjektTemplate");
-               templateConfirmString = Configuration.getProperty("ServletModule.Bilder.ConfirmTemplate");
+               theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("ServletModule.Bilder.Logfile"));
+               templateListString = MirConfig.getProp("ServletModule.Bilder.ListTemplate");
+               templateObjektString = MirConfig.getProp("ServletModule.Bilder.ObjektTemplate");
+               templateConfirmString = MirConfig.getProp("ServletModule.Bilder.ConfirmTemplate");
                try {
                        mainModule = new ModuleImages(DatabaseImages.getInstance());
                        mediafolderModule = new ModuleMediafolder(DatabaseMediafolder.getInstance());
index c86816b..baee6a5 100755 (executable)
@@ -32,10 +32,10 @@ public class ServletModuleLanguage extends ServletModule
   public static ServletModule getInstance() { return instance; }
 
   private ServletModuleLanguage() {
-         theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("ServletModule.Language.Logfile"));
-    templateListString = Configuration.getProperty("ServletModule.Language.ListTemplate");
-         templateObjektString = Configuration.getProperty("ServletModule.Language.ObjektTemplate");
-         templateConfirmString = Configuration.getProperty("ServletModule.Language.ConfirmTemplate");
+         theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("ServletModule.Language.Logfile"));
+    templateListString = MirConfig.getProp("ServletModule.Language.ListTemplate");
+         templateObjektString = MirConfig.getProp("ServletModule.Language.ObjektTemplate");
+         templateConfirmString = MirConfig.getProp("ServletModule.Language.ConfirmTemplate");
     try {
       mainModule = new ModuleLanguage(DatabaseLanguage.getInstance());
     } catch (StorageObjectException e) {
index 761d8fb..6f89bfc 100755 (executable)
@@ -35,10 +35,10 @@ public class ServletModuleLinksImcs extends ServletModule
 
 
   private ServletModuleLinksImcs() {
-    theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("ServletModule.LinksImcs.Logfile"));
-    templateListString = Configuration.getProperty("ServletModule.LinksImcs.ListTemplate");
-    templateObjektString = Configuration.getProperty("ServletModule.LinksImcs.ObjektTemplate");
-    templateConfirmString = Configuration.getProperty("ServletModule.LinksImcs.ConfirmTemplate");
+    theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("ServletModule.LinksImcs.Logfile"));
+    templateListString = MirConfig.getProp("ServletModule.LinksImcs.ListTemplate");
+    templateObjektString = MirConfig.getProp("ServletModule.LinksImcs.ObjektTemplate");
+    templateConfirmString = MirConfig.getProp("ServletModule.LinksImcs.ConfirmTemplate");
 
     try {
       mainModule = new ModuleLinksImcs(DatabaseLinksImcs.getInstance());
index 4350187..bed01b8 100755 (executable)
@@ -26,10 +26,10 @@ public class ServletModuleMediafolder extends ServletModule
        private static ServletModuleMediafolder instance = new ServletModuleMediafolder();
 
        private ServletModuleMediafolder() {
-               theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("ServletModule.Mediafolder.Logfile"));
-               templateListString = Configuration.getProperty("ServletModule.Mediafolder.ListTemplate");
-               templateObjektString = Configuration.getProperty("ServletModule.Mediafolder.ObjektTemplate");
-               templateConfirmString = Configuration.getProperty("ServletModule.Mediafolder.ConfirmTemplate");
+               theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("ServletModule.Mediafolder.Logfile"));
+               templateListString = MirConfig.getProp("ServletModule.Mediafolder.ListTemplate");
+               templateObjektString = MirConfig.getProp("ServletModule.Mediafolder.ObjektTemplate");
+               templateConfirmString = MirConfig.getProp("ServletModule.Mediafolder.ConfirmTemplate");
                try {
                        mainModule = new ModuleMediafolder(DatabaseMediafolder.getInstance());
                }
index 30ba6b6..ec11703 100755 (executable)
@@ -32,10 +32,10 @@ public class ServletModuleMessage extends ServletModule
        public static ServletModule getInstance() { return instance; }
 
        private ServletModuleMessage() {
-               theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("ServletModule.Messages.Logfile"));
-               templateListString = Configuration.getProperty("ServletModule.Messages.ListTemplate");
-               templateObjektString = Configuration.getProperty("ServletModule.Messages.ObjektTemplate");
-               templateConfirmString = Configuration.getProperty("ServletModule.Messages.ConfirmTemplate");
+               theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("ServletModule.Messages.Logfile"));
+               templateListString = MirConfig.getProp("ServletModule.Messages.ListTemplate");
+               templateObjektString = MirConfig.getProp("ServletModule.Messages.ObjektTemplate");
+               templateConfirmString = MirConfig.getProp("ServletModule.Messages.ConfirmTemplate");
                try {
                        mainModule = new ModuleMessage(DatabaseMessages.getInstance());
                }
index 8bec930..be5d5a9 100755 (executable)
@@ -45,12 +45,12 @@ public class ServletModuleOpenIndy extends ServletModule
 
   private ServletModuleOpenIndy() {
     try {
-      theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("ServletModule.OpenIndy.Logfile"));
-      commentFormTemplate = Configuration.getProperty("ServletModule.OpenIndy.CommentTemplate");
-      commentFormDoneTemplate = Configuration.getProperty("ServletModule.OpenIndy.CommentDoneTemplate");
-      postingFormTemplate = Configuration.getProperty("ServletModule.OpenIndy.PostingTemplate");
-      postingFormDoneTemplate = Configuration.getProperty("ServletModule.OpenIndy.PostingDoneTemplate");
-      directOp = Configuration.getProperty("DirectOpenposting").toLowerCase();
+      theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("ServletModule.OpenIndy.Logfile"));
+      commentFormTemplate = MirConfig.getProp("ServletModule.OpenIndy.CommentTemplate");
+      commentFormDoneTemplate = MirConfig.getProp("ServletModule.OpenIndy.CommentDoneTemplate");
+      postingFormTemplate = MirConfig.getProp("ServletModule.OpenIndy.PostingTemplate");
+      postingFormDoneTemplate = MirConfig.getProp("ServletModule.OpenIndy.PostingDoneTemplate");
+      directOp = MirConfig.getProp("DirectOpenposting").toLowerCase();
       //directOp="yes";
       mainModule = new ModuleComment(DatabaseComment.getInstance());
       contentModule = new ModuleContent(DatabaseContent.getInstance());
index 9004e8f..1e4e0d2 100755 (executable)
@@ -27,7 +27,7 @@ public class ServletModuleProducer extends ServletModule
        public static ServletModule getInstance() { return instance; }
 
        private ServletModuleProducer() {
-               theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("ServletModule.Producer.Logfile"));
+               theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("ServletModule.Producer.Logfile"));
                defaultAction="produce";
        }
 
index 8b7645e..de31ae9 100755 (executable)
@@ -33,10 +33,10 @@ public class ServletModuleSchwerpunkt extends ServletModule
   public static ServletModule getInstance() { return instance; }
 
   private ServletModuleSchwerpunkt() {
-       theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("ServletModule.Schwerpunkt.Logfile"));
-       templateListString = Configuration.getProperty("ServletModule.Schwerpunkt.ListTemplate");
-       templateObjektString = Configuration.getProperty("ServletModule.Schwerpunkt.ObjektTemplate");
-       templateConfirmString = Configuration.getProperty("ServletModule.Schwerpunkt.ConfirmTemplate");
+       theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("ServletModule.Schwerpunkt.Logfile"));
+       templateListString = MirConfig.getProp("ServletModule.Schwerpunkt.ListTemplate");
+       templateObjektString = MirConfig.getProp("ServletModule.Schwerpunkt.ObjektTemplate");
+       templateConfirmString = MirConfig.getProp("ServletModule.Schwerpunkt.ConfirmTemplate");
         try {
           mainModule = new ModuleSchwerpunkt(DatabaseFeature.getInstance());
         }
index 1905b8d..da0ff04 100755 (executable)
@@ -32,10 +32,10 @@ public class ServletModuleTopics extends ServletModule
   public static ServletModule getInstance() { return instance; }
 
   private ServletModuleTopics() {
-         theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("ServletModule.Themen.Logfile"));
-          templateListString = Configuration.getProperty("ServletModule.Themen.ListTemplate");
-         templateObjektString = Configuration.getProperty("ServletModule.Themen.ObjektTemplate");
-         templateConfirmString = Configuration.getProperty("ServletModule.Themen.ConfirmTemplate");
+         theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("ServletModule.Themen.Logfile"));
+          templateListString = MirConfig.getProp("ServletModule.Themen.ListTemplate");
+         templateObjektString = MirConfig.getProp("ServletModule.Themen.ObjektTemplate");
+         templateConfirmString = MirConfig.getProp("ServletModule.Themen.ConfirmTemplate");
     try {
       mainModule = new ModuleTopics(DatabaseTopics.getInstance());
     } catch (StorageObjectException e) {
index e487513..eaaa962 100755 (executable)
@@ -33,10 +33,10 @@ public class ServletModuleUsers extends mir.servlet.ServletModule
        public static ServletModule getInstance() { return instance; }
 
        private ServletModuleUsers() {
-       theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("ServletModule.Users.Logfile"));
-       templateListString = Configuration.getProperty("ServletModule.Users.ListTemplate");
-       templateObjektString = Configuration.getProperty("ServletModule.Users.ObjektTemplate");
-       templateConfirmString = Configuration.getProperty("ServletModule.Users.ConfirmTemplate");
+       theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("ServletModule.Users.Logfile"));
+       templateListString = MirConfig.getProp("ServletModule.Users.ListTemplate");
+       templateObjektString = MirConfig.getProp("ServletModule.Users.ObjektTemplate");
+       templateConfirmString = MirConfig.getProp("ServletModule.Users.ConfirmTemplate");
                                try {
                                        mainModule = new ModuleUsers(DatabaseUsers.getInstance());
                                }