Class PushMessageBody

java.lang.Object
io.getlime.push.model.entity.PushMessageBody

public class PushMessageBody extends Object
Class representing a message body - the information that do not serve as a "message descriptor" but rather as payload. This data package is a subject of end-to-end encryption.
Author:
Petr Dvorak, petr@wultra.com
  • Constructor Details

    • PushMessageBody

      public PushMessageBody()
  • Method Details

    • getTitle

      public String getTitle()
      Push message title. Short and digestible message stating the message purpose, for example "Balance update".
      Returns:
      Push message title.
    • setTitle

      public void setTitle(String title)
      Set push message title. Short and digestible message stating the message purpose, for example "Balance update".
      Parameters:
      title - Push message title.
    • getTitleLocKey

      public String getTitleLocKey()
      Get the title localized key.
      Returns:
      Title localized key.
    • setTitleLocKey

      public void setTitleLocKey(String titleLocKey)
      Set the title localized key.
      Parameters:
      titleLocKey - Title localized key.
    • getTitleLocArgs

      public String[] getTitleLocArgs()
      Get the title localized args.
      Returns:
      Title localized args.
    • setTitleLocArgs

      public void setTitleLocArgs(String[] titleLocArgs)
      Set the title localized args.
      Parameters:
      titleLocArgs - Title localized args.
    • getBody

      public String getBody()
      Get long message text, used as a notification body. Place your message to this property, for example "Your today's balance is $782.40".
      Returns:
      Notification body text.
    • setBody

      public void setBody(String body)
      Set long message text, used as a notification body. Place your message to this property, for example "Your today's balance is $782.40".
      Parameters:
      body - Notification body text.
    • getBodyLocKey

      public String getBodyLocKey()
      Get the body localized key.
      Returns:
      Body localized key.
    • setBodyLocKey

      public void setBodyLocKey(String bodyLocKey)
      Set the body localized key.
      Parameters:
      bodyLocKey - Body localized key.
    • getBodyLocArgs

      public String[] getBodyLocArgs()
      Get the body localized args.
      Returns:
      Body localized args.
    • setBodyLocArgs

      public void setBodyLocArgs(String[] bodyLocArgs)
      Set the body localized args.
      Parameters:
      bodyLocArgs - Body localized args.
    • getBadge

      public Integer getBadge()
      App icon badge value (iOS only).
      Returns:
      App icon badge.
    • setBadge

      public void setBadge(Integer badge)
      Set app icon badge value (iOS only).
      Parameters:
      badge - App icon badge.
    • getSound

      public String getSound()
      Get the sound name to be played with the notification.
      Returns:
      Sound name.
    • setSound

      public void setSound(String sound)
      Set the sound name to be played with the notification.
      Parameters:
      sound - Sound name.
    • getCategory

      public String getCategory()
      Get the notification category, used to distinguish actions assigned with the notification.
      Returns:
      Notification category.
    • setCategory

      public void setCategory(String category)
      Set the notification category, used to distinguish actions assigned with the notification.
      Parameters:
      category - Notification category.
    • getCollapseKey

      public String getCollapseKey()
      Get the collapse key, used to collapse messages on the server in case messages cannot be delivered and as a tag / thread ID to group messages with the same content type.
      Returns:
      Notification collapse key.
    • setCollapseKey

      public void setCollapseKey(String collapseKey)
      Set the collapse key, used to collapse messages on the server in case messages cannot be delivered and as a tag / thread ID to group messages with the same content type.
      Parameters:
      collapseKey - Notification collapse key.
    • getValidUntil

      public Instant getValidUntil()
      Get notification delivery validity (timestamp message should live to in case it's not delivered immediately).
      Returns:
      Validity timestamp.
    • setValidUntil

      public void setValidUntil(Instant validUntil)
      Set notification delivery validity (timestamp message should live to in case it's not delivered immediately).
      Parameters:
      validUntil - Validity timestamp.
    • getExtras

      public Map<String,Object> getExtras()
      Get the map (Map<String, Object>) with optional message parameters. This is translated to custom parameters on iOS and to data notification payload object on Android.
      Returns:
      Extra attributes.
    • setExtras

      public void setExtras(Map<String,Object> extras)
      Set the map (Map<String, Object>) with optional message parameters. This is translated to custom parameters on iOS and to data notification payload object on Android.
      Parameters:
      extras - Extra attributes.
    • getIcon

      public String getIcon()
      Get icon.
      Returns:
      Icon.
    • setIcon

      public void setIcon(String icon)
      Set icon.
      Parameters:
      icon - Icon.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object