org.apache.shale.clay.config
Class ClayXmlParser

java.lang.Object
  extended by org.apache.shale.clay.config.ClayXmlParser
All Implemented Interfaces:
ClayConfigParser

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 Summary
ClayXmlParser()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClayXmlParser

public ClayXmlParser()
Method Detail

getConfig

public ConfigBean getConfig()
Description copied from interface: ClayConfigParser

Returns an instance of the ConfigBean that pools a collection of faces meta-component definitions.

Specified by:
getConfig in interface ClayConfigParser
Returns:
config ConfigBean instance of the component metadata container

setConfig

public void setConfig(ConfigBean config)
Description copied from interface: ClayConfigParser

Sets an instance of the ConfigBean that pools a collection of faces meta-component definitions.

Specified by:
setConfig in interface ClayConfigParser
Parameters:
config - ConfigBean instance of the component metadata container

loadConfigFile

public void loadConfigFile(URL configURL,
                           String watchDogName)
                    throws IOException,
                           SAXException

Loads a configuration file from a url. The input stream is identifed by the watchDogName.

Specified by:
loadConfigFile in interface ClayConfigParser
Parameters:
configURL - url of the target configuration file
watchDogName - an id used to group files that need to be reloaded together
Throws:
IOException - raised by the digester processing the configUrl
SAXException - raised by the digester processing the XML config file

configureRules

protected void configureRules()

This method is called once to register the object binding rules with the Digester instance.



Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.