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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Unregisters all notification types.Gets all available notification typesgetTypeByNameOpt(String name) Tries to get notification type by provided name.voidregisterTypes(NotificationType... notificationTypes) Registers provided notification types withNotificationTypesRepository.NotificationTypeRegistrationMode.STRICTmode.voidregisterTypes(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:NotificationTypesRepositoryGets all available notification types- Specified by:
getAllTypesin interfaceNotificationTypesRepository- Returns:
- collection of notification types
-
getTypeByNameOpt
Description copied from interface:NotificationTypesRepositoryTries to get notification type by provided name.- Specified by:
getTypeByNameOptin 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:NotificationTypesRepositoryUnregisters all notification types.- Specified by:
clearin interfaceNotificationTypesRepository
-
registerTypes
Description copied from interface:NotificationTypesRepositoryRegisters provided notification types withNotificationTypesRepository.NotificationTypeRegistrationMode.STRICTmode.- Specified by:
registerTypesin interfaceNotificationTypesRepository- Parameters:
notificationTypes- notification types
-
registerTypes
public void registerTypes(NotificationTypesRepository.NotificationTypeRegistrationMode mode, NotificationType... notificationTypes) Description copied from interface:NotificationTypesRepositoryRegisters provided notification types with provided mode- Specified by:
registerTypesin interfaceNotificationTypesRepository- Parameters:
mode- registration modenotificationTypes- notification types
-