|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.Restlet
org.restlet.routing.Filter
org.restlet.ext.velocity.TemplateFilter
public class TemplateFilter
Filter response's entity and wrap it with a Velocity's template
representation. By default, the template representation provides a data model
based on the request and response objects. In order for the wrapping to
happen, the representations must have the Encoding.VELOCITY
encoding
set.
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.routing.Filter |
---|
CONTINUE, SKIP, STOP |
Constructor Summary | |
---|---|
TemplateFilter()
Constructor. |
|
TemplateFilter(Context context)
Constructor. |
|
TemplateFilter(Context context,
Restlet next)
Constructor. |
|
TemplateFilter(Context context,
Restlet next,
Map<String,Object> dataModel)
Constructor. |
|
TemplateFilter(Context context,
Restlet next,
Resolver<Object> dataModel)
Constructor. |
Method Summary | |
---|---|
protected void |
afterHandle(Request request,
Response response)
|
Methods inherited from class org.restlet.routing.Filter |
---|
beforeHandle, doHandle, getNext, handle, hasNext, setNext, setNext, start, stop |
Methods inherited from class org.restlet.Restlet |
---|
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner |
Methods inherited from class java.lang.Object |
---|
clone, equals, 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, Map<String,Object> dataModel)
context
- The context.next
- The next Restlet.dataModel
- The filter's data model.public TemplateFilter(Context context, Restlet next, Resolver<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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |