Interface TemplateRenderer

All Known Implementing Classes:
VelocityRenderer

@API(status=STABLE, since="1.0", consumers="VelocityRenderer") @Component public interface TemplateRenderer
Wrapper for the Velocity Template Renderer.
Since:
1.0
Version:
1.2
Author:
elmar.dott@gmail.com
  • Field Details

    • FEATURE_ID

      @API(status=STABLE, since="1.2") static final String FEATURE_ID
      Identifier for the given feature.
      See Also:
  • Method Details

    • loadContentByClasspathResource

      @API(status=STABLE, since="1.0") String loadContentByClasspathResource(String resourcePath, String template, Map<String,String> properties)
      Generate a String from a template in the classpath and a Map with variables.
      Parameters:
      resourcePath - as String
      template - as String
      properties - as Map
      Returns:
      processedTemplate as String
    • loadContentByFileResource

      @API(status=STABLE, since="1.0") String loadContentByFileResource(String resourcePath, String template, Map<String,String> properties)
      Generate a String from a template using an external file and a Map with variables.
      Parameters:
      resourcePath - as String
      template - as String
      properties - as Map
      Returns:
      processedTemplate as String
    • loadContentByStringResource

      @API(status=STABLE, since="1.0") String loadContentByStringResource(String resource, Map<String,String> properties)
      Render a template (resource) with a Map of variables from an input String and process the output also as String.
      Parameters:
      resource - as String
      properties - as Map
      Returns:
      processedTemplate as String