public abstract class AbstractTemplateLoader extends Object implements TemplateLoader
Strategy interface for loading resources from class path, file system, etc.
A TemplateLoader provides two important properties:
'.hbs'DEFAULT_PREFIX, DEFAULT_SUFFIX| Constructor and Description |
|---|
AbstractTemplateLoader() |
| Modifier and Type | Method and Description |
|---|---|
String |
getPrefix() |
String |
getSuffix() |
protected String |
normalize(String location)
Normalize the location by removing '/' at the beginning.
|
String |
resolve(String uri)
Resolve the uri to an absolute location.
|
void |
setPrefix(String prefix)
Set the prefix that gets prepended to view names when building a URI.
|
void |
setSuffix(String suffix)
Set the suffix that gets appended to view names when building a URI.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsourceAtpublic String resolve(String uri)
resolve in interface TemplateLoaderuri - The candidate uri.protected String normalize(String location)
location - The candidate location.public void setPrefix(String prefix)
setPrefix in interface TemplateLoaderprefix - The prefix that gets prepended to view names when building a
URI.public void setSuffix(String suffix)
setSuffix in interface TemplateLoadersuffix - The suffix that gets appended to view names when building a
URI.public String getPrefix()
getPrefix in interface TemplateLoaderpublic String getSuffix()
getSuffix in interface TemplateLoaderCopyright © 2015. All rights reserved.