Class ThymeleafCall
java.lang.Object
com.peterphi.std.guice.web.rest.templating.thymeleaf.ThymeleafCall
- All Implemented Interfaces:
TemplateCall
Represents a ThymeLeaf Template that can be called. Constructed by
ThymeleafTemplater-
Method Summary
Modifier and TypeMethodDescriptionorg.thymeleaf.context.IContextorg.thymeleaf.TemplateEnginegetName()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
-
Method Details
-
getEngine
public org.thymeleaf.TemplateEngine getEngine() -
getContext
public org.thymeleaf.context.IContext getContext() -
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.
-