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 theApplicationsourcing theNotification.build()Constructs the instance ofNotificationwith all of the configured information.Gets theApplicationsending the notification.Gets a read-only mapping of extra key/value properties associated with this notification.Gets the message of the notification.Gets the singularProfilewho 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 theProfilewhich will receive theNotification.voidsetNotificationFactory(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, waitMethods inherited from interface dev.getelements.elements.sdk.service.notification.NotificationBuilder
sender, sound
-
Constructor Details
-
StandardNotificationBuilder
public StandardNotificationBuilder()
-
-
Method Details
-
application
Description copied from interface:NotificationBuilderSpecifies theApplicationsourcing theNotification. This will scan the associatedApplicationConfigurationinstances and select a suitable configuration (or combination thereof) which will be used to configure the means by which the underlyingNotificationwill be sent.- Specified by:
applicationin interfaceNotificationBuilder- Parameters:
application- theApplicationsending theNotification- Returns:
- this instance
-
recipient
Description copied from interface:NotificationBuilderSpecifies theProfilewhich will receive theNotification.- Specified by:
recipientin interfaceNotificationBuilder- Parameters:
recipient- theProfilewhich will recieve theNotification- Returns:
- this instance
-
title
Description copied from interface:NotificationBuilderSpecifies the title text of theNotification.- Specified by:
titlein interfaceNotificationBuilder- Parameters:
title- the title text- Returns:
- this instance
-
message
Description copied from interface:NotificationBuilderSpecifies the text to send along with theNotification.- Specified by:
messagein interfaceNotificationBuilder- Parameters:
message- the message to send- Returns:
- this instance
-
sound
Description copied from interface:NotificationBuilderSpecifies the sound to play when delivering the message.- Specified by:
soundin interfaceNotificationBuilder- Parameters:
sound- the sound to play when delivering the message- Returns:
- this instance
-
add
Description copied from interface:NotificationBuilderAdds a single key/value property. Individual keys should be non-empty and all values should be non-null- Specified by:
addin 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:NotificationBuilderAdds 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:
addAllin interfaceNotificationBuilder- Parameters:
allData- - A Map of all properties to be added in bulk to this notification.- Returns:
- this instance
-
getRecipient
Description copied from interface:NotificationParametersGets the singularProfilewho will recieve the notification.- Specified by:
getRecipientin interfaceNotificationParameters- Returns:
-
getApplication
Description copied from interface:NotificationParametersGets theApplicationsending the notification.- Specified by:
getApplicationin interfaceNotificationParameters- Returns:
- the
Application
-
getTitle
Description copied from interface:NotificationParametersGes the title of the notification.- Specified by:
getTitlein interfaceNotificationParameters- Returns:
- the title
-
getMessage
Description copied from interface:NotificationParametersGets the message of the notification.- Specified by:
getMessagein interfaceNotificationParameters- Returns:
- the message of the notification
-
getSound
Description copied from interface:NotificationParametersGets the sound to play when delivering the message. Null indicates no sound will be played.- Specified by:
getSoundin interfaceNotificationParameters- Returns:
- the sound name or null
-
getExtraProperties
Description copied from interface:NotificationParametersGets 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:
getExtraPropertiesin interfaceNotificationParameters- Returns:
- A read-only Map of extra properties
-
build
Description copied from interface:NotificationBuilderConstructs the instance ofNotificationwith all of the configured information. This returns a new instance ofNotificationfor each call which can be treated independently.- Specified by:
buildin interfaceNotificationBuilder- Returns:
- the
Notification
-
getNotificationFactory
-
setNotificationFactory
-
toString
-