Home » sitemesh-2.4.1 » com.opensymphony.module » sitemesh » mapper » [javadoc | source]
com.opensymphony.module.sitemesh.mapper
public final class: ConfigLoader [javadoc | source]
java.lang.Object
   com.opensymphony.module.sitemesh.mapper.ConfigLoader
The ConfigLoader reads a configuration XML file that contains Decorator definitions (name, url, init-params) and path-mappings (pattern, name).

These can then be accessed by the getDecoratorByName() methods and getMappedName() methods respectively.

The DTD for the configuration file in old (deprecated) format is located at http://www.opensymphony.com/dtds/sitemesh_1_0_decorators.dtd .

The DTD for the configuration file in new format is located at http://www.opensymphony.com/dtds/sitemesh_1_5_decorators.dtd .

Editing the config file will cause it to be auto-reloaded.

This class is used by ConfigDecoratorMapper, and uses PathMapper for pattern matching.

Constructor:
 public ConfigLoader(File configFile) throws ServletException 
    Create new ConfigLoader using supplied File.
 public ConfigLoader(String configFileName,
    Config config) throws ServletException 
    Create new ConfigLoader using supplied filename and config.
Method from com.opensymphony.module.sitemesh.mapper.ConfigLoader Summary:
getDecoratorByName,   getMappedName
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.module.sitemesh.mapper.ConfigLoader Detail:
 public Decorator getDecoratorByName(String name) throws ServletException 
    Retrieve Decorator based on name specified in configuration file.
 public String getMappedName(String path) throws ServletException 
    Get name of Decorator mapped to given path.