Package org.europa.together.business
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionGenerate a String from a template in the classpath and a Map with variables.Generate a String from a template using an external file and a Map with variables.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.
-
Field Details
-
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 Stringtemplate
- as Stringproperties
- 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 Stringtemplate
- as Stringproperties
- 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 Stringproperties
- as Map- Returns:
- processedTemplate as String
-