|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.zk.ui.sys.ConfigParser
public class ConfigParser
Used to parse WEB-INF/zk.xml, metainfo/zk/zk.xml
and metainfo/zk/config.xml into Configuration
.
Constructor Summary | |
---|---|
ConfigParser()
|
Method Summary | |
---|---|
static boolean |
checkVersion(java.net.URL url,
Document doc)
Checks and returns whether the loaded document's version is correct. |
static boolean |
checkVersion(java.net.URL url,
Document doc,
boolean zk5required)
Checks and returns whether the loaded document's version is correct. |
void |
parse(Element root,
Configuration config,
Locator locator)
Parses zk.xml, specified by the root element. |
void |
parse(java.io.InputStream is,
Configuration config,
Locator locator)
Parses zk.xml from an input stream into the configuration. |
void |
parse(java.net.URL url,
Configuration config,
Locator locator)
Parses zk.xml, specified by url, into the configuration. |
void |
parseConfigXml(Configuration config)
Parses metainfo/zk/config.xml placed in class-path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigParser()
Method Detail |
---|
public static boolean checkVersion(java.net.URL url, Document doc) throws java.lang.Exception
java.lang.Exception
public static boolean checkVersion(java.net.URL url, Document doc, boolean zk5required) throws java.lang.Exception
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).
java.lang.Exception
public void parseConfigXml(Configuration config)
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.
config
- the object to store configurations.
If null, only the application-independent configurations are parsed.public void parse(java.net.URL url, Configuration config, Locator locator) throws java.lang.Exception
url
- the URL of zk.xml.
java.lang.Exception
public void parse(java.io.InputStream is, Configuration config, Locator locator) throws java.lang.Exception
is
- the input stream of zk.xml
java.lang.Exception
public void parse(Element root, Configuration config, Locator locator) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |