Package org.zkoss.zk.ui.sys
Class ConfigParser
java.lang.Object
org.zkoss.zk.ui.sys.ConfigParser
Used to parse WEB-INF/zk.xml, metainfo/zk/zk.xml
and metainfo/zk/config.xml into
Configuration.- Author:
- tomyeh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckVersion(URL url, Document doc) Checks and returns whether the loaded document's version is correct.static booleancheckVersion(URL url, Document doc, boolean zk5required) Checks and returns whether the loaded document's version is correct.voidparse(InputStream is, Configuration config, Locator locator) Parses zk.xml from an input stream into the configuration.voidparse(URL url, Configuration config, Locator locator) Parses zk.xml, specified by url, into the configuration.voidparse(Element root, Configuration config, Locator locator) Parses zk.xml, specified by the root element.voidparseConfigXml(Configuration config) Parses metainfo/zk/config.xml placed in class-path.static voidInternal use only
-
Constructor Details
-
ConfigParser
public ConfigParser()
-
-
Method Details
-
checkVersion
Checks and returns whether the loaded document's version is correct. It is the same as checkVersion(url, doc, false).- Throws:
Exception- Since:
- 3.5.0
-
checkVersion
Checks and returns whether the loaded document's version is correct.- Parameters:
zk5required- whether ZK 5 or later is required. If true and zk-version is earlier than 5, doc will be ignored (and false is returned).- Throws:
Exception- Since:
- 5.0.0
-
parseConfigXml
Parses metainfo/zk/config.xml placed in class-path.Note: the application-independent configurations (a.k.a., the system default configurations) are loaded only once, no matter how many times this method is called.
- Parameters:
config- the object to store configurations. If null, only the application-independent configurations are parsed.- Since:
- 3.5.0
-
parse
Parses zk.xml, specified by url, into the configuration.- Parameters:
url- the URL of zk.xml.- Throws:
Exception
-
parse
Parses zk.xml from an input stream into the configuration.- Parameters:
is- the input stream of zk.xml- Throws:
Exception- Since:
- 5.0.7
-
parse
Parses zk.xml, specified by the root element.- Throws:
Exception- Since:
- 3.0.1
-
parseLibProperty
Internal use only
-