Looking for 2020 or 2021 content?
Content with tag custom objects .
Liferay Notifications - Creating a custom notification type
Feliphe Marinho and Gabriel Albuquerque (Budapest Theater)
2022-11-30 19:32 UTC
We’ll dive into the notification module implementation and how easily add new notification types and apply them to use in desired modules. Going from how we brought it from Commerce, (revamping it into a brand new product) to a hands-on part demonstrating how we can create a new notification type.
Notifications were part of Commerce and focused on triggering e-mail notifications according to order status changes. From Obejcts' perspective, we envisioned it as a good feature that we could integrate with Liferay Objects and turn into one of our actions. But then, why not make it customizable and integrated with any product and implementation?That's what we did with a revamp process to decouple the notification module from Objects and email, developers just need to implement one class that contains some methods that are required and then you will be able to get your notification type or the existing ones though the NotificationTypeTracker by passing the type of the desired notification and then they'll be able to call methods like sendNotification by passing the proper context to work as expected.