Class NotificationFactory
java.lang.Object
com.reallifedeveloper.common.application.notification.NotificationFactory
A factory for
Notifications.- Author:
- RealLifeDeveloper
-
Method Summary
Modifier and TypeMethodDescriptionfromStoredEvent(StoredEvent storedEvent) Creates a newNotificationfor the givenStoredEvent.fromStoredEvents(List<StoredEvent> storedEvents) Creates newNotificationsfor the givenStoredEvents.static NotificationFactoryinstance(EventStore eventStore) Gives an instance of the factory that uses the givenEventStoreto createNotifications.
-
Method Details
-
instance
Gives an instance of the factory that uses the givenEventStoreto createNotifications.- Parameters:
eventStore- theEventStoreto use- Returns:
- a
NotificationFactoryinstance
-
fromStoredEvent
Creates a newNotificationfor the givenStoredEvent.- Parameters:
storedEvent- the stored event for which to create aNotification- Returns:
- a new
Notificationfor the stored event
-
fromStoredEvents
Creates newNotificationsfor the givenStoredEvents.- Parameters:
storedEvents- a list with the stored events for which to createNotifications- Returns:
- a list of
Notificationsfor the stored events
-