Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
re-insert of migrateSwitchConfigSettings
orbiterd007d14905e4
diff --git a/source/de/anomic/server/serverAbstractSwitch.java b/source/de/anomic/server/serverAbstractSwitch.javaindex 26b0cbe99..8f7e5b1eb 100644--- a/source/de/anomic/server/serverAbstractSwitch.java+++ b/source/de/anomic/server/serverAbstractSwitch.java@@ -104,8 +104,8 @@ public abstract class serverAbstractSwitch implements serverSwitch {}// doing a config settings migration- HashMap migratedSettings = migrateSwitchConfigSettings((HashMap) removedProps);- if (migratedSettings != null) configProps.putAll(migratedSettings);+ //HashMap migratedSettings = migrateSwitchConfigSettings((HashMap) removedProps);+ //if (migratedSettings != null) configProps.putAll(migratedSettings);// merge new props from init to config// this is necessary for migration, when new properties are attached@@ -129,23 +129,6 @@ public abstract class serverAbstractSwitch implements serverSwitch {// init busy state controlserverJobs = 0;}--- public static HashMap migrateSwitchConfigSettings(HashMap removedSettings) {- if ((removedSettings == null) || (removedSettings.size() == 0)) return null;- HashMap migratedSettings = new HashMap();-- if (removedSettings.containsKey("parseableMimeTypes")) {- String value = (String) removedSettings.get("parseableMimeTypes");- migratedSettings.put("parseableMimeTypes.CRAWLER", value);- migratedSettings.put("parseableMimeTypes.PROXY", value);- migratedSettings.put("parseableMimeTypes.URLREDIRECTOR", value);- migratedSettings.put("parseableMimeTypes.ICAP", value);- }-- return migratedSettings;- }-// a logger for this switchboardpublic void setLog(serverLog log) {diff --git a/source/yacy.java b/source/yacy.javaindex 25d7e5ed7..ec192b1ff 100644--- a/source/yacy.java+++ b/source/yacy.java@@ -89,7 +89,7 @@ import de.anomic.yacy.yacyClient;import de.anomic.yacy.yacyCore;/**-* This is the main class of the proxy. Several threads are started from here:+* This is the main class of YaCy. Several threads are started from here:* <ul>* <li>one single instance of the plasmaSwitchboard is generated, which itself* starts a thread with a plasmaHTMLCache object. This object simply counts@@ -201,6 +201,18 @@ public final class yacy {}}++ public static void migrateSwitchConfigSettings(plasmaSwitchboard sb) {+ String value = "";+ if ((value = sb.getConfig("parseableMimeTypes","")).length() > 0) {+ sb.setConfig("parseableMimeTypes.CRAWLER", value);+ sb.setConfig("parseableMimeTypes.PROXY", value);+ sb.setConfig("parseableMimeTypes.URLREDIRECTOR", value);+ sb.setConfig("parseableMimeTypes.ICAP", value);+ }+ }++/*** Starts up the whole application. Sets up all datastructures and starts* the main threads.@@ -361,6 +373,7 @@ public final class yacy {//} catch (IOException e) {}presetPasswords(sb);+ migrateSwitchConfigSettings(sb);// start main threadstry {