Class DeclinedCallPlugin

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.commons.api.notification.plugin.BaseNotificationPlugin
org.exoplatform.webconferencing.notification.plugin.DeclinedCallPlugin
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin

public class DeclinedCallPlugin extends org.exoplatform.commons.api.notification.plugin.BaseNotificationPlugin
Tells the caller that participants declined the call: one web notification per call start, whatever the number of declines, created at the first one and updated at each next one, its push sent again; and one email once the incoming call alert closed, grouping every decline. The web notification is stored here, not by the web channel: the notification this plugin returns for a decline is marked read, so that the web channel stores nothing, and the mail channel sends it only once the declines are closed (see DeclinedCallTemplateBuilder). Declines processed at the same time on this server are grouped one after the other: the platform's notification threads, which run this plugin, wait for each other only for the lookup and the save of a declined call notification. On two servers of a cluster, the first declines of a call start processed at the same time can each create a web notification.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin

    desc, name
  • Constructor Summary

    Constructors
    Constructor
    Description
    DeclinedCallPlugin(org.exoplatform.container.xml.InitParams initParams)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.exoplatform.commons.api.notification.model.NotificationInfo
    findWebNotification(String callerId, String declineKey)
    Finds the web notification of the declines of a call start sent to its caller, read or not.
     
    protected org.exoplatform.commons.api.notification.service.setting.PluginSettingService
     
    protected io.meeds.pwa.service.PwaNotificationService
     
    protected org.exoplatform.commons.api.notification.service.setting.UserSettingService
     
    protected org.exoplatform.commons.api.notification.service.WebNotificationService
     
    boolean
    isValid(org.exoplatform.commons.api.notification.NotificationContext ctx)
     
    protected boolean
    isWebActive(String callerId)
    Tells if the caller receives this notification on the web, as the web channel checks it: the web channel enabled for this notification on the platform, and by the caller.
    protected org.exoplatform.commons.api.notification.model.NotificationInfo
    makeNotification(org.exoplatform.commons.api.notification.NotificationContext ctx)
     
    protected void
    storeWebNotification(org.exoplatform.commons.api.notification.model.NotificationInfo notification)
    Creates the web notification of the declines of a call start, or adds the decline to the one already created, read or not, and sends its push again, when the caller receives this notification on the web.

    Methods inherited from class org.exoplatform.commons.api.notification.plugin.BaseNotificationPlugin

    buildNotification, end, getKey, getOrganizationService, getPluginConfigs, isOldPlugin, setOldPlugin, start

    Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin

    getDescription, getName, setDescription, setName

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • DeclinedCallPlugin

      public DeclinedCallPlugin(org.exoplatform.container.xml.InitParams initParams)
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in class org.exoplatform.commons.api.notification.plugin.BaseNotificationPlugin
    • isValid

      public boolean isValid(org.exoplatform.commons.api.notification.NotificationContext ctx)
      Specified by:
      isValid in class org.exoplatform.commons.api.notification.plugin.BaseNotificationPlugin
    • makeNotification

      protected org.exoplatform.commons.api.notification.model.NotificationInfo makeNotification(org.exoplatform.commons.api.notification.NotificationContext ctx)
      Specified by:
      makeNotification in class org.exoplatform.commons.api.notification.plugin.BaseNotificationPlugin
    • storeWebNotification

      protected void storeWebNotification(org.exoplatform.commons.api.notification.model.NotificationInfo notification)
      Creates the web notification of the declines of a call start, or adds the decline to the one already created, read or not, and sends its push again, when the caller receives this notification on the web.
      Parameters:
      notification - the notification of a decline, its last decliner first
    • findWebNotification

      protected org.exoplatform.commons.api.notification.model.NotificationInfo findWebNotification(String callerId, String declineKey)
      Finds the web notification of the declines of a call start sent to its caller, read or not.
      Parameters:
      callerId - the user who started the call
      declineKey - the call start, see NotificationConstants.DECLINE_KEY
      Returns:
      the notification, or null when none was sent yet
    • isWebActive

      protected boolean isWebActive(String callerId)
      Tells if the caller receives this notification on the web, as the web channel checks it: the web channel enabled for this notification on the platform, and by the caller.
      Parameters:
      callerId - the user who started the call
      Returns:
      true when the web notification is to be stored
    • getWebNotificationService

      protected org.exoplatform.commons.api.notification.service.WebNotificationService getWebNotificationService()
    • getPluginSettingService

      protected org.exoplatform.commons.api.notification.service.setting.PluginSettingService getPluginSettingService()
    • getUserSettingService

      protected org.exoplatform.commons.api.notification.service.setting.UserSettingService getUserSettingService()
    • getPwaNotificationService

      protected io.meeds.pwa.service.PwaNotificationService getPwaNotificationService()