Package im.getsocial.sdk.notifications
Class SendNotificationTarget
- java.lang.Object
-
- im.getsocial.sdk.notifications.SendNotificationTarget
-
public class SendNotificationTarget extends java.lang.Object
Entity to define Push Notification recipients.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SendNotificationTarget
addPlaceholder(java.lang.String placeholder)
Add a placeholder.SendNotificationTarget
addPlaceholders(java.util.List<java.lang.String> placeholders)
Add placeholders to the target.static SendNotificationTarget
create()
Create a new notification target.java.util.List<java.lang.String>
getPlaceholders()
UserIdList
getUserIds()
static SendNotificationTarget
placeholders(java.lang.String... placeholders)
Create a new notification target with placeholders.java.lang.String
toString()
static SendNotificationTarget
users(UserIdList userIdList)
Create a new notification target with list of users.
-
-
-
Method Detail
-
create
public static SendNotificationTarget create()
Create a new notification target.- Returns:
- new instance.
-
placeholders
public static SendNotificationTarget placeholders(java.lang.String... placeholders)
Create a new notification target with placeholders. Placeholders are listed inSendNotificationPlaceholders.Receivers
.- Parameters:
placeholders
- list of placeholders. Invalid placeholders are going to be ignored.- Returns:
- new instance.
-
users
public static SendNotificationTarget users(UserIdList userIdList)
Create a new notification target with list of users.- Parameters:
userIdList
- list of user to receive notification.- Returns:
- new instance.
-
addPlaceholder
public SendNotificationTarget addPlaceholder(java.lang.String placeholder)
Add a placeholder. One ofSendNotificationPlaceholders.Receivers
.- Parameters:
placeholder
- one ofSendNotificationPlaceholders.Receivers
.- Returns:
- same instance for methods chaining.
-
addPlaceholders
public SendNotificationTarget addPlaceholders(java.util.List<java.lang.String> placeholders)
Add placeholders to the target. Placeholders are listed inSendNotificationPlaceholders.Receivers
.- Parameters:
placeholders
- one ofSendNotificationPlaceholders.Receivers
.- Returns:
- same instance for methods chaining.
-
getUserIds
public UserIdList getUserIds()
- Returns:
- list of users to receive the notification.
-
getPlaceholders
public java.util.List<java.lang.String> getPlaceholders()
- Returns:
- list of placeholders.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-