public class ContextTemplateLoader extends Object implements TemplateLoader
Configuration.setTemplateLoader(TemplateLoader) method.| Constructor and Description |
|---|
ContextTemplateLoader(Context context,
Reference baseRef)
Constructor.
|
ContextTemplateLoader(Context context,
String baseUri)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
closeTemplateSource(Object templateSource)
Close the template source.
|
Object |
findTemplateSource(String name)
Finds the object that acts as the source of the template with the given
name.
|
long |
getLastModified(Object templateSource)
Returns the modification time.
|
Reader |
getReader(Object templateSource,
String characterSet)
Returns the reader for the template source.
|
public ContextTemplateLoader(Context context, Reference baseRef)
context - The Restlet context.baseRef - The base reference.public void closeTemplateSource(Object templateSource) throws IOException
closeTemplateSource in interface TemplateLoadertemplateSource - The template source Representation.IOExceptionpublic Object findTemplateSource(String name) throws IOException
findTemplateSource in interface TemplateLoadername - The template name.Representation.IOExceptionpublic long getLastModified(Object templateSource)
getLastModified in interface TemplateLoadertemplateSource - The template source Representation.public Reader getReader(Object templateSource, String characterSet) throws IOException
getReader in interface TemplateLoadertemplateSource - The template source Representation.characterSet - The reader character set.IOExceptionCopyright © 2005-2017 Restlet.