Adding MessageTemplate interface and MessageTemplates.register(MessageTemplate) method for clients to easier implement and register their own messages.
When MessageTemplate is registered there is a check if it contains ActionArg of type file, because in that case we should wait for variables and files to become ready before showing the message.
Only for the RichHtmlMessage there is a corner case because it depends on an html template file, which is not added to the ActionArgs, thus we need to wait for variables and files explicitly.
Implementation
Adding
MessageTemplate
interface andMessageTemplates.register(MessageTemplate)
method for clients to easier implement and register their own messages.When
MessageTemplate
is registered there is a check if it containsActionArg
of type file, because in that case we should wait for variables and files to become ready before showing the message. Only for theRichHtmlMessage
there is a corner case because it depends on an html template file, which is not added to the ActionArgs, thus we need to wait for variables and files explicitly.