Package com.flowable.template.api
Interface TemplateService
- All Known Implementing Classes:
TemplateServiceImpl
public interface TemplateService
The template service is used to create and render content based on a
TemplateDefinition.
The management of template definitions is done through the TemplateRepositoryService.- Author:
- Micha Kiener
-
Method Summary
Modifier and Type Method Description TemplateProcessingBuildercreateTemplateProcessingBuilder()default TemplateProcessingResultprocessTemplate(java.lang.String templateKey, java.lang.String tenantId, java.util.Map<java.lang.String,java.lang.Object> variant, java.util.Map<java.lang.String,java.lang.Object> payload)default TemplateProcessingResultprocessTemplate(java.lang.String templateKey, java.util.Map<java.lang.String,java.lang.Object> variant, java.util.Map<java.lang.String,java.lang.Object> payload)Processes a template referenced through its key and variant data which is then looked up within the repository and represented by aTemplateVariationModel.default TemplateProcessingResultprocessTemplate(java.lang.String templateKey, org.flowable.common.engine.api.variable.VariableContainer variableContainer)
-
Method Details
-
createTemplateProcessingBuilder
TemplateProcessingBuilder createTemplateProcessingBuilder() -
processTemplate
default TemplateProcessingResult processTemplate(java.lang.String templateKey, java.util.Map<java.lang.String,java.lang.Object> variant, java.util.Map<java.lang.String,java.lang.Object> payload)Processes a template referenced through its key and variant data which is then looked up within the repository and represented by aTemplateVariationModel. The payload is used for the placeholders within the template content and must be valid according theTemplateVariationModel.getParameters()definition. DON'T USE THIS METHOD in a multi-tenant environment, useprocessTemplate(String, String, Map, Map)instead to provide the tenant-id.- Parameters:
templateKey- the key of the template to processvariant- the variant of the template needed (according the variation definitionsTemplateModel.getVariationDefinitions()), might be null or empty if the template only has one single variation)payload- the optional payload, if the template is using placeholders to render properly (must be valid according the parameter definition)- Returns:
- the template processing results
-
processTemplate
default TemplateProcessingResult processTemplate(java.lang.String templateKey, java.lang.String tenantId, java.util.Map<java.lang.String,java.lang.Object> variant, java.util.Map<java.lang.String,java.lang.Object> payload) -
processTemplate
default TemplateProcessingResult processTemplate(java.lang.String templateKey, org.flowable.common.engine.api.variable.VariableContainer variableContainer)
-