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 newNotification
for the givenStoredEvent
.fromStoredEvents
(List<StoredEvent> storedEvents) Creates newNotifications
for the givenStoredEvents
.static NotificationFactory
instance
(EventStore eventStore) Gives an instance of the factory that uses the givenEventStore
to createNotifications
.
-
Method Details
-
instance
Gives an instance of the factory that uses the givenEventStore
to createNotifications
.- Parameters:
eventStore
- theEventStore
to use- Returns:
- a
NotificationFactory
instance
-
fromStoredEvent
Creates a newNotification
for the givenStoredEvent
.- Parameters:
storedEvent
- the stored event for which to create aNotification
- Returns:
- a new
Notification
for the stored event
-
fromStoredEvents
Creates newNotifications
for the givenStoredEvents
.- Parameters:
storedEvents
- a list with the stored events for which to createNotifications
- Returns:
- a list of
Notifications
for the stored events
-