Interface TemplateRenderer

All Superinterfaces:
Comparable<String>, Identity<String>

public interface TemplateRenderer extends Identity<String>
API for a service that can execute a template against some input data to produce formatted output.
Since:
1.64
Version:
1.0
Author:
matt
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    render(Locale locale, org.springframework.util.MimeType mimeType, Map<String,?> parameters, OutputStream out)
    Render the template.
    List<org.springframework.util.MimeType>
    Get the MIME types this service is capable of rendering output as.
    boolean
    supportsMimeType(org.springframework.util.MimeType mimeType)
    Test if this service supports a given MIME type.

    Methods inherited from interface java.lang.Comparable

    compareTo

    Methods inherited from interface net.solarnetwork.domain.Identity

    getId, hasId
  • Method Details

    • supportsMimeType

      boolean supportsMimeType(org.springframework.util.MimeType mimeType)
      Test if this service supports a given MIME type.
      Parameters:
      mimeType - the type to check if this service supports
      Returns:
      true if this service can render to the given MIME type
    • supportedMimeTypes

      List<org.springframework.util.MimeType> supportedMimeTypes()
      Get the MIME types this service is capable of rendering output as.
      Returns:
      the supported MIME type, never null
    • render

      void render(Locale locale, org.springframework.util.MimeType mimeType, Map<String,?> parameters, OutputStream out) throws IOException
      Render the template.
      Parameters:
      parameters - the input parameters
      mimeType - the desired MIME type
      locale - the desired locale
      out - the destination
      Throws:
      IOException - if any error occurs