Feature: standalone NotificationTemplate provisioning#20
Conversation
…bility instead of @UI.AdaptationHidden
…template-provisioning
…visioner handlers
Schmarvinius
left a comment
There was a problem hiding this comment.
NotificationTemplateBuilder and NotificationTypeBuilder have a big overlap
- Scan model.events().filter(event -> event.findAnnotation("notification.template.title").isPresent())
- Iterate over i18nHelper.getAvailableLocales()
- Resolve the same annotations (notification.template.title, notification.template.subtitle, etc.)
- Load HTML from classpath with the same logic
- Extract the same source name from qualified name
Maybe think of a shared base or shared "event scanner"
--
Also, you have 3 classes that are in the handler package which are not handlers but helpers. Why not move them in the appropriate package?
…xts fallback behavior
…in LocalNotificationTemplateAutoProvisionerHandler
…rviceConfiguration
…for PropertiesSchema JSON
|
Thanks for the feedback! @Schmarvinius You're right that there is structural similarity between NotificationTypeAssembler and NotificationTemplateAssembler. However, they serve fundamentally different purposes and produce different output types:
Merging them into a shared base would couple two distinct ANS API concepts. Also, the embedded template approach (NotificationTypeAssembler) is planned to be deprecated in a follow-up PR once standalone templates are fully adopted, at which point this overlap disappears naturally. Note: Also renamed both classes to Assembler as per your suggestion. |
…tionTemplateAssembler
Standalone Notification Template Provisioning
What
This PR introduces standalone notification template provisioning. Previously, templates were embedded within notification types. This PR adds the ability to manage them as separate, standalone objects via a dedicated NotificationTemplateProviderService endpoint. The embedded approach still exists as an alternative, but the standalone mode enables additional capabilities such as customer customization.
Based on the Notification Templates API.
Why
Separating templates from types enables customers to customize notification templates independently (e.g. adjusting subject, body, or translations) without modifying the notification type itself.
Key Changes