}
}
protected static void processExplorerProps(File propsFile) {
try {
Properties expProps = new Properties();
BufferedInputStream bi = new BufferedInputStream(new FileInputStream(propsFile));
expProps.load(bi);
bi.close();
bi = null;
Set keys = expProps.keySet();
Iterator keysI = keys.iterator();
while (keysI.hasNext()) {
String key = (String)keysI.next();
if (!key.endsWith("Policy")) {
// See if this key is in the Explorer props
String existingVal = ExplorerDefaults.get(key, "");
if (existingVal.length() > 0) {
// get the replacement policy (if any)
String replacePolicy = expProps.getProperty(key + "Policy");
if (replacePolicy != null && replacePolicy.length() > 0) {
if (replacePolicy.equalsIgnoreCase("replace")) {
String newVal = expProps.getProperty(key);
ExplorerDefaults.set(key, newVal);
} else {
// default to append
String newVal = expProps.getProperty(key);
// only append if this value is not already there!!
if (existingVal.indexOf(newVal) < 0) {
newVal = existingVal + "," + newVal;
ExplorerDefaults.set(key, newVal);
}
}
} else {
// default to append
String newVal = expProps.getProperty(key);
// only append if this value is not already there!!
if (existingVal.indexOf(newVal) < 0) {
newVal = existingVal + "," + newVal;
ExplorerDefaults.set(key, newVal);
}
}
} else {
// simply add this new key/value combo
String newVal = expProps.getProperty(key);
ExplorerDefaults.set(key, newVal);
}
}
}
} catch (Exception ex) {