Class ActionTemplateServiceImpl

  • All Implemented Interfaces:
    ActionTemplateService

    public class ActionTemplateServiceImpl
    extends Object
    implements ActionTemplateService
    The default implementation for a confirmation template service using the template engine to render template based confirmation messages and titles.
    Author:
    Micha Kiener, Filip Hrisafov
    • Constructor Detail

      • ActionTemplateServiceImpl

        public ActionTemplateServiceImpl​(TemplateService templateService)
    • Method Detail

      • getMessage

        public String getMessage​(String templateKey,
                                 String tenantId,
                                 String code,
                                 String language,
                                 ActionDefinitionModel actionDefinitionModel,
                                 Object scopedObject)
        Description copied from interface: ActionTemplateService
        Get the message for the given templateKey. The code and language are used as variants for the template engine and the actionDefinitionModel and scopedObject are used as the payload.
        Specified by:
        getMessage in interface ActionTemplateService
        Parameters:
        templateKey - the key for the template
        tenantId - the tenant id that should be used when resolving the message
        code - the optional code (defaults to "default" if not provided)
        language - the optional language (defaults to "en" if not provided)
        actionDefinitionModel - the action definition model that is passed as part of the payload for the template service
        scopedObject - the optional object under scoped if the message should be created with a scoped object (it is passed to the template service as part of the payload)
        Returns:
        the generated message