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.Configurationprotected 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 theConfigurationfor 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.MultiTemplateGeneratorSets the templates for generating the messages.- Specified by:
withTemplatesin interfaceMessageTemplatesGenerator.MultiTemplateGenerator- Parameters:
templates- array ofMessageTemplatefor generating the message.- Returns:
- this
-
withTemplateCodes
Description copied from interface:MessageTemplatesGenerator.MultiTemplateGeneratorSets the template codes for generating the messages.- Specified by:
withTemplateCodesin interfaceMessageTemplatesGenerator.MultiTemplateGenerator- Parameters:
templateCodes- array ofMessageTemplatecodes for generating the message- Returns:
- this
-
withConfiguration
public MessageTemplatesGenerator.MultiTemplateGenerator withConfiguration(freemarker.template.Configuration configuration) Description copied from interface:MessageTemplatesGenerator.MultiTemplateGeneratorSets theConfigurationfor message generation.- Specified by:
withConfigurationin interfaceMessageTemplatesGenerator.MultiTemplateGenerator- Parameters:
configuration- configuration for generating the message- Returns:
- this
-
withParams
Description copied from interface:MessageTemplatesGenerator.MultiTemplateGeneratorSets the parameters for filling the templates.- Specified by:
withParamsin interfaceMessageTemplatesGenerator.MultiTemplateGenerator- Parameters:
params- parameters map- Returns:
- this
-
addParam
Description copied from interface:MessageTemplatesGenerator.MultiTemplateGeneratorAdds a parameter to filling the templates.- Specified by:
addParamin interfaceMessageTemplatesGenerator.MultiTemplateGenerator- Parameters:
alias- parameter aliasvalue- parameter value- Returns:
- this
-
generate
Description copied from interface:MessageTemplatesGenerator.MultiTemplateGeneratorGenerates a messages based on the current state of the generator.- Specified by:
generatein interfaceMessageTemplatesGenerator.MultiTemplateGenerator- Returns:
- generated messages as a list of strings
-