|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.module.sitemesh.Factory
public abstract class Factory
Factory responsible for creating appropriate instances of implementations.
This is specific to a web context and is obtained through 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
.
Field Summary | |
---|---|
private static String |
SITEMESH_FACTORY
Web context lookup key |
Constructor Summary | |
---|---|
Factory()
|
Method Summary | |
---|---|
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. |
protected static void |
report(String msg,
Exception e)
Report a problem. |
abstract boolean |
shouldParsePage(String contentType)
Determine whether a Page of given content-type should be parsed or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String SITEMESH_FACTORY
Constructor Detail |
---|
public Factory()
Method Detail |
---|
public static Factory getInstance(Config config)
sitemesh.factory
.
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.
contentType
- The MIME content-type of the data to be parsed
PageParser
for reading datapublic abstract boolean shouldParsePage(String contentType)
public abstract boolean isPathExcluded(String path)
protected static void report(String msg, Exception e)
private static String getEnvEntry(String envEntry, String defaultValue)
|
www.opensymphony.com/sitemesh/ | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |