From e2ee412160fd716eb89780850d29ac85d1f02ec4 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 27 Jul 2013 10:12:58 +0200 Subject: [PATCH] Use SwitchboardConstants.LISTS_PATH_DEFAULT instead of 'DATA/LISTS' Conflicts: htroot/api/blacklists_p.java --- htroot/BlacklistCleaner_p.java | 3 ++- htroot/BlacklistImpExp_p.java | 3 ++- htroot/BlacklistTest_p.java | 3 ++- htroot/Blacklist_p.java | 3 ++- htroot/api/blacklists.java | 3 ++- htroot/api/blacklists_p.java | 3 ++- htroot/sharedBlacklist_p.java | 4 ++-- 7 files changed, 14 insertions(+), 8 deletions(-) diff --git a/htroot/BlacklistCleaner_p.java b/htroot/BlacklistCleaner_p.java index c5a563fa0..4cadb48cc 100644 --- a/htroot/BlacklistCleaner_p.java +++ b/htroot/BlacklistCleaner_p.java @@ -52,6 +52,7 @@ import net.yacy.repository.Blacklist; import net.yacy.repository.Blacklist.BlacklistError; import net.yacy.repository.Blacklist.BlacklistType; import net.yacy.search.Switchboard; +import net.yacy.search.SwitchboardConstants; import net.yacy.search.query.SearchEventCache; import net.yacy.server.serverObjects; import net.yacy.server.serverSwitch; @@ -72,7 +73,7 @@ public class BlacklistCleaner_p { // initialize the list manager ListManager.switchboard = (Switchboard) env; - ListManager.listsPath = new File(env.getDataPath(), env.getConfig("listManager.listsPath", "DATA/LISTS")); + ListManager.listsPath = new File(env.getDataPath(), env.getConfig("listManager.listsPath", SwitchboardConstants.LISTS_PATH_DEFAULT)); String blacklistToUse = null; prop.put(DISABLED+"checked", "1"); diff --git a/htroot/BlacklistImpExp_p.java b/htroot/BlacklistImpExp_p.java index 12700d81f..040a6833c 100644 --- a/htroot/BlacklistImpExp_p.java +++ b/htroot/BlacklistImpExp_p.java @@ -41,6 +41,7 @@ import net.yacy.kelondro.util.FileUtils; import net.yacy.peers.Seed; import net.yacy.repository.Blacklist; import net.yacy.search.Switchboard; +import net.yacy.search.SwitchboardConstants; import net.yacy.server.serverObjects; import net.yacy.server.serverSwitch; @@ -52,7 +53,7 @@ public class BlacklistImpExp_p { // initialize the list manager ListManager.switchboard = (Switchboard) env; - ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", "DATA/LISTS")); + ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", SwitchboardConstants.LISTS_PATH_DEFAULT)); // loading all blacklist files located in the directory final List dirlist = FileUtils.getDirListing(ListManager.listsPath, Blacklist.BLACKLIST_FILENAME_FILTER); diff --git a/htroot/BlacklistTest_p.java b/htroot/BlacklistTest_p.java index 432cb9cbf..198de03cb 100644 --- a/htroot/BlacklistTest_p.java +++ b/htroot/BlacklistTest_p.java @@ -38,6 +38,7 @@ import net.yacy.kelondro.data.meta.DigestURI; import net.yacy.repository.Blacklist; import net.yacy.repository.Blacklist.BlacklistType; import net.yacy.search.Switchboard; +import net.yacy.search.SwitchboardConstants; import net.yacy.server.serverObjects; import net.yacy.server.serverSwitch; @@ -47,7 +48,7 @@ public class BlacklistTest_p { // initialize the list manager ListManager.switchboard = (Switchboard) env; - ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", "DATA/LISTS")); + ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", SwitchboardConstants.LISTS_PATH_DEFAULT)); final serverObjects prop = new serverObjects(); prop.putHTML("blacklistEngine", Blacklist.getEngineInfo()); diff --git a/htroot/Blacklist_p.java b/htroot/Blacklist_p.java index 1fd019653..a746142a0 100644 --- a/htroot/Blacklist_p.java +++ b/htroot/Blacklist_p.java @@ -45,6 +45,7 @@ import net.yacy.kelondro.util.FileUtils; import net.yacy.repository.Blacklist; import net.yacy.repository.Blacklist.BlacklistType; import net.yacy.search.Switchboard; +import net.yacy.search.SwitchboardConstants; import net.yacy.search.query.SearchEventCache; import net.yacy.server.serverObjects; import net.yacy.server.serverSwitch; @@ -61,7 +62,7 @@ public class Blacklist_p { // initialize the list manager ListManager.switchboard = (Switchboard) env; - ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", "DATA/LISTS")); + ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", SwitchboardConstants.LISTS_PATH_DEFAULT)); // load all blacklist files located in the directory List dirlist = FileUtils.getDirListing(ListManager.listsPath, Blacklist.BLACKLIST_FILENAME_FILTER); diff --git a/htroot/api/blacklists.java b/htroot/api/blacklists.java index 8263b2996..2ebba0c02 100644 --- a/htroot/api/blacklists.java +++ b/htroot/api/blacklists.java @@ -5,6 +5,7 @@ import java.util.List; import net.yacy.cora.protocol.RequestHeader; import net.yacy.data.ListManager; import net.yacy.kelondro.util.FileUtils; +import net.yacy.search.SwitchboardConstants; import net.yacy.server.serverObjects; import net.yacy.server.serverSwitch; @@ -13,7 +14,7 @@ public class blacklists { public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) { final serverObjects prop = new serverObjects(); - ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", "DATA/LISTS")); + ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", SwitchboardConstants.LISTS_PATH_DEFAULT)); final List dirlist = FileUtils.getDirListing(ListManager.listsPath); int blacklistCount = 0; diff --git a/htroot/api/blacklists_p.java b/htroot/api/blacklists_p.java index 78f20f9ec..2ef23f65b 100644 --- a/htroot/api/blacklists_p.java +++ b/htroot/api/blacklists_p.java @@ -7,6 +7,7 @@ import net.yacy.data.ListManager; import net.yacy.kelondro.util.FileUtils; import net.yacy.repository.Blacklist; import net.yacy.repository.Blacklist.BlacklistType; +import net.yacy.search.SwitchboardConstants; import net.yacy.server.serverObjects; import net.yacy.server.serverSwitch; @@ -16,7 +17,7 @@ public class blacklists_p { public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) { final serverObjects prop = new serverObjects(); - ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", "DATA/LISTS")); + ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", SwitchboardConstants.LISTS_PATH_DEFAULT)); final List dirlist = FileUtils.getDirListing(ListManager.listsPath, Blacklist.BLACKLIST_FILENAME_FILTER); int blacklistCount=0; diff --git a/htroot/sharedBlacklist_p.java b/htroot/sharedBlacklist_p.java index d6d84d942..643cab4b5 100644 --- a/htroot/sharedBlacklist_p.java +++ b/htroot/sharedBlacklist_p.java @@ -53,6 +53,7 @@ import net.yacy.peers.Seed; import net.yacy.repository.Blacklist; import net.yacy.repository.Blacklist.BlacklistType; import net.yacy.search.Switchboard; +import net.yacy.search.SwitchboardConstants; import net.yacy.search.query.SearchEventCache; import net.yacy.server.serverObjects; import net.yacy.server.serverSwitch; @@ -90,8 +91,7 @@ public class sharedBlacklist_p { // initialize the list manager ListManager.switchboard = (Switchboard) env; - ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", "DATA/LISTS")); - + ListManager.listsPath = new File(ListManager.switchboard.getDataPath(),ListManager.switchboard.getConfig("listManager.listsPath", SwitchboardConstants.LISTS_PATH_DEFAULT)); // loading all blacklist files located in the directory final List dirlist = FileUtils.getDirListing(ListManager.listsPath, Blacklist.BLACKLIST_FILENAME_FILTER);