|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
// ConfigGeneric_p.java
|
|
|
|
|
// ConfigProperties_p.java
|
|
|
|
|
// -----------------------
|
|
|
|
|
// part of YaCy
|
|
|
|
|
// (C) by Michael Peter Christen; mc@yacy.net
|
|
|
|
@ -43,17 +43,17 @@ public class ConfigProperties_p {
|
|
|
|
|
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
|
|
|
|
// return variable that accumulates replacements
|
|
|
|
|
final serverObjects prop = new serverObjects();
|
|
|
|
|
int count = 0;
|
|
|
|
|
|
|
|
|
|
String key;
|
|
|
|
|
|
|
|
|
|
//change a key
|
|
|
|
|
if (post != null && post.containsKey("key") && post.containsKey("value")) {
|
|
|
|
|
key = post.get("key");
|
|
|
|
|
final String value = post.get("value");
|
|
|
|
|
if (!"".equals(key)) {
|
|
|
|
|
env.setConfig(key, value);
|
|
|
|
|
key = post.get("key").trim();
|
|
|
|
|
if (key != null && !key.isEmpty()) {
|
|
|
|
|
env.setConfig(key, post.get("value").trim());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Iterator<String> keys = env.configKeys();
|
|
|
|
|
|
|
|
|
|
final List<String> list = new ArrayList<String>(250);
|
|
|
|
@ -64,6 +64,7 @@ public class ConfigProperties_p {
|
|
|
|
|
|
|
|
|
|
Collections.sort(list);
|
|
|
|
|
|
|
|
|
|
int count = 0;
|
|
|
|
|
keys = list.iterator();
|
|
|
|
|
while (keys.hasNext()) {
|
|
|
|
|
key = keys.next();
|
|
|
|
|