Class FreemarkerCall

java.lang.Object
com.peterphi.std.guice.freemarker.FreemarkerCall
All Implemented Interfaces:
TemplateCall

public class FreemarkerCall extends Object implements TemplateCall
  • Constructor Details

    • FreemarkerCall

      public FreemarkerCall(freemarker.template.Template template)
  • Method Details

    • getData

      public Map<String,Object> getData()
    • getName

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

      public FreemarkerCall 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 FreemarkerCall setAll(Map<String,Object> data)
      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.