Package org.codice.ddf.notifications
Class Notification
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,String>
A
java.util.Map implementation that is used in concert with the OSGi Event Admin for
publishing notification Events- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNotification(String id, String sessionId, String application, String title, String message, Long timestamp) Constructs a Notification with the specified application name, title message, and timestamp.Notification(String id, String sessionId, String application, String title, String message, Long timestamp, String userId) Constructs a Notification with the specified application name, title message, timestamp, and user ID.Notification(String id, String sessionId, String application, String title, String message, Date timestamp) Constructs a Notification with the specified application name, title message, and timestamp.Notification(String id, String sessionId, String application, String title, String message, Date timestamp, String userId) Constructs a Notification with the specified application name, title message, timestamp, and user ID. -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the application that triggered the generation of theNotificationgetId()Returns the ID of theNotificationReturns the name of the message associated with theNotificationReturns the Session ID of theNotificationReturns aDatedepicting the time at which the event that triggered thisNotificationoccurred.Returns alongdepicting the time at which the event that triggered thisNotificationoccurred.Returns aStringdepicting the time at which the event that triggered thisNotificationoccurred.getTitle()Returns the name of the title of theNotificationReturns the id of the user to whom thisNotificationis addressed.voidsetApplication(String application) Overwrites the name of the application that triggered the generation of theNotificationvoidOverwrites the ID of theNotificationvoidsetMessage(String message) Overwrites the message associated with theNotificationvoidsetSessionId(String sessionId) Overwrites the Session ID of theNotificationvoidsetTimestamp(Long timestamp) Overwrites the timestamp that depicts the time at which the event that triggered theNotificationoccurred.voidsetTimestamp(Date timestamp) Overwrites the timestamp that depicts the time at which the event that triggered theNotificationoccurred.voidOverwrites the title of theNotificationvoidOverwrites the id of the user to whom theNotificationis addressed.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Field Details
-
NOTIFICATION_KEY_ID
- See Also:
-
NOTIFICATION_KEY_APPLICATION
- See Also:
-
NOTIFICATION_KEY_MESSAGE
- See Also:
-
NOTIFICATION_KEY_TIMESTAMP
- See Also:
-
NOTIFICATION_KEY_TITLE
- See Also:
-
NOTIFICATION_KEY_USER_ID
- See Also:
-
NOTIFICATION_KEY_SESSION_ID
- See Also:
-
NOTIFICATION_TOPIC_ROOT
- See Also:
-
NOTIFICATION_TOPIC_BROADCAST
- See Also:
-
NOTIFICATION_TOPIC_DOWNLOADS
- See Also:
-
NOTIFICATION_TOPIC_PUBLISH
- See Also:
-
-
Constructor Details
-
Notification
public Notification(String id, String sessionId, String application, String title, String message, Date timestamp) Constructs a Notification with the specified application name, title message, and timestamp.- Parameters:
id- The unique ID of thisNotificationsessionId- The new unique session ID of theNotificationapplication- The name of the application that triggered the generation of thisNotificationtitle- The title of thisNotificationmessage- The message associated with thisNotificationtimestamp- ADaterepresenting the point at which the event triggering thisNotificationwas generated.\
-
Notification
public Notification(String id, String sessionId, String application, String title, String message, Long timestamp) Constructs a Notification with the specified application name, title message, and timestamp.- Parameters:
id- The unique ID of thisNotificationsessionId- The new unique session ID of theNotificationapplication- The name of the application that triggered the generation of thisNotificationtitle- The title of thisNotificationmessage- The message associated with thisNotificationtimestamp- Alongrepresenting the number of milliseconds between January 1, 1970, 00:00:00 GMT and the point at which the event triggering thisNotificationwas generated.
-
Notification
public Notification(String id, String sessionId, String application, String title, String message, Long timestamp, String userId) Constructs a Notification with the specified application name, title message, timestamp, and user ID.- Parameters:
id- The unique ID of thisNotificationsessionId- The new unique session ID of theNotificationapplication- The name of the application that triggered the generation of thisNotificationtitle- The title of thisNotificationmessage- The message associated with thisNotificationtimestamp- Alongrepresenting the number of milliseconds between January 1, 1970, 00:00:00 GMT and the point at which the event triggering thisNotificationwas generated.userId- The id of the user to which thisNotificationshould be sent.
-
Notification
public Notification(String id, String sessionId, String application, String title, String message, Date timestamp, String userId) Constructs a Notification with the specified application name, title message, timestamp, and user ID.- Parameters:
id- The unique ID of thisNotificationsessionId- The new unique session ID of theNotificationapplication- The name of the application that triggered the generation of thisNotificationtitle- The title of thisNotificationmessage- The message associated with thisNotificationtimestamp- ADaterepresenting the point at which the event triggering thisNotificationwas generated.\userId- The id of the user to which thisNotificationshould be sent.
-
-
Method Details
-
getId
Returns the ID of theNotification- Returns:
- The ID of the
Notification
-
setId
Overwrites the ID of theNotification- Parameters:
id- The new unique ID of theNotification
-
getSessionId
Returns the Session ID of theNotification- Returns:
- The Session ID of the
Notification
-
setSessionId
Overwrites the Session ID of theNotification- Parameters:
sessionId- The new unique session ID of theNotification
-
getApplication
Returns the name of the application that triggered the generation of theNotification- Returns:
- The name of the application that triggered the generation of the
Notification
-
setApplication
Overwrites the name of the application that triggered the generation of theNotification- Parameters:
application- The new name of the application that triggered the generation of theNotification
-
getTitle
Returns the name of the title of theNotification- Returns:
- The title of the
Notification
-
setTitle
Overwrites the title of theNotification- Parameters:
title- The new title of theNotification
-
getMessage
Returns the name of the message associated with theNotification- Returns:
- The message associated with the
Notification
-
setMessage
Overwrites the message associated with theNotification- Parameters:
message- The new message associated with theNotification
-
getTimestampString
Returns aStringdepicting the time at which the event that triggered thisNotificationoccurred.- Returns:
- A
Stringrepresenting the number of milliseconds between January 1, 1970, 00:00:00 GMT and the point at which the event that triggered thisNotificationoccurred.
-
getTimestampLong
Returns alongdepicting the time at which the event that triggered thisNotificationoccurred.- Returns:
- A
longrepresenting the number of milliseconds between January 1, 1970, 00:00:00 GMT and the point at which the event that triggered thisNotificationoccurred.
-
getTimestamp
Returns aDatedepicting the time at which the event that triggered thisNotificationoccurred.- Returns:
- A
Datethe point at which the event that triggered thisNotificationoccurred.
-
setTimestamp
Overwrites the timestamp that depicts the time at which the event that triggered theNotificationoccurred.- Parameters:
timestamp- Alongrepresenting the number of milliseconds between January 1, 1970, 00:00:00 GMT and the point at which the event that triggered thisNotificationoccurred.
-
setTimestamp
Overwrites the timestamp that depicts the time at which the event that triggered theNotificationoccurred.- Parameters:
timestamp- ADaterepresenting the point at which the event that triggered thisNotificationoccurred.
-
getUserId
Returns the id of the user to whom thisNotificationis addressed.- Returns:
- The id of the user to whom this
Notificationis addressed.
-
setUserId
Overwrites the id of the user to whom theNotificationis addressed.- Parameters:
userId- The new userId to whom theNotificationshould be addressed.
-