com.clickntap.tool.calendar.UiCalendarManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of click_framework Show documentation
Show all versions of click_framework Show documentation
Java Framework based on Spring Framework, Freemarker and Simplicity
package com.clickntap.tool.calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.dom4j.Document;
import org.dom4j.Element;
import org.springframework.core.io.Resource;
import com.clickntap.smart.SmartContext;
import com.clickntap.utils.XMLUtils;
public class UiCalendarManager {
private Map confMap;
public void setConf(Resource conf) throws Exception {
Document doc = XMLUtils.copyFrom(conf.getInputStream());
confMap = new HashMap();
for (Element element : (List) doc.getRootElement().elements("uicalendar")) {
confMap.put(element.attributeValue("name"), new UICalendarConf(element));
}
}
public UICalendarConf getConf(String channel, SmartContext ctx) {
UICalendarConf conf = confMap.get(channel);
return conf;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy