|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.module.sitemesh.Factory
com.opensymphony.module.sitemesh.factory.BaseFactory
com.opensymphony.module.sitemesh.factory.DefaultFactory
public class DefaultFactory
DefaultFactory, reads configuration from the sitemesh.configfile
init param,
or /WEB-INF/sitemesh.xml
if not specified, or uses the
default configuration if sitemesh.xml
does not exist.
To use the sitemesh.configfile
parameter, add the following to your web.xml:
<context-param> <param-name>sitemesh.configfile</param-name> <param-value>/WEB-INF/etc/sitemesh.xml</param-value> </context-param>
Field Summary | |
---|---|
static long |
configCheckMillis
|
(package private) File |
configFile
|
(package private) String |
configFileName
|
private long |
configLastCheck
|
(package private) long |
configLastModified
|
(package private) Map |
configProps
|
private static String |
DEFAULT_CONFIG_FILENAME
|
(package private) File |
excludesFile
|
(package private) String |
excludesFileName
|
Fields inherited from class com.opensymphony.module.sitemesh.factory.BaseFactory |
---|
config, decoratorMapper, excludeUrls, pageParsers |
Constructor Summary | |
---|---|
DefaultFactory(Config config)
|
Method Summary | |
---|---|
private void |
loadConfig()
Load configuration from file. |
private void |
loadDecoratorMappers(NodeList nodes)
|
private void |
loadExcludes()
|
private void |
loadExcludeUrls(NodeList nodes)
Reads in all the url patterns to exclude from decoration. |
private void |
loadPageParsers(NodeList nodes)
Loop through children of 'page-parsers' element and add all 'parser' mappings. |
private Element |
loadSitemeshXML()
|
void |
refresh()
Check if configuration file has been modified, and if so reload it. |
private String |
replaceProperties(String str)
Replaces any properties that appear in the supplied string with their actual values |
Methods inherited from class com.opensymphony.module.sitemesh.factory.BaseFactory |
---|
addExcludeUrl, clearDecoratorMappers, clearExcludeUrls, clearParserMappings, getDecoratorMapper, getDecoratorMapper, getPageParser, isPathExcluded, mapParser, pushDecoratorMapper, shouldParsePage |
Methods inherited from class com.opensymphony.module.sitemesh.Factory |
---|
getInstance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
String configFileName
private static final String DEFAULT_CONFIG_FILENAME
File configFile
long configLastModified
private long configLastCheck
public static long configCheckMillis
Map configProps
String excludesFileName
File excludesFile
Constructor Detail |
---|
public DefaultFactory(Config config)
Method Detail |
---|
private void loadConfig()
private Element loadSitemeshXML() throws ParserConfigurationException, IOException, SAXException
ParserConfigurationException
IOException
SAXException
private void loadExcludes() throws ParserConfigurationException, IOException, SAXException
ParserConfigurationException
IOException
SAXException
private void loadPageParsers(NodeList nodes)
private void loadDecoratorMappers(NodeList nodes)
private void loadExcludeUrls(NodeList nodes)
public void refresh()
refresh
in class Factory
private String replaceProperties(String str)
str
- the string to replace the properties in
|
www.opensymphony.com/sitemesh/ | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |