public interface TemplateLoader
Strategy interface for loading resources from class path, file system, etc.
A TemplateLoader
provides two important properties:
'.hbs'
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_PREFIX
The default view prefix.
|
static java.lang.String |
DEFAULT_SUFFIX
The default view suffix.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getPrefix() |
java.lang.String |
getSuffix() |
java.lang.String |
resolve(java.lang.String location)
Resolve a relative location to an absolute location.
|
void |
setPrefix(java.lang.String prefix)
Set the prefix that gets prepended to view names when building a URI.
|
void |
setSuffix(java.lang.String suffix)
Set the suffix that gets appended to view names when building a URI.
|
TemplateSource |
sourceAt(java.lang.String location)
Get a template source from location.
|
static final java.lang.String DEFAULT_PREFIX
static final java.lang.String DEFAULT_SUFFIX
TemplateSource sourceAt(java.lang.String location) throws java.io.IOException
location
- The location of the template source. Required.java.io.IOException
- If the template's source can't be resolved.java.lang.String resolve(java.lang.String location)
location
- The candidate location.java.lang.String getPrefix()
java.lang.String getSuffix()
void setPrefix(java.lang.String prefix)
prefix
- The prefix that gets prepended to view names when building a
URI.void setSuffix(java.lang.String suffix)
suffix
- The suffix that gets appended to view names when building a
URI.Copyright © 2010 - 2020 Adobe. All Rights Reserved