public interface ActionTemplateService
ActionDefinitionModel
by using the template engine if to render the content.
For example it can be used to to generate a confirmation or title message from the ActionDefinitionModel.getConfirmationMessageCode()
and ActionDefinitionModel.getConfirmationTitleCode()
If you want to create your own confirmation message or title template:
scope
(e.g. '${scope.name}'
). The action model is exposed as well, so for
instance you can use '${action.name}'
to render the name of the selected action.Modifier and Type | Field and Description |
---|---|
static String |
PAYLOAD_PARAM_NAME_ACTION |
static String |
PAYLOAD_PARAM_NAME_SCOPED_OBJECT |
static String |
VARIANT_KEY_CODE |
static String |
VARIANT_KEY_LANGUAGE |
Modifier and Type | Method and Description |
---|---|
String |
getMessage(String templateKey,
String tenantId,
String code,
String language,
ActionDefinitionModel actionDefinitionModel,
Object scopedObject)
Get the message for the given
templateKey . |
static final String VARIANT_KEY_CODE
static final String VARIANT_KEY_LANGUAGE
static final String PAYLOAD_PARAM_NAME_SCOPED_OBJECT
static final String PAYLOAD_PARAM_NAME_ACTION
String getMessage(String templateKey, String tenantId, String code, String language, ActionDefinitionModel actionDefinitionModel, Object scopedObject)
templateKey
. The code
and language
are used as variants for the template engine and
the actionDefinitionModel
and scopedObject
are used as the payload.templateKey
- the key for the templatetenantId
- the tenant id that should be used when resolving the messagecode
- 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 servicescopedObject
- 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)Copyright © 2019. All rights reserved.