Class TemplateResultProcessor

java.lang.Object
dev.voidframework.web.http.resultprocessor.TemplateResultProcessor
All Implemented Interfaces:
ResultProcessor

public class TemplateResultProcessor extends Object implements ResultProcessor
Process a template.
  • Constructor Details

    • TemplateResultProcessor

      public TemplateResultProcessor()
      Build an empty new instance. This constructor is useful during deserialize process
    • TemplateResultProcessor

      public TemplateResultProcessor(String templateName, Map<String,Object> dataModel)
      Build a new instance.
      Parameters:
      templateName - The name of the template to render
      dataModel - The data model to use
  • Method Details

    • process

      public void process(Context context, com.typesafe.config.Config configuration, TemplateRenderer templateRenderer)
      Description copied from interface: ResultProcessor
      Process the result.
      Specified by:
      process in interface ResultProcessor
      Parameters:
      context - The current context
      configuration - The application configuration
      templateRenderer - The template rendered if available
    • getInputStream

      public InputStream getInputStream()
      Description copied from interface: ResultProcessor
      Get the result input stream.
      Specified by:
      getInputStream in interface ResultProcessor
      Returns:
      The result input stream