Class FreemarkerCall
java.lang.Object
com.peterphi.std.guice.freemarker.FreemarkerCall
- All Implemented Interfaces:
TemplateCall
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetData()
getName()
Return this template nameprocess()
Render the template to a Stringvoid
Render the template to a Writerjavax.ws.rs.core.Response
process
(javax.ws.rs.core.Response.ResponseBuilder responseBuilder) Render the template as the entity for a ResponseBuilder, returning the built ResponseSets a variable which is then exposed to the view layerSets a number of variables which are then exposed to the view layer
-
Constructor Details
-
FreemarkerCall
public FreemarkerCall(freemarker.template.Template template)
-
-
Method Details
-
getData
-
getName
Description copied from interface:TemplateCall
Return this template name- Specified by:
getName
in interfaceTemplateCall
- Returns:
-
set
Sets a variable which is then exposed to the view layer- Specified by:
set
in interfaceTemplateCall
- Parameters:
name
-value
-- Returns:
-
setAll
Description copied from interface:TemplateCall
Sets a number of variables which are then exposed to the view layer- Specified by:
setAll
in interfaceTemplateCall
- Returns:
-
process
Render the template to a String- Specified by:
process
in interfaceTemplateCall
- Returns:
-
process
Render the template to a Writer- Specified by:
process
in interfaceTemplateCall
-
process
public javax.ws.rs.core.Response process(javax.ws.rs.core.Response.ResponseBuilder responseBuilder) Render the template as the entity for a ResponseBuilder, returning the built Response- Specified by:
process
in interfaceTemplateCall
- Returns:
- the result of calling responseBuilder.
-