|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.ext.freemarker.ContextTemplateLoader
public class ContextTemplateLoader
FreeMarker template loader based on a Context's client dispatcher. You can
set an instance on a FreeMarker configuration via the
Configuration.setTemplateLoader(TemplateLoader)
method.
Constructor Summary | |
---|---|
ContextTemplateLoader(Context context,
Reference baseRef)
Constructor. |
|
ContextTemplateLoader(Context context,
String baseUri)
Constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContextTemplateLoader(Context context, Reference baseRef)
context
- The Restlet context.baseRef
- The base reference.public ContextTemplateLoader(Context context, String baseUri)
context
- The Restlet context.baseUri
- The base URI.Method Detail |
---|
public void closeTemplateSource(Object templateSource) throws IOException
closeTemplateSource
in interface TemplateLoader
templateSource
- The template source Representation
.
IOException
public Object findTemplateSource(String name) throws IOException
findTemplateSource
in interface TemplateLoader
name
- The template name.
Representation
.
IOException
public long getLastModified(Object templateSource)
getLastModified
in interface TemplateLoader
templateSource
- The template source Representation
.
public Reader getReader(Object templateSource, String characterSet) throws IOException
getReader
in interface TemplateLoader
templateSource
- The template source Representation
.characterSet
- The reader character set.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |