Package io.getlime.push.model.entity
Class PushMessageBody
java.lang.Object
io.getlime.push.model.entity.PushMessageBody
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBadge()App icon badge value (iOS only).getBody()Get long message text, used as a notification body.String[]Get the body localized args.Get the body localized key.Get the notification category, used to distinguish actions assigned with the notification.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.Get the map (Map<String, Object>) with optional message parameters.getIcon()Get icon.getSound()Get the sound name to be played with the notification.getTitle()Push message title.String[]Get the title localized args.Get the title localized key.Get notification delivery validity (timestamp message should live to in case it's not delivered immediately).inthashCode()voidSet app icon badge value (iOS only).voidSet long message text, used as a notification body.voidsetBodyLocArgs(String[] bodyLocArgs) Set the body localized args.voidsetBodyLocKey(String bodyLocKey) Set the body localized key.voidsetCategory(String category) Set the notification category, used to distinguish actions assigned with the notification.voidsetCollapseKey(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.voidSet the map (Map<String, Object>) with optional message parameters.voidSet icon.voidSet the sound name to be played with the notification.voidSet push message title.voidsetTitleLocArgs(String[] titleLocArgs) Set the title localized args.voidsetTitleLocKey(String titleLocKey) Set the title localized key.voidsetValidUntil(Instant validUntil) Set notification delivery validity (timestamp message should live to in case it's not delivered immediately).
-
Constructor Details
-
PushMessageBody
public PushMessageBody()
-
-
Method Details
-
getTitle
Push message title. Short and digestible message stating the message purpose, for example "Balance update".- Returns:
- Push message title.
-
setTitle
Set push message title. Short and digestible message stating the message purpose, for example "Balance update".- Parameters:
title- Push message title.
-
getTitleLocKey
Get the title localized key.- Returns:
- Title localized key.
-
setTitleLocKey
Set the title localized key.- Parameters:
titleLocKey- Title localized key.
-
getTitleLocArgs
Get the title localized args.- Returns:
- Title localized args.
-
setTitleLocArgs
Set the title localized args.- Parameters:
titleLocArgs- Title localized args.
-
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
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
Get the body localized key.- Returns:
- Body localized key.
-
setBodyLocKey
Set the body localized key.- Parameters:
bodyLocKey- Body localized key.
-
getBodyLocArgs
Get the body localized args.- Returns:
- Body localized args.
-
setBodyLocArgs
Set the body localized args.- Parameters:
bodyLocArgs- Body localized args.
-
getBadge
App icon badge value (iOS only).- Returns:
- App icon badge.
-
setBadge
Set app icon badge value (iOS only).- Parameters:
badge- App icon badge.
-
getSound
Get the sound name to be played with the notification.- Returns:
- Sound name.
-
setSound
Set the sound name to be played with the notification.- Parameters:
sound- Sound name.
-
getCategory
Get the notification category, used to distinguish actions assigned with the notification.- Returns:
- Notification category.
-
setCategory
Set the notification category, used to distinguish actions assigned with the notification.- Parameters:
category- Notification category.
-
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
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
Get notification delivery validity (timestamp message should live to in case it's not delivered immediately).- Returns:
- Validity timestamp.
-
setValidUntil
Set notification delivery validity (timestamp message should live to in case it's not delivered immediately).- Parameters:
validUntil- Validity timestamp.
-
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
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
Get icon.- Returns:
- Icon.
-
setIcon
Set icon.- Parameters:
icon- Icon.
-
equals
-
hashCode
public int hashCode()
-