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").
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) {
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) {
# 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
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
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() {
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"));
}
/**
import java.io.*;
import java.util.*;
import java.lang.*;
-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();
}
* 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;
}
* @param propName
* @return Wert der Property
*/
- public static String getProperty(String propName) { // default
+ protected static String getProperty(String propName) { // default
return conf.getString(propName);
}
* 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;
* @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);
}
* @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"));
}
/**
- * 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
*/
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
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");
}
* 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;
}
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;
--- /dev/null
+/*
+ * 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) {}
+ }
+
+
+}
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;
/**
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;
}
//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);
HttpSession session = req.getSession(false);
String language = (String)session.getAttribute("Language");
if(language==null){
- language=Configuration.getProperty("StandardLanguage");
+ language=MirConfig.getProp("StandardLanguage");
}
return language;
}
return broker.getUseCount();
}
protected int getConfBrokerCnt(){
- return Configuration.getBrokerInstances();
+ return MirConfig.getBrokerInstances();
}
protected int getBrokerSize(DbConnectionBroker broker){
return broker.getSize();
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
* @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());
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() {
* @return Adaptorklasse als String
*/
public String getDriver() {
- return Configuration.getProperty("Adaptor.Oracle.Driver");
+ return MirConfig.getProp("Adaptor.Oracle.Driver");
}
/**
* @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 */
}
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() {
* @return Adaptorklasse als String
*/
public String getDriver() {
- return Configuration.getProperty("Adaptor.Sybase.Driver");
+ return MirConfig.getProp("Adaptor.Sybase.Driver");
}
/**
* @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 */
}
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)
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;
}
// 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;
}
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"));
}
//
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"));
}
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;
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;
// 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;
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() {
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;
}
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;
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"));
}
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() {
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;
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;
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);
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();
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;
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'";
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 = "";
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);
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 {
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";
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[]){
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());
{
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();
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){
// 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());
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();
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);
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());
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());
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());
}
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());
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) {
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());
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());
}
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());
}
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());
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";
}
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());
}
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) {
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());
}