Class FreemarkerCall
java.lang.Object
com.peterphi.std.guice.freemarker.FreemarkerCall
- All Implemented Interfaces:
TemplateCall
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetData()getName()Return this template nameprocess()Render the template to a StringvoidRender the template to a Writerjavax.ws.rs.core.Responseprocess(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:TemplateCallReturn this template name- Specified by:
getNamein interfaceTemplateCall- Returns:
-
set
Sets a variable which is then exposed to the view layer- Specified by:
setin interfaceTemplateCall- Parameters:
name-value-- Returns:
-
setAll
Description copied from interface:TemplateCallSets a number of variables which are then exposed to the view layer- Specified by:
setAllin interfaceTemplateCall- Returns:
-
process
Render the template to a String- Specified by:
processin interfaceTemplateCall- Returns:
-
process
Render the template to a Writer- Specified by:
processin 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:
processin interfaceTemplateCall- Returns:
- the result of calling responseBuilder.
-