Package io.jmix.messagetemplates.impl
Class MessageTemplatesGeneratorImpl.MultiTemplateGeneratorImpl
java.lang.Object
io.jmix.messagetemplates.impl.MessageTemplatesGeneratorImpl.MultiTemplateGeneratorImpl
- All Implemented Interfaces:
MessageTemplatesGenerator.MultiTemplateGenerator
- Enclosing class:
- MessageTemplatesGeneratorImpl
public class MessageTemplatesGeneratorImpl.MultiTemplateGeneratorImpl
extends Object
implements MessageTemplatesGenerator.MultiTemplateGenerator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected freemarker.template.Configuration
protected Collection<MessageTemplate>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a parameter to filling the templates.generate()
Generates a messages based on the current state of the generator.withConfiguration
(freemarker.template.Configuration configuration) Sets theConfiguration
for message generation.withParams
(Map<String, Object> params) Sets the parameters for filling the templates.withTemplateCodes
(String... templateCodes) Sets the template codes for generating the messages.withTemplates
(MessageTemplate... templates) Sets the templates for generating the messages.
-
Field Details
-
templates
-
params
-
configuration
protected freemarker.template.Configuration configuration
-
-
Constructor Details
-
MultiTemplateGeneratorImpl
public MultiTemplateGeneratorImpl()
-
-
Method Details
-
withTemplates
Description copied from interface:MessageTemplatesGenerator.MultiTemplateGenerator
Sets the templates for generating the messages.- Specified by:
withTemplates
in interfaceMessageTemplatesGenerator.MultiTemplateGenerator
- Parameters:
templates
- array ofMessageTemplate
for generating the message.- Returns:
- this
-
withTemplateCodes
Description copied from interface:MessageTemplatesGenerator.MultiTemplateGenerator
Sets the template codes for generating the messages.- Specified by:
withTemplateCodes
in interfaceMessageTemplatesGenerator.MultiTemplateGenerator
- Parameters:
templateCodes
- array ofMessageTemplate
codes for generating the message- Returns:
- this
-
withConfiguration
public MessageTemplatesGenerator.MultiTemplateGenerator withConfiguration(freemarker.template.Configuration configuration) Description copied from interface:MessageTemplatesGenerator.MultiTemplateGenerator
Sets theConfiguration
for message generation.- Specified by:
withConfiguration
in interfaceMessageTemplatesGenerator.MultiTemplateGenerator
- Parameters:
configuration
- configuration for generating the message- Returns:
- this
-
withParams
Description copied from interface:MessageTemplatesGenerator.MultiTemplateGenerator
Sets the parameters for filling the templates.- Specified by:
withParams
in interfaceMessageTemplatesGenerator.MultiTemplateGenerator
- Parameters:
params
- parameters map- Returns:
- this
-
addParam
Description copied from interface:MessageTemplatesGenerator.MultiTemplateGenerator
Adds a parameter to filling the templates.- Specified by:
addParam
in interfaceMessageTemplatesGenerator.MultiTemplateGenerator
- Parameters:
alias
- parameter aliasvalue
- parameter value- Returns:
- this
-
generate
Description copied from interface:MessageTemplatesGenerator.MultiTemplateGenerator
Generates a messages based on the current state of the generator.- Specified by:
generate
in interfaceMessageTemplatesGenerator.MultiTemplateGenerator
- Returns:
- generated messages as a list of strings
-