Enum PushNotificationParameters
- java.lang.Object
- java.lang.Enum<PushNotificationParameters>
- com.iizix.push.PushNotificationParameters
 
 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Comparable<PushNotificationParameters>
 - public enum PushNotificationParameters extends java.lang.Enum<PushNotificationParameters> The enum used for push notification parameters and if they can be omitted.
- Enum Constant Summary- Enum Constants - Enum Constant - Description - BODYRequired message or text of the push notification, a maximum of 5000 characters.- ICONOptional icon, and if specified, must be an SVG icon.- ICON_COLOROptional icon color.- IMAGEOptional picture to display with the notification.- KEY_ALIASRequired private or alias key for authentication each time a push notification is sent.- ORIGINRequired origin of the notification, generally an IP address.- PRIORITYOptional priority determining where the push notification will be put in the list of notifications (this sorting generally applies to Android devices only).- SENDERRequired sender device identification.- SOUNDOptional sound to play when notification arrives.- TITLENotification title (required).- URLOptional URL.- URL_TITLEOptional URL title, if this parameter is specified, the URL will serve as it.- VIBRATIONHow often the device should vibrate when receiving a push-notification (optional).
 - Field Summary- Fields - Modifier and Type - Field - Description - boolean- isRequiredRequired flag.- java.lang.String- nameThe parameter name (as in name=value).
 - Method Summary- All Methods Static Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - static java.util.Map<PushNotificationParameters,java.lang.String>- parseURL(java.lang.String query)Parses an encoded URL query string into a parameter array with its values.- java.lang.String- toString()Formats the parameter as a string as PARAM["name",{required|optional}].- static java.util.Map<PushNotificationParameters,java.lang.String>- validateParams(java.util.Map<PushNotificationParameters,java.lang.String> params)Validates a map of push notification parameters.- static PushNotificationParameters- valueOf(java.lang.String name)Returns the enum constant of this type with the specified name.- static PushNotificationParameters[]- values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- Enum Constant Detail- TITLE- public static final PushNotificationParameters TITLE Notification title (required).- Server side accepted values are - String.
 - BODY- public static final PushNotificationParameters BODY Required 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.
 - SOUND- public static final PushNotificationParameters SOUND Optional sound to play when notification arrives.- Server side accepted values are - Integer.
 - VIBRATION- public static final PushNotificationParameters VIBRATION How 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.
 - ICON- public static final PushNotificationParameters ICON Optional icon, and if specified, must be an SVG icon.- Server side accepted values are - String.
 - ICON_COLOR- public static final PushNotificationParameters ICON_COLOR Optional icon color.- Server side accepted values are - Coloror- Stringencoded as "#RGB" or "#RRGGBB". The leading '#' can be omitted.
 - URL- public static final PushNotificationParameters URL Optional URL.- Server side accepted values are - URL,- URIor- String.
 - URL_TITLE- public static final PushNotificationParameters URL_TITLE Optional URL title, if this parameter is specified, the URL will serve as it.- Server side accepted values are - String.
 - IMAGE- public static final PushNotificationParameters IMAGE Optional picture to display with the notification.- Server side accepted values are - Fileor- String.
 - PRIORITY- public static final PushNotificationParameters PRIORITY Optional 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.
 - SENDER- public static final PushNotificationParameters SENDER Required sender device identification.- Server side accepted values are - String.
 - ORIGIN- public static final PushNotificationParameters ORIGIN Required origin of the notification, generally an IP address.- Server side accepted values are - InetAddressand- String.
 - KEY_ALIAS- public static final PushNotificationParameters KEY_ALIAS Required private or alias key for authentication each time a push notification is sent.- Server side accepted values are - String.
 
 - Method Detail- values- public static PushNotificationParameters[] values() Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:- for (PushNotificationParameters c : PushNotificationParameters.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - valueOf- public static PushNotificationParameters valueOf(java.lang.String name) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
- java.lang.IllegalArgumentException- if this enum type has no constant with the specified name
- java.lang.NullPointerException- if the argument is null
 
 - toString- public java.lang.String toString() Formats the parameter as a string as PARAM["name",{required|optional}].- Overrides:
- toStringin class- java.lang.Enum<PushNotificationParameters>
- Returns:
- A formatted string.
 
 - parseURL- public static java.util.Map<PushNotificationParameters,java.lang.String> parseURL(java.lang.String query) Parses 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:
- java.lang.IllegalArgumentException- If an argument is invalid.
 
 - validateParams- public static java.util.Map<PushNotificationParameters,java.lang.String> validateParams(java.util.Map<PushNotificationParameters,java.lang.String> params) Validates a map of push notification parameters.- Parameters:
- params- The map of parameters.
- Returns:
- The map of parameters paramsargument.
- Throws:
- java.lang.IllegalArgumentException- If a required parameter is not present.