public void createFilter(String userId, CreateNotificationFilterDto createFilter) {
        NotificationPreferenceEntity npe = notificationRepository.getNotificationPreferenceByUserIdAndType(userId, createFilter.getNotificationType())
                .orElseGet(() -> {
                    NotificationPreferenceEntity newNpe = new NotificationPreferenceEntity()
                            .setType(createFilter.getNotificationType())
                            .setUser(storage.getEntityObjectReference(UserBean.class, userId));
                    tryAction(() -> notificationRepository.create(newNpe));
                    return newNpe;
                });

        NotificationFilterEntity nfe = notificationMapper.toEntity(createFilter);
        npe.getRules().add(nfe);
        tryAction(() -> notificationRepository.update(npe));
        notificationRulesService.cache(npe);
    }
As {@link #markNotificationsWithStatus(String, List, NotificationStatus)}, but only accepts non-OPEN status.

<p>An exception will be thrown if an attempt to mark as read is made using {@link NotificationStatus#OPEN}.

@see #markNotificationsWithStatus
manager/api/rest-impl/src/main/java/io/apiman/manager/api/service/NotificationService.java