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
FieldsFields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.exoplatform.commons.api.notification.model.NotificationInfofindWebNotification(String callerId, String declineKey) Finds the web notification of the declines of a call start sent to its caller, read or not.getId()protected org.exoplatform.commons.api.notification.service.setting.PluginSettingServiceprotected io.meeds.pwa.service.PwaNotificationServiceprotected org.exoplatform.commons.api.notification.service.setting.UserSettingServiceprotected org.exoplatform.commons.api.notification.service.WebNotificationServicebooleanisValid(org.exoplatform.commons.api.notification.NotificationContext ctx) protected booleanisWebActive(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.NotificationInfomakeNotification(org.exoplatform.commons.api.notification.NotificationContext ctx) protected voidstoreWebNotification(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, startMethods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
DeclinedCallPlugin
public DeclinedCallPlugin(org.exoplatform.container.xml.InitParams initParams)
-
-
Method Details
-
getId
- Specified by:
getIdin classorg.exoplatform.commons.api.notification.plugin.BaseNotificationPlugin
-
isValid
public boolean isValid(org.exoplatform.commons.api.notification.NotificationContext ctx) - Specified by:
isValidin classorg.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:
makeNotificationin classorg.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 calldeclineKey- the call start, seeNotificationConstants.DECLINE_KEY- Returns:
- the notification, or
nullwhen none was sent yet
-
isWebActive
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:
truewhen 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()
-