Class StandardNotificationBuilder
java.lang.Object
dev.getelements.elements.service.notification.StandardNotificationBuilder
- All Implemented Interfaces:
NotificationBuilder
,NotificationParameters
public class StandardNotificationBuilder
extends Object
implements NotificationBuilder, NotificationParameters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a single key/value property.Adds all properties in the passed in mapping to the notification being built.application
(Application application) Specifies theApplication
sourcing theNotification
.build()
Constructs the instance ofNotification
with all of the configured information.Gets theApplication
sending the notification.Gets a read-only mapping of extra key/value properties associated with this notification.Gets the message of the notification.Gets the singularProfile
who will recieve the notification.getSound()
Gets the sound to play when delivering the message.getTitle()
Ges the title of the notification.Specifies the text to send along with theNotification
.Specifies theProfile
which will receive theNotification
.void
setNotificationFactory
(NotificationFactory notificationFactory) Specifies the sound to play when delivering the message.Specifies the title text of theNotification
.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface dev.getelements.elements.sdk.service.notification.NotificationBuilder
sender, sound
-
Constructor Details
-
StandardNotificationBuilder
public StandardNotificationBuilder()
-
-
Method Details
-
application
Description copied from interface:NotificationBuilder
Specifies theApplication
sourcing theNotification
. This will scan the associatedApplicationConfiguration
instances and select a suitable configuration (or combination thereof) which will be used to configure the means by which the underlyingNotification
will be sent.- Specified by:
application
in interfaceNotificationBuilder
- Parameters:
application
- theApplication
sending theNotification
- Returns:
- this instance
-
recipient
Description copied from interface:NotificationBuilder
Specifies theProfile
which will receive theNotification
.- Specified by:
recipient
in interfaceNotificationBuilder
- Parameters:
recipient
- theProfile
which will recieve theNotification
- Returns:
- this instance
-
title
Description copied from interface:NotificationBuilder
Specifies the title text of theNotification
.- Specified by:
title
in interfaceNotificationBuilder
- Parameters:
title
- the title text- Returns:
- this instance
-
message
Description copied from interface:NotificationBuilder
Specifies the text to send along with theNotification
.- Specified by:
message
in interfaceNotificationBuilder
- Parameters:
message
- the message to send- Returns:
- this instance
-
sound
Description copied from interface:NotificationBuilder
Specifies the sound to play when delivering the message.- Specified by:
sound
in interfaceNotificationBuilder
- Parameters:
sound
- the sound to play when delivering the message- Returns:
- this instance
-
add
Description copied from interface:NotificationBuilder
Adds a single key/value property. Individual keys should be non-empty and all values should be non-null- Specified by:
add
in interfaceNotificationBuilder
- Parameters:
key
- - A non-empty string key for the propertyvalue
- - A non-null string value for the property- Returns:
- this instance
-
addAll
Description copied from interface:NotificationBuilder
Adds all properties in the passed in mapping to the notification being built. Any keys which are null or empty Strings will be ignored. Any values which are null will be ignored. For all other entries, if any keys previously exist in the notification, they will be replaced by the value specified in the passed in Map. If a value is null, then that- Specified by:
addAll
in interfaceNotificationBuilder
- Parameters:
allData
- - A Map of all properties to be added in bulk to this notification.- Returns:
- this instance
-
getRecipient
Description copied from interface:NotificationParameters
Gets the singularProfile
who will recieve the notification.- Specified by:
getRecipient
in interfaceNotificationParameters
- Returns:
-
getApplication
Description copied from interface:NotificationParameters
Gets theApplication
sending the notification.- Specified by:
getApplication
in interfaceNotificationParameters
- Returns:
- the
Application
-
getTitle
Description copied from interface:NotificationParameters
Ges the title of the notification.- Specified by:
getTitle
in interfaceNotificationParameters
- Returns:
- the title
-
getMessage
Description copied from interface:NotificationParameters
Gets the message of the notification.- Specified by:
getMessage
in interfaceNotificationParameters
- Returns:
- the message of the notification
-
getSound
Description copied from interface:NotificationParameters
Gets the sound to play when delivering the message. Null indicates no sound will be played.- Specified by:
getSound
in interfaceNotificationParameters
- Returns:
- the sound name or null
-
getExtraProperties
Description copied from interface:NotificationParameters
Gets a read-only mapping of extra key/value properties associated with this notification. If there are no extra properties, an empty map is returned- Specified by:
getExtraProperties
in interfaceNotificationParameters
- Returns:
- A read-only Map of extra properties
-
build
Description copied from interface:NotificationBuilder
Constructs the instance ofNotification
with all of the configured information. This returns a new instance ofNotification
for each call which can be treated independently.- Specified by:
build
in interfaceNotificationBuilder
- Returns:
- the
Notification
-
getNotificationFactory
-
setNotificationFactory
-
toString
-