Class NotificationBuilder

java.lang.Object
io.vertigo.social.notification.NotificationBuilder
All Implemented Interfaces:
io.vertigo.core.lang.Builder<Notification>

public final class NotificationBuilder extends Object implements io.vertigo.core.lang.Builder<Notification>
Author:
pchretien
  • Method Details

    • withSender

      public NotificationBuilder withSender(String sender)
      Parameters:
      sender - Sender's name
      Returns:
      this builder
    • withType

      public NotificationBuilder withType(String type)
      Parameters:
      type - Notification's type
      Returns:
      this builder
    • withCreationDate

      public NotificationBuilder withCreationDate(Instant creationInstant)
      Parameters:
      creationInstant - Creation date
      Returns:
      this builder
    • withTitle

      public NotificationBuilder withTitle(String title)
      Parameters:
      title - Notification's title
      Returns:
      this builder
    • withContent

      public NotificationBuilder withContent(String content)
      Parameters:
      content - Notification's content
      Returns:
      this builder
    • withTTLInSeconds

      public NotificationBuilder withTTLInSeconds(int ttlInSeconds)
      Parameters:
      ttlInSeconds - Notification's TimeToLive
      Returns:
      this builder
    • withTargetUrl

      public NotificationBuilder withTargetUrl(String targetUrl)
      Parameters:
      targetUrl - Notification's target url
      Returns:
      this builder
    • withUserContent

      public NotificationBuilder withUserContent(String userContent)
      Parameters:
      userContent - Notification's userContent ("" and null are translated to Optional.empty)
      Returns:
      this builder
    • build

      public Notification build()
      Specified by:
      build in interface io.vertigo.core.lang.Builder<Notification>