Class LocalizedPushPayload.Builder
java.lang.Object
com.sap.mobile.services.client.push.LocalizedPushPayload.Builder
- Enclosing interface:
- LocalizedPushPayload
Helper for server localized push payload creation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddLocale
(String locale, PushPayload pushPayload) Add a single localized notification to the existing localized notification map.addLocale
(Locale locale, PushPayload pushPayload) Add a single localized notification to the existing localized notification map.build()
notification
(PushPayload notification) Sets the fallback notification sent when the device registration has no locale or the localized notification map has no matching locale for the device locale, @see Localized Push - Language Fallbacknotifications
(Map<String, ? extends PushPayload> notifications) Sets/replaces the map of localized push notifications.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
notification
Sets the fallback notification sent when the device registration has no locale or the localized notification map has no matching locale for the device locale, @see Localized Push - Language Fallback- Parameters:
notification
- the default notification.- Returns:
- a builder with the default notification.
-
notifications
Sets/replaces the map of localized push notifications.- Parameters:
notifications
- a map of localized notifications.- Returns:
- a builder with the map of localized notifications.
-
addLocale
Add a single localized notification to the existing localized notification map.- Parameters:
locale
- the localepushPayload
- the localized notification- Returns:
- a builder with the updated map of localized notifications.
-
addLocale
Add a single localized notification to the existing localized notification map.- Parameters:
locale
- the localepushPayload
- the localized notification- Returns:
- a builder with the updated map of localized notifications.
-
build
- Returns:
- the server localized localized bulk notification payload.
-