com.github.siwenyan.common.LibPage Maven / Gradle / Ivy
package com.github.siwenyan.common;
import com.github.siwenyan.profile.ProfileLibraryImpl;
import java.io.File;
public class LibPage extends ProfileLibraryImpl {
public static final String LIB_PAGE = "LIB_PAGE";
public static final String THE_PAGE = "thePage";
private static LibPage instance;
public synchronized final static LibPage getInstance() {
if (null == instance) {
String relativePathsString = Sys.conf.getProperty(LIB_PAGE);
String[] relativePaths = relativePathsString.split(",");
String[] paths = new String[relativePaths.length];
for (int i = 0; i < paths.length; i++) {
File path = Sys.findFile(relativePaths[i]);
paths[i] = path.getAbsolutePath();
}
instance = new LibPage(paths);
for (String title : instance.getTitles()) {
WhiteBoard.getInstance().putMap(WhiteBoard.OWNER_GLOBAL, LIB_PAGE + "_" + title, instance.getObjectByTitle(title), false, false);
}
}
return instance;
}
private LibPage(String... paths) {
super(paths);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy