Class FormatWriterMethod

java.lang.Object
org.springframework.extensions.webscripts.FormatWriterMethod
All Implemented Interfaces:
freemarker.template.TemplateMethodModel, freemarker.template.TemplateMethodModelEx, freemarker.template.TemplateModel

public final class FormatWriterMethod extends Object implements freemarker.template.TemplateMethodModelEx
Custom FreeMarker Template language method.

Render object to mimetype of web script template. If object cannot be serialized to mimetype then no output is written.

Usage: formatwrite(object) Where: object => object to write

Author:
davidc
  • Constructor Details

    • FormatWriterMethod

      public FormatWriterMethod(FormatRegistry formatRegistry, String format)
      Construct
  • Method Details

    • exec

      public Object exec(List args) throws freemarker.template.TemplateModelException
      Specified by:
      exec in interface freemarker.template.TemplateMethodModel
      Specified by:
      exec in interface freemarker.template.TemplateMethodModelEx
      Throws:
      freemarker.template.TemplateModelException