Enum Class PushNotificationParameters
- All Implemented Interfaces:
- Serializable,- Comparable<PushNotificationParameters>,- Constable
- Nested Class Summary- Nested classes/interfaces inherited from class java.lang.Enum- Enum.EnumDesc<E extends Enum<E>>
- Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionRequired message or text of the push notification, a maximum of 5000 characters.Optional icon, and if specified, must be an SVG icon.Optional icon color.Optional picture to display with the notification.Required private or alias key for authentication each time a push notification is sent.Required origin of the notification, generally an IP address.Optional priority determining where the push notification will be put in the list of notifications (this sorting generally applies to Android devices only).Required sender device identification.Optional sound to play when notification arrives.Notification title (required).Optional URL.Optional URL title, if this parameter is specified, the URL will serve as it.How often the device should vibrate when receiving a push-notification (optional).
- Field SummaryFieldsModifier and TypeFieldDescription- final booleanRequired flag.- final StringThe parameter name (as in name=value).
- Method SummaryModifier and TypeMethodDescription- static Map<PushNotificationParameters,- String> Parses an encoded URL query string into a parameter array with its values.- toString()Formats the parameter as a string as PARAM["name",{required|optional}].- static Map<PushNotificationParameters,- String> Validates a map of push notification parameters.- static PushNotificationParametersReturns the enum constant of this class with the specified name.- static PushNotificationParameters[]- values()Returns an array containing the constants of this enum class, in the order they are declared.
- Enum Constant Details- TITLENotification title (required).- Server side accepted values are - String.
- BODYRequired message or text of the push notification, a maximum of 5000 characters. The push notification will show fewer characters depending on the system.- Server side accepted values are - String.
- SOUNDOptional sound to play when notification arrives.- Server side accepted values are - Integer.
- VIBRATIONHow often the device should vibrate when receiving a push-notification (optional). "0" or undefined = device default or a number "1" to "3".- This parameter are generally only available for clients on iOS and Android. - Server side accepted values are - Integeror- String, integer values 0 to 3.
- ICONOptional icon, and if specified, must be an SVG icon.- Server side accepted values are - String.
- ICON_COLOROptional icon color.- Server side accepted values are - Coloror- Stringencoded as "#RGB" or "#RRGGBB". The leading '#' can be omitted.
- URLOptional URL.- Server side accepted values are - URL,- URIor- String.
- URL_TITLEOptional URL title, if this parameter is specified, the URL will serve as it.- Server side accepted values are - String.
- IMAGEOptional picture to display with the notification.- Server side accepted values are - Fileor- String.
- PRIORITYOptional priority determining where the push notification will be put in the list of notifications (this sorting generally applies to Android devices only).- Server side accepted values are - Integeror- String, integer value ranges from -2 = lowest priority to 2 = highest priority, default being zero or normal priority.
- SENDERRequired sender device identification.- Server side accepted values are - String.
- ORIGINRequired origin of the notification, generally an IP address.- Server side accepted values are - InetAddressand- String.
- KEY_ALIASRequired private or alias key for authentication each time a push notification is sent.- Server side accepted values are - String.
 
- Field Details- nameThe parameter name (as in name=value).
- isRequiredpublic final boolean isRequiredRequired flag.
 
- Method Details- valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- toStringFormats the parameter as a string as PARAM["name",{required|optional}].- Overrides:
- toStringin class- Enum<PushNotificationParameters>
- Returns:
- A formatted string.
 
- parseURLParses an encoded URL query string into a parameter array with its values.- Parameters:
- query- The query string.
- Returns:
- A new validated map of parameters. Values in the map are trimmed for white spaces.
- Throws:
- IllegalArgumentException- If an argument is invalid.
 
- validateParamspublic static Map<PushNotificationParameters,- String> validateParams- (Map<PushNotificationParameters, - String> params) Validates a map of push notification parameters.- Parameters:
- params- The map of parameters.
- Returns:
- The map of parameters paramsargument.
- Throws:
- IllegalArgumentException- If a required parameter is not present.