Class NotificationOptions

java.lang.Object
org.vaadin.firitin.util.webnotification.NotificationOptions

public class NotificationOptions extends Object
Represents options for a web notification (mostly autogenerated with ChatGPT).

This class provides various properties that can be set to customize the appearance and behavior of a web notification. It includes fields for badge, body, data, direction, icon, image, language, renotify, require interaction, silent mode, tag, timestamp, and vibration patterns.

The actions have been left out intentionally, as they are only relevant for web push notifications, that need service worker and those are not supported by Vaadin already.

  • Constructor Details

    • NotificationOptions

      public NotificationOptions()
  • Method Details

    • getBadge

      public URI getBadge()
    • setBadge

      @Deprecated public void setBadge(URI badge)
      Deprecated.
      Badge is not supported by Firefox and Safari, so it is not recommended to use.
    • getBody

      public String getBody()
    • setBody

      public void setBody(String body)
    • getData

      public Object getData()
    • setData

      public void setData(Object data)
    • getDir

    • setDir

      public void setDir(NotificationOptions.Direction dir)
    • getIcon

      public URI getIcon()
    • setIcon

      @Deprecated public void setIcon(URI icon)
      Deprecated.
      Icon is not supported by Safari, so it is not recommended to use.
    • getImage

      public URI getImage()
    • setImage

      @Deprecated public void setImage(URI image)
      Deprecated.
      Only supported by Chromium-based browsers
    • getLang

      public String getLang()
    • setLang

      public void setLang(String lang)
    • getRenotify

      public Boolean getRenotify()
    • setRenotify

      @Deprecated public void setRenotify(Boolean renotify)
      Deprecated.
      Renotify is not supported by Firefox and Safari, so it is not recommended to use.
    • getRequireInteraction

      public Boolean getRequireInteraction()
    • setRequireInteraction

      @Deprecated public void setRequireInteraction(Boolean requireInteraction)
      Deprecated.
      Require interaction is not supported by Firefox and Safari, so it is not recommended to use.
    • getSilent

      public Boolean getSilent()
    • setSilent

      public void setSilent(Boolean silent)
    • getTag

      public String getTag()
    • setTag

      @Deprecated public void setTag(String tag)
      Deprecated.
      Tag is not supported by Safari, so it is not recommended to use.
    • getTimestamp

      public Instant getTimestamp()
    • setTimestamp

      @Deprecated public void setTimestamp(Instant timestamp)
      Deprecated.
      Timestamp is not supported by Firefox and Safari, so it is not recommended to use.
    • getVibrate

      public List<Long> getVibrate()
    • setVibrate

      @Deprecated public void setVibrate(List<Long> vibrate)
      Deprecated.
      Vibration is not supported by Firefox and Safari, so it is not recommended to use.
    • toString

      public String toString()
      Overrides:
      toString in class Object