Package io.jmix.notifications
Interface NotificationTypesRepository
- All Known Implementing Classes:
NotificationTypesRepositoryImpl
public interface NotificationTypesRepository
Service that allows to register notification types and get information about available ones.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Unregisters all notification types.Gets all available notification typesgetTypeByNameOpt
(String name) Tries to get notification type by provided name.void
registerTypes
(NotificationType... notificationTypes) Registers provided notification types withNotificationTypesRepository.NotificationTypeRegistrationMode.STRICT
mode.void
registerTypes
(NotificationTypesRepository.NotificationTypeRegistrationMode mode, NotificationType... notificationTypes) Registers provided notification types with provided mode
-
Method Details
-
getAllTypes
Collection<NotificationType> getAllTypes()Gets all available notification types- Returns:
- collection of notification types
-
getTypeByNameOpt
Tries to get notification type by provided name.- Parameters:
name
- type name- Returns:
- Optional with found notification type or empty Optional if type with provided name not found
-
clear
void clear()Unregisters all notification types. -
registerTypes
Registers provided notification types withNotificationTypesRepository.NotificationTypeRegistrationMode.STRICT
mode.- Parameters:
notificationTypes
- notification types
-
registerTypes
void registerTypes(NotificationTypesRepository.NotificationTypeRegistrationMode mode, NotificationType... notificationTypes) Registers provided notification types with provided mode- Parameters:
mode
- registration modenotificationTypes
- notification types
-