Package io.jmix.messagetemplates
Interface MessageTemplatesGenerator.MultiParamTemplateGenerator
- All Known Implementing Classes:
MessageTemplatesGeneratorImpl.MultiParamTemplateGeneratorImpl
- Enclosing interface:
- MessageTemplatesGenerator
public static interface MessageTemplatesGenerator.MultiParamTemplateGenerator
The generator is used to create messages based on a single template and multiple set of parameters.
The result of the generation is a list of templates filled with different parameters.
-
Method Summary
Modifier and TypeMethodDescriptionAdds a parameter map to the collection of parameters for generating the messages.generate()Generates a messages based on the current state of the generator.withConfiguration(freemarker.template.Configuration configuration) Sets theConfigurationfor message generation.withTemplate(MessageTemplate template) Sets the template for generating the messages.withTemplateCode(String templateCode) Sets the template code for generating the messages.
-
Method Details
-
withTemplate
Sets the template for generating the messages.- Parameters:
template- template for generating the messages- Returns:
- this
-
withTemplateCode
Sets the template code for generating the messages.- Parameters:
templateCode- template code for generating the messages- Returns:
- this
-
withConfiguration
MessageTemplatesGenerator.MultiParamTemplateGenerator withConfiguration(freemarker.template.Configuration configuration) Sets theConfigurationfor message generation.- Parameters:
configuration- configuration for generating the message- Returns:
- this
-
addParams
Adds a parameter map to the collection of parameters for generating the messages.- Parameters:
params- parameter map to add- Returns:
- this
-
generate
Generates a messages based on the current state of the generator.- Returns:
- generated messages as a list of strings
-