Package io.vertigo.social.notification
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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Notification
build()
NotificationBuilder
withContent(String content)
NotificationBuilder
withCreationDate(Instant creationInstant)
NotificationBuilder
withSender(String sender)
NotificationBuilder
withTargetUrl(String targetUrl)
NotificationBuilder
withTitle(String title)
NotificationBuilder
withTTLInSeconds(int ttlInSeconds)
NotificationBuilder
withType(String type)
NotificationBuilder
withUserContent(String userContent)
-
-
-
Method Detail
-
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 interfaceio.vertigo.core.lang.Builder<Notification>
-
-