Package su.onno.ui.notifications
Class NotificationsAutoConfiguration
java.lang.Object
su.onno.ui.notifications.NotificationsAutoConfiguration
@AutoConfiguration(after=UiAutoConfiguration.class)
@ConditionalOnWebApplication(type=SERVLET)
@ConditionalOnBean({MetadataRegistry.class,FieldHintResolver.class,UiEventPublisher.class})
@EnableConfigurationProperties(NotificationProperties.class)
@ConditionalOnProperty(prefix="onno.notifications",
name="enabled",
havingValue="true",
matchIfMissing=true)
public class NotificationsAutoConfiguration
extends Object
Wires the
/api/notifications per-user notification timeline, its NotificationStore,
the NotificationService delivery hub, and the onno.notifications.* configuration.
Gated on a servlet web app and onno.notifications.enabled (default true), and runs after
UiAutoConfiguration so the UiEventPublisher (SSE fan-out), CurrentUserResolver
(recipient identity), and ClusterEventBus (cross-node relay) it builds on already exist — the
same layering the comments feature uses. Storage is the framework-owned onno_notifications
table the store creates on startup; there is no app metadata to model.
The built-in producers (MentionNotificationSource, AssignmentNotificationSource,
ReplyNotificationSource) are each gated by their own sub-flag so an app can keep the panel
while turning a source off.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassignmentNotificationSource(NotificationService notificationService, UiLayout uiLayout, MetadataRegistry registry, org.jdbi.v3.core.Jdbi jdbi) mentionNotificationSource(NotificationService notificationService, UiLayout uiLayout, MetadataRegistry registry) notificationController(NotificationService notificationService, CurrentUserResolver currentUserResolver) notificationService(NotificationStore store, UiEventPublisher publisher, ClusterEventBus clusterEventBus, NotificationProperties properties) notificationStore(org.jdbi.v3.core.Jdbi jdbi) replyNotificationSource(NotificationService notificationService)
-
Constructor Details
-
NotificationsAutoConfiguration
public NotificationsAutoConfiguration()
-
-
Method Details
-
notificationStore
-
notificationService
@Bean public NotificationService notificationService(NotificationStore store, UiEventPublisher publisher, ClusterEventBus clusterEventBus, NotificationProperties properties) -
notificationController
@Bean public NotificationController notificationController(NotificationService notificationService, CurrentUserResolver currentUserResolver) -
mentionNotificationSource
@Bean @ConditionalOnProperty(prefix="onno.notifications.mentions", name="enabled", havingValue="true", matchIfMissing=true) public MentionNotificationSource mentionNotificationSource(NotificationService notificationService, UiLayout uiLayout, MetadataRegistry registry) -
assignmentNotificationSource
@Bean @ConditionalOnProperty(prefix="onno.notifications.assignments", name="enabled", havingValue="true", matchIfMissing=true) public AssignmentNotificationSource assignmentNotificationSource(NotificationService notificationService, UiLayout uiLayout, MetadataRegistry registry, org.jdbi.v3.core.Jdbi jdbi) -
replyNotificationSource
@Bean @ConditionalOnProperty(prefix="onno.notifications.replies", name="enabled", havingValue="true", matchIfMissing=true) public ReplyNotificationSource replyNotificationSource(NotificationService notificationService)
-