PageParserSelectorBaseFactorypublic abstract class Factory extends Object implements PageParserSelector
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 | Description |
|---|---|---|
private static String |
SITEMESH_FACTORY |
Web context lookup key
|
| Constructor | Description |
|---|---|
Factory() |
| Modifier and Type | Method | Description |
|---|---|---|
abstract DecoratorMapper |
getDecoratorMapper() |
Return instance of DecoratorMapper.
|
private static String |
getEnvEntry(String envEntry,
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(String contentType) |
Create a PageParser suitable for the given content-type.
|
abstract boolean |
isPathExcluded(String path) |
Determine whether the given path should be excluded from decoration or not.
|
abstract void |
refresh() |
|
abstract boolean |
shouldParsePage(String contentType) |
Determine whether a Page of given content-type should be parsed or not.
|
private static final String SITEMESH_FACTORY
public static Factory getInstance(Config config)
sitemesh.factory.public abstract void refresh()
public abstract DecoratorMapper getDecoratorMapper()
public abstract PageParser getPageParser(String contentType)
For example, if the supplied parameter is text/html
a parser shall be returned that can parse HTML accordingly.
getPageParser in interface PageParserSelectorcontentType - The MIME content-type of the data to be parsedPageParser for reading datapublic abstract boolean shouldParsePage(String contentType)
shouldParsePage in interface PageParserSelectorpublic abstract boolean isPathExcluded(String path)