Class PushNotificationPayload


  • public class PushNotificationPayload
    extends java.lang.Object
    Object that represents a push notification payload. A push notification payload contains a push notification element other different properties and some data. This push notification payload is generic to both iOS (APNS) and Android (FCM) push notification.
    • Constructor Detail

      • PushNotificationPayload

        public PushNotificationPayload()
      • PushNotificationPayload

        public PushNotificationPayload​(PushNotificationElement pushNotification,
                                       java.util.Map<java.lang.String,​java.lang.String> data,
                                       java.lang.String priority,
                                       java.lang.String collapseKey,
                                       java.lang.String timeToLive,
                                       java.util.Map<java.lang.String,​java.lang.String> extraProperties)
      • PushNotificationPayload

        public PushNotificationPayload​(PushNotificationElement pushNotificationElement,
                                       java.util.Map<java.lang.String,​java.lang.String> data)
    • Method Detail

      • validate

        public void validate()
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setPushNotificationElement

        public void setPushNotificationElement​(PushNotificationElement pushNotificationElement)
      • getPriority

        public java.lang.String getPriority()
      • setPriority

        public void setPriority​(java.lang.String priority)
      • getCollapseKey

        public java.lang.String getCollapseKey()
      • setCollapseKey

        public void setCollapseKey​(java.lang.String collapseKey)
      • getTimeToLive

        public java.lang.String getTimeToLive()
      • setTimeToLive

        public void setTimeToLive​(java.lang.String timeToLive)
      • getExtraProperties

        public java.util.Map<java.lang.String,​java.lang.String> getExtraProperties()
        Get the extra properties of the notification. Extra properties allow to put extra properties into the notification that are not by default supported. Key => represent the type of the property Value => represent the value of the property
        Returns:
        email subject
      • setExtraProperties

        public void setExtraProperties​(java.util.Map<java.lang.String,​java.lang.String> extraProperties)
        Set the extra properties of the notification. Extra properties allow to put extra properties into the notification that are not by default supported. Key => represent the type of the property Value => represent the value of the property
        Parameters:
        extraProperties - map of the extra properties.
      • getData

        public java.util.Map<java.lang.String,​java.lang.String> getData()
      • setData

        public void setData​(java.util.Map<java.lang.String,​java.lang.String> data)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object