org.webmacro.resource
Class DefaultTemplateLoaderFactory
java.lang.Object
org.webmacro.resource.DefaultTemplateLoaderFactory
- All Implemented Interfaces:
- TemplateLoaderFactory
- public class DefaultTemplateLoaderFactory
- extends java.lang.Object
- implements TemplateLoaderFactory
Default implementation of TemplateLoaderFactory interface.
This implementation expects config strings to be in an url-like
format: [protocol:][path]. It will then look for a key in the
WebMacro configuration of the form "TemplateLoader.<protocol>", where
protocol is replaced by "default", if it is ommited in the url. The
value of this configuration option has to be a fully qualified class
name of a class with a no-args constructor, implementing the TemplateLoader
interface.
After instantiating an object of this class, "path" is passed as configuration
option to this object.
- Author:
- Sebastian Kanthak (sebastian.kanthak@muehlheim.de)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultTemplateLoaderFactory
public DefaultTemplateLoaderFactory()
getTemplateLoader
public TemplateLoader getTemplateLoader(Broker b,
java.lang.String config)
throws InitException
- Description copied from interface:
TemplateLoaderFactory
- Create a template loader
- Specified by:
getTemplateLoader
in interface TemplateLoaderFactory
- Parameters:
b
- broker to useconfig
- string describing template loader to construct
- Returns:
- template loader
- Throws:
InitException
- if template loader could not be constructed