OpenCmsCore 是核心类
/**
* Initialize member variables.<p>
*/
protected void initMembers() {
synchronized (LOCK) {
m_resourceInitHandlers = new ArrayList();
m_requestHandlers = new HashMap();
m_systemInfo = new CmsSystemInfo();
m_exportPoints = Collections.EMPTY_SET;
m_defaultUsers = new CmsDefaultUsers();
m_localeManager = new CmsLocaleManager(Locale.ENGLISH);
m_sessionManager = new CmsSessionManager();
m_runtimeProperties = new Hashtable();
// the default event manager must be available because the configuration already registers events
m_eventManager = new CmsEventManager();
// default link manager is required for test cases
m_linkManager = new CmsLinkManager(new CmsDefaultLinkSubstitutionHandler());
}
}
包括很多init 方法 initCmsObject,initContext,
initConfiguration 从opencms.properties配置文件读取配置信息,并创建 CmsObject对象
initResource 从 OpenCms VFS读取请求的资源
shutDown 销毁时,销毁所有系统对象;可见所有资源都在此管理。
CmsShell 类是命令行执行的类。
CmsSystemInfo 在此可以看到opencms系统中几个特定目录的设定,从而了解系统的文件规则,由OpenCmsCore 类创建
/** The name of the opencms.properties file. */
public static final String FILE_PROPERTIES = "opencms.properties";
/** Path to the "config" folder relative to the "WEB-INF" directory of the application. */
public static final String FOLDER_CONFIG = "config" + File.separatorChar;
/** The name of the module folder in the package path. */
public static final String FOLDER_MODULES = "modules" + File.separatorChar;
/** Path to the "packages" folder relative to the "WEB-INF" directory of the application. */
public static final String FOLDER_PACKAGES = "packages" + File.separatorChar;
/** Path to the "WEB-INF" folder relative to the directory of the application. */
public static final String FOLDER_WEBINF = "WEB-INF" + File.separatorChar;