class PushNotificationServiceImpl extends AbstractNotificationServiceImpl<PushNotification> implements PushNotificationService {

    @Transactional
    @Nonnull
    @Override
    public List<PushNotification> createNotificationsForUserActiveRecipients(@Nonnull final Long userId, @Nonnull final PushNotificationDto pushNotificationDto) {
        Assert.notNull(userId, "User id should not be null");
        assertPushNotificationDto(pushNotificationDto);
        logger.debug("Creating push notifications for all active recipients of user with id - {}, push notification DTO - {}", userId, pushNotificationDto);
        // Grab user and check if subscription exists
        final User user = userService.getUserById(userId);
        // Check if subscription exists for users
        final boolean subscriptionExists = pushNotificationSubscriptionService.checkIfPushNotificationSubscriptionExistsForUser(user.getId());
        if (!subscriptionExists) {
            logger.debug("No push notification subscription exists for user with id - {}, do not create any notifications", user.getId());
            return Collections.emptyList();
        }
        // Grab subscription and search for recipients
        final PushNotificationSubscription subscription = pushNotificationSubscriptionService.getPushNotificationSubscriptionForUser(userId);
        final List<PushNotificationRecipient> recipients = getPushNotificationActiveRecipientsForSubscription(subscription);
        // Create push notifications
        final List<PushNotification> pushNotifications = createPushNotificationsForRecipients(recipients, user, pushNotificationDto);
        logger.debug("{} push notifications were created for user with id - {}, push notification DTO - {}", pushNotifications.size(), userId, pushNotificationDto);
        return pushNotifications;
    }

      PushNotificationServiceImpl();

}