public final class NotificationContent
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
NotificationContent.Badge |
Modifier and Type | Method and Description |
---|---|
NotificationContent |
addActionButton(NotificationButton actionButton)
Attach action button to notifications.
|
NotificationContent |
addActionButtons(java.util.List<NotificationButton> actionButtons)
Attach action buttons to notifications.
|
NotificationContent |
addTemplatePlaceholder(java.lang.String placeholder,
java.lang.String replacement)
If you specified placeholders on the GetSocial Dashboard for your template title or text - you can replace it using this method.
|
NotificationContent |
addTemplatePlaceholders(java.util.Map<java.lang.String,java.lang.String> templateData)
Add all keys and values from map to template placeholders.
|
static NotificationContent |
notificationFromTemplate(java.lang.String templateName)
Create notification from the template configured on the GetSocial Dashboard.
|
static NotificationContent |
notificationWithText(java.lang.String text)
Create notification with text.
|
NotificationContent |
withAction(Action action)
Set a notification action.
|
NotificationContent |
withBadge(NotificationContent.Badge badge)
Update badge count.
|
NotificationContent |
withCustomization(NotificationCustomization customization)
Customize notification, like change background image, title and text color.
|
NotificationContent |
withMediaAttachment(MediaAttachment mediaAttachment)
Attach media(image, video) to notification.
|
NotificationContent |
withTemplateName(java.lang.String templateName)
Set template name.
|
NotificationContent |
withText(java.lang.String text)
Set notification text.
|
NotificationContent |
withTitle(java.lang.String title)
Set notification title.
|
public static NotificationContent notificationWithText(java.lang.String text)
text
- text to be displayed to receivers.public static NotificationContent notificationFromTemplate(java.lang.String templateName)
templateName
- name of the template on the GetSocial Dashboard. Case-sensitive.public NotificationContent withAction(Action action)
action
- notification action to perform.public NotificationContent withTitle(java.lang.String title)
title
- notification title.public NotificationContent withText(java.lang.String text)
text
- notification text.public NotificationContent withTemplateName(java.lang.String templateName)
withTitle(String)
or withText(String)
have higher priority and will override template values.templateName
- name of the template on the dashboard. Case-sensitive.public NotificationContent addTemplatePlaceholder(java.lang.String placeholder, java.lang.String replacement)
placeholder
- placeholder on the GetSocial Dashboard.replacement
- actual text that should be used instead.public NotificationContent addTemplatePlaceholders(java.util.Map<java.lang.String,java.lang.String> templateData)
templateData
- template placeholders map.public NotificationContent withMediaAttachment(MediaAttachment mediaAttachment)
mediaAttachment
- media attachment.public NotificationContent addActionButton(NotificationButton actionButton)
actionButton
- action button to show.public NotificationContent addActionButtons(java.util.List<NotificationButton> actionButtons)
actionButtons
- action button to show.public NotificationContent withCustomization(NotificationCustomization customization)
customization
- NotificationCustomization instance.public NotificationContent withBadge(NotificationContent.Badge badge)
badge
- badge modification.(c) Copyright GetSocial BV, 2020. All Rights Reserved.