|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.Uniform
org.restlet.Restlet
org.restlet.Filter
org.restlet.ext.freemarker.TemplateFilter
public class TemplateFilter
Filter response's entity and wrap it with a FreeMarker's template
representation.
By default, the template representation provides a data model based on the
request and response objects.
Concurrency note: instances of this class or its subclasses can be invoked by
several threads at the same time and therefore must be thread-safe. You
should be especially careful when storing state in member variables.
Field Summary |
---|
Fields inherited from class org.restlet.Filter |
---|
CONTINUE, SKIP, STOP |
Constructor Summary | |
---|---|
TemplateFilter()
Constructor. |
|
TemplateFilter(Context context)
Constructor. |
|
TemplateFilter(Context context,
Restlet next)
Constructor. |
|
TemplateFilter(Context context,
Restlet next,
java.lang.Object dataModel)
Constructor. |
|
TemplateFilter(Context context,
Restlet next,
Resolver<java.lang.Object> dataModel)
Constructor. |
Method Summary | |
---|---|
protected void |
afterHandle(Request request,
Response response)
|
Configuration |
getConfiguration()
Returns the FreeMarker configuration. |
void |
setConfiguration(Configuration config)
Sets the FreeMarker configuration. |
Methods inherited from class org.restlet.Filter |
---|
beforeHandle, doHandle, getNext, handle, hasNext, setNext, setNext |
Methods inherited from class org.restlet.Restlet |
---|
getApplication, getContext, getLogger, init, isStarted, isStopped, setContext, start, stop |
Methods inherited from class org.restlet.Uniform |
---|
delete, delete, get, get, handle, head, head, options, options, post, post, put, put |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TemplateFilter()
public TemplateFilter(Context context)
context
- The context.public TemplateFilter(Context context, Restlet next)
context
- The context.next
- The next Restlet.public TemplateFilter(Context context, Restlet next, java.lang.Object dataModel)
context
- The context.next
- The next Restlet.dataModel
- The filter's data model.public TemplateFilter(Context context, Restlet next, Resolver<java.lang.Object> dataModel)
context
- The context.next
- The next Restlet.dataModel
- The filter's data model.Method Detail |
---|
protected void afterHandle(Request request, Response response)
afterHandle
in class Filter
public Configuration getConfiguration()
public void setConfiguration(Configuration config)
config
- FreeMarker configuration.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |