该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
public class StatusHelper {
private static List titleKeyCache = new ArrayList();
public static List getAll() {
return titleKeyCache;
}
public static void clear() {
titleKeyCache.clear();
}
public static List initTitleKey(File file) throws Exception {
List tempList = XMLUtil.readTitleKeyXML(file
.getAbsolutePath());
addTitleKeys(tempList);
return tempList;
}
public static void setTitleKey(String createDate, TitleKey[] titleKeys) {
try {
String currentPath = XMLUtil.getTiTleKeyFilePath();
String filePath = currentPath + "/" + createDate + ".xml";
XMLUtil.buildXML(new File(filePath), titleKeys, createDate);
addTitleKeys(Arrays.asList(titleKeys));
} catch (Exception e) {
e.printStackTrace();
}
}
private static void addTitleKeys(List titleKeys) {
for (TitleKey titleKey : titleKeys) {
titleKeyCache.add(titleKey);
}
}
}