public class ClayXmlParser extends Object implements ClayConfigParser
This class loads the configuration files defining page fragments and
caches a graph of beans in application scope. The location of the default
configuration file is located at Globals.DEFAULT_CLAY_CONFIG_FILE
.
A comma value list of names can be supplied as a initialization parameter in
the web deployment descriptor using the parameter name
Globals.CLAY_CONFIG_FILES
.
Constructor and Description |
---|
ClayXmlParser() |
Modifier and Type | Method and Description |
---|---|
protected void |
configureRules()
This method is called once to register the object binding rules with
the
Digester instance. |
ConfigBean |
getConfig()
Returns an instance of the
ConfigBean that pools a
collection of faces meta-component definitions. |
void |
loadConfigFile(URL configURL,
String watchDogName)
Loads a configuration file from a
url . |
void |
setConfig(ConfigBean config)
Sets an instance of the
ConfigBean that pools a
collection of faces meta-component definitions. |
public ConfigBean getConfig()
ClayConfigParser
Returns an instance of the ConfigBean
that pools a
collection of faces meta-component definitions.
getConfig
in interface ClayConfigParser
ConfigBean
instance of the component metadata containerpublic void setConfig(ConfigBean config)
ClayConfigParser
Sets an instance of the ConfigBean
that pools a
collection of faces meta-component definitions.
setConfig
in interface ClayConfigParser
config
- ConfigBean
instance of the component metadata containerpublic void loadConfigFile(URL configURL, String watchDogName) throws IOException, SAXException
Loads a configuration file from a url
. The
input stream is identifed by the watchDogName
.
loadConfigFile
in interface ClayConfigParser
configURL
- url of the target configuration filewatchDogName
- an id used to group files that need to be reloaded togetherIOException
- raised by the digester processing the configUrlSAXException
- raised by the digester processing the XML config fileprotected void configureRules()
This method is called once to register the object binding rules with
the Digester
instance.
Copyright © 2004-2013 Apache Software Foundation. All Rights Reserved.