use of org.eweb4j.config.bean.Prop in project eweb4j-framework by laiweiwei.
the class Props method writeProp.
public static synchronized void writeProp(String propId, Map<String, String> data) throws IOException {
if (propId == null)
return;
ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigBean.class.getName());
List<Prop> files = cb.getProperties().getFile();
for (Prop f : files) {
if (propId.equals(f.getId())) {
Map<String, String> map = props.get(propId);
if (map == null) {
map = new Hashtable<String, String>();
props.put(propId, map);
}
map.putAll(data);
String filePath = ConfigConstant.CONFIG_BASE_PATH + f.getPath();
writeProperties(filePath, data);
break;
}
}
}
Aggregations