Class VelocityRenderer

    • Constructor Detail

      • VelocityRenderer

        public VelocityRenderer()
        Constructor.
    • Method Detail

      • loadContentByClasspathResource

        public String loadContentByClasspathResource​(String resourcePath,
                                                     String template,
                                                     Map<String,​String> properties)
        Description copied from interface: TemplateRenderer
        Generate a String from a Template in the classpath and a Map with Variables.
        Specified by:
        loadContentByClasspathResource in interface TemplateRenderer
        Parameters:
        resourcePath - as String
        template - as String
        properties - as Map
        Returns:
        processedTemplate as String
      • loadContentByFileResource

        public String loadContentByFileResource​(String resourcePath,
                                                String template,
                                                Map<String,​String> properties)
        Description copied from interface: TemplateRenderer
        Generate a String from a Template from a external File and a Map with Variables.
        Specified by:
        loadContentByFileResource in interface TemplateRenderer
        Parameters:
        resourcePath - as String
        template - as String
        properties - as Map
        Returns:
        processedTemplate as String
      • loadContentByStringResource

        public String loadContentByStringResource​(String resource,
                                                  Map<String,​String> properties)
        Description copied from interface: TemplateRenderer
        Render a Template (resource) with a Map of Variables from an input String and process the output also as String.
        Specified by:
        loadContentByStringResource in interface TemplateRenderer
        Parameters:
        resource - as String
        properties - as Map
        Returns:
        processedTemplate as String