java.lang.Object
com.peterphi.std.guice.web.rest.templating.thymeleaf.ThymeleafCall
All Implemented Interfaces:
TemplateCall

public class ThymeleafCall extends Object implements TemplateCall
Represents a ThymeLeaf Template that can be called. Constructed by ThymeleafTemplater
  • Method Details

    • getEngine

      public org.thymeleaf.TemplateEngine getEngine()
    • getContext

      public org.thymeleaf.context.IContext getContext()
    • getName

      public String getName()
      Description copied from interface: TemplateCall
      Return this template name
      Specified by:
      getName in interface TemplateCall
      Returns:
    • set

      public ThymeleafCall set(String name, Object value)
      Sets a variable which is then exposed to the view layer
      Specified by:
      set in interface TemplateCall
      Parameters:
      name -
      value -
      Returns:
    • setAll

      public ThymeleafCall setAll(Map<String,Object> values)
      Description copied from interface: TemplateCall
      Sets a number of variables which are then exposed to the view layer
      Specified by:
      setAll in interface TemplateCall
      Returns:
    • process

      public String process()
      Render the template to a String
      Specified by:
      process in interface TemplateCall
      Returns:
    • process

      public void process(Writer writer)
      Render the template to a Writer
      Specified by:
      process in interface TemplateCall
    • 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 interface TemplateCall
      Returns:
      the result of calling responseBuilder.