com.opensymphony.module.sitemesh.factory
public class: DefaultFactory [javadoc |
source]
java.lang.Object
com.opensymphony.module.sitemesh.Factory
com.opensymphony.module.sitemesh.factory.BaseFactory
com.opensymphony.module.sitemesh.factory.DefaultFactory
DefaultFactory, reads configuration from
/WEB-INF/sitemesh.xml, or uses the
default configuration if
sitemesh.xml does not exist.
- author:
< - a href="mailto:joe@truemesh.com">Joe Walnes
- author:
< - a href="mailto:pathos@pandora.be">Mathias Bogaert
- version:
$ - Revision: 1.3 $
| Field Summary |
|---|
| String | configFileName | |
| File | configFile | |
| long | configLastModified | |
| Map | configProps | |
| String | excludesFileName | |
| File | excludesFile | |
| Constructor: |
public DefaultFactory(Config config) {
super(config);
// configFilePath is null if loaded from war file
String configFilePath = config.getServletContext().getRealPath(configFileName);
if (configFilePath != null) { // disable config auto reloading for .war files
configFile = new File(configFilePath);
}
loadConfig();
}
|
| Methods from com.opensymphony.module.sitemesh.factory.BaseFactory: |
|---|
|
addExcludeUrl, clearDecoratorMappers, clearExcludeUrls, clearParserMappings, getDecoratorMapper, getPageParser, isPathExcluded, loadClass, mapParser, pushDecoratorMapper, shouldParsePage |
| Method from com.opensymphony.module.sitemesh.factory.DefaultFactory Detail: |
public DecoratorMapper getDecoratorMapper() {
refresh();
return super.getDecoratorMapper();
}
Refresh config before delegating to superclass. |
public PageParser getPageParser(String contentType) {
refresh();
return super.getPageParser(contentType);
}
Refresh config before delegating to superclass. |
public boolean isPathExcluded(String path) {
refresh();
return super.isPathExcluded(path);
}
Returns true if the supplied path matches one of the exclude
URLs specified in sitemesh.xml, otherwise returns false. This
method refreshes the config before delgating to the superclass. |
public boolean shouldParsePage(String contentType) {
refresh();
return super.shouldParsePage(contentType);
}
Refresh config before delegating to superclass. |