Package io.meeds.pwa.service
Class PwaNotificationService
java.lang.Object
io.meeds.pwa.service.PwaNotificationService
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Randomstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(long webNotificationId) Send a Push Notification to display to user device(s)Send a Push Notification to display to user device(s)voiddestroy()org.exoplatform.services.resources.LocaleConfiggetLocaleConfig(String username) getNotification(long webNotificationId, String username) voidinit()voidsetDefaultNotificationMessageProperties(PwaNotificationMessage notificationMessage, String notificationId, org.exoplatform.services.resources.LocaleConfig localeConfig) voidupdateNotification(long webNotificationId, String action, String username)
-
Field Details
-
PWA_NOTIFICATION_CREATED
- See Also:
-
PWA_NOTIFICATION_OPEN_UI_ACTION
- See Also:
-
PWA_NOTIFICATION_MARK_READ_USER_ACTION
- See Also:
-
PWA_NOTIFICATION_MARK_READ_ACTION_LABEL
- See Also:
-
EVENT_NOTIFICATION_SENT
- See Also:
-
EVENT_NOTIFICATION_RESPONSE_ERROR
- See Also:
-
EVENT_NOTIFICATION_SENDING_ERROR
- See Also:
-
EVENT_OUTDATED_SUBSCRIPTION
- See Also:
-
EVENT_ERROR_PARAM_NAME
- See Also:
-
EVENT_SUBSCRIPTION_PARAM_NAME
- See Also:
-
EVENT_HTTP_RESPONSE_PARAM_NAME
- See Also:
-
EVENT_NOTIFICATION_ID_PARAM_NAME
- See Also:
-
EVENT_ACTION_PARAM_NAME
- See Also:
-
EVENT_NOTIFICATION_TYPE_PARAM_NAME
- See Also:
-
WEB_NOTIFICATION
- See Also:
-
EVENT_USERNAME_PARAM_NAME
- See Also:
-
EVENT_DURATION_PARAM_NAME
- See Also:
-
RANDOM
-
-
Constructor Details
-
PwaNotificationService
public PwaNotificationService()
-
-
Method Details
-
init
@PostConstruct public void init() -
destroy
@PreDestroy public void destroy() -
getNotification
public PwaNotificationMessage getNotification(long webNotificationId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
updateNotification
public void updateNotification(long webNotificationId, String action, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
create
Send a Push Notification to display to user device(s)- Parameters:
webNotificationId-
-
create
Send a Push Notification to display to user device(s)- Parameters:
params-
-
getVapidPublicKeyString
- Returns:
- VAPID Public Key encoded using Base64url
-
setDefaultNotificationMessageProperties
public void setDefaultNotificationMessageProperties(PwaNotificationMessage notificationMessage, String notificationId, org.exoplatform.services.resources.LocaleConfig localeConfig) -
getLocaleConfig
-