public class TemplateFilter extends Filter
Encoding.FREEMARKER
encoding set.| Constructor and Description |
|---|
TemplateFilter()
Constructor.
|
TemplateFilter(Context context)
Constructor.
|
TemplateFilter(Context context,
Restlet next)
Constructor.
|
TemplateFilter(Context context,
Restlet next,
Object dataModel)
Constructor.
|
TemplateFilter(Context context,
Restlet next,
Resolver<Object> dataModel)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterHandle(Request request,
Response response) |
protected Object |
createDataModel(Request request,
Response response)
Creates the FreeMarker data model for a given call.
|
Configuration |
getConfiguration()
Returns the FreeMarker configuration.
|
Object |
getDataModel()
Returns the template data model common to all calls.
|
void |
setConfiguration(Configuration config)
Sets the FreeMarker configuration.
|
void |
setDataModel(Object dataModel)
Sets the template data model common to all calls.
|
beforeHandle, doHandle, getNext, handle, hasNext, setNext, setNext, start, stopcreateFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwnerpublic 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, Object dataModel)
context - The context.next - The next Restlet.dataModel - The filter's data model.protected void afterHandle(Request request, Response response)
afterHandle in class Filterprotected Object createDataModel(Request request, Response response)
TemplateHashModel based on the result of
Resolver.createResolver(Request, Response). If the
getDataModel() method has a non null value, it will be used.request - The handled request.response - The handled response.public Configuration getConfiguration()
public Object getDataModel()
public void setConfiguration(Configuration config)
config - FreeMarker configuration.public void setDataModel(Object dataModel)
dataModel - The template data model common to all calls.Copyright © 2005-2017 Restlet.