Class RedisNotificationPlugin

java.lang.Object
io.vertigo.social.plugins.notification.redis.RedisNotificationPlugin
All Implemented Interfaces:
io.vertigo.core.node.component.CoreComponent, io.vertigo.core.node.component.Plugin, NotificationPlugin

public final class RedisNotificationPlugin extends Object implements NotificationPlugin
Author:
pchretien
  • Constructor Details

    • RedisNotificationPlugin

      @Inject public RedisNotificationPlugin(Optional<String> connectorNameOpt, List<io.vertigo.connectors.redis.RedisConnector> redisConnectors)
      Constructor.
      Parameters:
      redisConnector - the connector to REDIS database
  • Method Details

    • send

      public void send(NotificationEvent notificationEvent)
      Specified by:
      send in interface NotificationPlugin
      Parameters:
      notificationEvent - Notification to send
    • getCurrentNotifications

      public List<Notification> getCurrentNotifications(io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account> accountURI)
      Specified by:
      getCurrentNotifications in interface NotificationPlugin
      Parameters:
      accountURI - Accout uri
      Returns:
      All notifications for this account
    • updateUserContent

      public void updateUserContent(io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account> accountURI, UUID notificationUUID, String userContent)
      Specified by:
      updateUserContent in interface NotificationPlugin
      Parameters:
      accountURI - Account uri
      notificationUUID - Notification uuid
      userContent - User Content
    • remove

      public void remove(io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account> accountURI, UUID notificationUUID)
      Specified by:
      remove in interface NotificationPlugin
      Parameters:
      accountURI - Account uri
      notificationUUID - Notification uuid
    • removeAll

      public void removeAll(String type, String targetUrl)
      Specified by:
      removeAll in interface NotificationPlugin
      Parameters:
      type - Notification's type
      targetUrl - Target URL, use to filter all notifications to remove
    • cleanTooOldNotifications

      public void cleanTooOldNotifications()
      Scan all notifs every minutes to removed old ones.