|
||||||||||
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,
java.lang.String baseUri)
Constructor. |
Method Summary | |
---|---|
void |
closeTemplateSource(java.lang.Object templateSource)
Close the template source. |
java.lang.Object |
findTemplateSource(java.lang.String name)
Finds the object that acts as the source of the template with the given name. |
long |
getLastModified(java.lang.Object templateSource)
Returns the modification time. |
java.io.Reader |
getReader(java.lang.Object templateSource,
java.lang.String encoding)
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, java.lang.String baseUri)
context
- The Restlet context.baseUri
- The base URI.Method Detail |
---|
public void closeTemplateSource(java.lang.Object templateSource) throws java.io.IOException
closeTemplateSource
in interface TemplateLoader
templateSource
- The template source Representation
.
java.io.IOException
public java.lang.Object findTemplateSource(java.lang.String name) throws java.io.IOException
findTemplateSource
in interface TemplateLoader
name
- The template name.
Representation
.
java.io.IOException
public long getLastModified(java.lang.Object templateSource)
getLastModified
in interface TemplateLoader
templateSource
- The template source Representation
.
public java.io.Reader getReader(java.lang.Object templateSource, java.lang.String encoding) throws java.io.IOException
getReader
in interface TemplateLoader
templateSource
- The template source Representation
.encoding
- The reader encoding (currently ignored).
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |