public abstract class Factory
extends java.lang.Object
getInstance(com.opensymphony.module.sitemesh.Config).
The actual Factory method used is determined by the enviroment entry sitemesh.factory.
If this doesn't exist, it defaults to DefaultFactory .
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
SITEMESH_FACTORY
Web context lookup key
|
| Constructor and Description |
|---|
Factory() |
| Modifier and Type | Method and Description |
|---|---|
abstract DecoratorMapper |
getDecoratorMapper()
Return instance of DecoratorMapper.
|
private static java.lang.String |
getEnvEntry(java.lang.String envEntry,
java.lang.String defaultValue)
Find String environment entry, or return default if not found.
|
static Factory |
getInstance(Config config)
Entry-point for obtaining singleton instance of Factory.
|
abstract PageParser |
getPageParser(java.lang.String contentType)
Create a PageParser suitable for the given content-type.
|
abstract boolean |
isPathExcluded(java.lang.String path)
Determine whether the given path should be excluded from decoration or not.
|
protected static void |
report(java.lang.String msg,
java.lang.Exception e)
Report a problem.
|
abstract boolean |
shouldParsePage(java.lang.String contentType)
Determine whether a Page of given content-type should be parsed or not.
|
private static final java.lang.String SITEMESH_FACTORY
public static Factory getInstance(Config config)
sitemesh.factory.public abstract DecoratorMapper getDecoratorMapper()
public abstract PageParser getPageParser(java.lang.String contentType)
For example, if the supplied parameter is text/html
a parser shall be returned that can parse HTML accordingly.
contentType - The MIME content-type of the data to be parsedPageParser for reading datapublic abstract boolean shouldParsePage(java.lang.String contentType)
public abstract boolean isPathExcluded(java.lang.String path)
protected static void report(java.lang.String msg,
java.lang.Exception e)
private static java.lang.String getEnvEntry(java.lang.String envEntry,
java.lang.String defaultValue)