Class LocalizedPushPayload.Builder

java.lang.Object
com.sap.mobile.services.client.push.LocalizedPushPayload.Builder
Enclosing interface:
LocalizedPushPayload

public static final class LocalizedPushPayload.Builder extends Object
Helper for server localized push payload creation.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • notification

      public LocalizedPushPayload.Builder 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 Fallback
      Parameters:
      notification - the default notification.
      Returns:
      a builder with the default notification.
    • notifications

      public LocalizedPushPayload.Builder notifications(Map<String,? extends PushPayload> 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

      public LocalizedPushPayload.Builder addLocale(Locale locale, PushPayload pushPayload)
      Add a single localized notification to the existing localized notification map.
      Parameters:
      locale - the locale
      pushPayload - the localized notification
      Returns:
      a builder with the updated map of localized notifications.
    • addLocale

      public LocalizedPushPayload.Builder addLocale(String locale, PushPayload pushPayload)
      Add a single localized notification to the existing localized notification map.
      Parameters:
      locale - the locale
      pushPayload - the localized notification
      Returns:
      a builder with the updated map of localized notifications.
    • build

      public LocalizedPushPayload build()
      Returns:
      the server localized localized bulk notification payload.