|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.webmacro.resource.TemplateLoaderHelper
Helper class for template loaders to actuall load a Template.
This class should be used for loading templates from URLs
or files. Thus, the template loader only has to care for
locating the template.
This class will take care of loading the template and setting
up a correct reload context, depending on the protocol used.
Constructor Summary | |
TemplateLoaderHelper()
Construct a new TemplateLoaderHelper object |
Method Summary | |
void |
init(Broker b,
Settings config)
Initialize this object |
Template |
load(java.io.File file,
CacheElement ce)
Load a template from a file. |
Template |
load(java.net.URL url,
CacheElement ce)
Load a template from an url. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TemplateLoaderHelper()
Method Detail |
public void init(Broker b, Settings config) throws InitException
b
- broker to useconfig
- configuration to initialize from
InitException
public Template load(java.io.File file, CacheElement ce) throws ResourceException
file
- file to load template fromce
- cache element for reload context or null, if no caching is used.
ResourceException
- if template could not be loaded or parsed.public Template load(java.net.URL url, CacheElement ce) throws ResourceException
url
- url to load template fromce
- cache element for reload context or null, if no caching is used.
ResourceException
- if template could not be loaded or parsed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |