public class ConfigParser
extends java.lang.Object
Configuration
.Constructor and Description |
---|
ConfigParser() |
Modifier and Type | Method and Description |
---|---|
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.
|
static void |
parseLibProperty(Element el)
Internal use only
|
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.xmljava.lang.Exception
public void parse(Element root, Configuration config, Locator locator) throws java.lang.Exception
java.lang.Exception
public static void parseLibProperty(Element el)
Copyright © 2005-2021 Potix Corporation. All Rights Reserved.