Class PwaNotificationService

java.lang.Object
io.meeds.pwa.service.PwaNotificationService

@Service public class PwaNotificationService extends Object
  • Field Details

  • 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.ObjectNotFoundException
      IllegalAccessException
    • getNotificationFromPush

      public PwaNotificationMessage getNotificationFromPush(long webNotificationId, String authorizationHeader, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • updateNotificationFromPush

      public void updateNotificationFromPush(long webNotificationId, String action, String authorizationHeader, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • reportPushDeliveryDelay

      public void reportPushDeliveryDelay(long webNotificationId, String authorizationHeader, String username, long sentAt, long receivedAt) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • getPushDeliveryDelayStatus

      public Map<String,Object> getPushDeliveryDelayStatus(String username, String subscriptionId)
    • resetPushDeliveryDelay

      public void resetPushDeliveryDelay(String username, String subscriptionId)
    • updateNotification

      public void updateNotification(long webNotificationId, String action, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • create

      public ScheduledFuture<?> create(long webNotificationId)
      Send a Push Notification to display to user device(s)
      Parameters:
      webNotificationId -
    • create

      public ScheduledFuture<?> create(Map<String,Object> params)
      Send a Push Notification to display to user device(s)
      Parameters:
      params -
    • getVapidPublicKeyString

      public String getVapidPublicKeyString()
      Returns:
      VAPID Public Key encoded using Base64url
    • setDefaultNotificationMessageProperties

      public void setDefaultNotificationMessageProperties(PwaNotificationMessage notificationMessage, String notificationId, org.exoplatform.services.resources.LocaleConfig localeConfig)
    • getLocaleConfig

      public org.exoplatform.services.resources.LocaleConfig getLocaleConfig(String username)