Search in sources :

Example 1 with GlobalComponent

use of com.qlangtech.tis.component.GlobalComponent in project tis by qlangtech.

the class TIS method loadGlobalComponent.

public GlobalComponent loadGlobalComponent() {
    if (globalComponent == null) {
        try {
            File globalConfig = getGlobalConfigFile();
            if (!globalConfig.exists()) {
                // 不存在的话
                return new GlobalComponent();
            }
            globalComponent = (GlobalComponent) (new XmlFile(globalConfig).read());
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
    return globalComponent;
}
Also used : XmlFile(com.qlangtech.tis.extension.impl.XmlFile) GlobalComponent(com.qlangtech.tis.component.GlobalComponent) IOException(java.io.IOException) XmlFile(com.qlangtech.tis.extension.impl.XmlFile) File(java.io.File)

Aggregations

GlobalComponent (com.qlangtech.tis.component.GlobalComponent)1 XmlFile (com.qlangtech.tis.extension.impl.XmlFile)1 File (java.io.File)1 IOException (java.io.IOException)1