Package io.jmix.notifications.impl
Class NotificationTypesRepositoryImpl
java.lang.Object
io.jmix.notifications.impl.NotificationTypesRepositoryImpl
- All Implemented Interfaces:
NotificationTypesRepository
@Component
public class NotificationTypesRepositoryImpl
extends Object
implements NotificationTypesRepository
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.notifications.NotificationTypesRepository
NotificationTypesRepository.NotificationTypeRegistrationMode
-
Field Summary
-
Constructor Summary
-
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
-
Field Details
-
registry
-
-
Constructor Details
-
NotificationTypesRepositoryImpl
public NotificationTypesRepositoryImpl()
-
-
Method Details
-
getAllTypes
Description copied from interface:NotificationTypesRepository
Gets all available notification types- Specified by:
getAllTypes
in interfaceNotificationTypesRepository
- Returns:
- collection of notification types
-
getTypeByNameOpt
Description copied from interface:NotificationTypesRepository
Tries to get notification type by provided name.- Specified by:
getTypeByNameOpt
in interfaceNotificationTypesRepository
- Parameters:
name
- type name- Returns:
- Optional with found notification type or empty Optional if type with provided name not found
-
clear
public void clear()Description copied from interface:NotificationTypesRepository
Unregisters all notification types.- Specified by:
clear
in interfaceNotificationTypesRepository
-
registerTypes
Description copied from interface:NotificationTypesRepository
Registers provided notification types withNotificationTypesRepository.NotificationTypeRegistrationMode.STRICT
mode.- Specified by:
registerTypes
in interfaceNotificationTypesRepository
- Parameters:
notificationTypes
- notification types
-
registerTypes
public void registerTypes(NotificationTypesRepository.NotificationTypeRegistrationMode mode, NotificationType... notificationTypes) Description copied from interface:NotificationTypesRepository
Registers provided notification types with provided mode- Specified by:
registerTypes
in interfaceNotificationTypesRepository
- Parameters:
mode
- registration modenotificationTypes
- notification types
-