public class PersistentNotification extends HashMap<String,String>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Field and Description |
---|---|
static String |
NOTIFICATION_KEY_APPLICATION |
static String |
NOTIFICATION_KEY_MESSAGE |
static String |
NOTIFICATION_KEY_TIMESTAMP |
static String |
NOTIFICATION_KEY_TITLE |
static String |
NOTIFICATION_KEY_USER_ID |
static String |
NOTIFICATION_KEY_UUID |
Constructor and Description |
---|
PersistentNotification(String application,
String title,
String message,
Long timestamp)
Constructs a Notification with the specified application name, title message, and timestamp.
|
PersistentNotification(String application,
String title,
String message,
Long timestamp,
String userId)
Constructs a Notification with the specified application name, title message, timestamp, and
user ID.
|
PersistentNotification(String application,
String title,
String message,
String timestamp)
Constructs a Notification with the specified application name, title message, and timestamp.
|
PersistentNotification(String application,
String title,
String message,
String timestamp,
String userId)
Constructs a Notification with the specified application name, title message, timestamp, and
user ID.
|
Modifier and Type | Method and Description |
---|---|
String |
getApplication()
Returns the name of the application that triggered the generation of the
Notification |
String |
getId()
Returns the unique ID of the
Notification |
String |
getMessage()
Returns the name of the message associated with the
Notification |
Long |
getTimestampLong()
Returns a
long depicting the time at which the event that triggered this Notification occurred. |
String |
getTimestampString()
Returns a
String depicting the time at which the event that triggered this Notification occurred. |
String |
getTitle()
Returns the name of the title of the
Notification |
String |
getUserId()
Returns the id of the user to whom this
Notification is addressed. |
void |
setApplication(String application)
Overwrites the name of the application that triggered the generation of the
Notification |
void |
setId(String id)
Overwrites the unique ID of the
Notification |
void |
setMessage(String message)
Overwrites the message associated with the
Notification |
void |
setTimestamp(Long timestamp)
Overwrites the timestamp that depicts the time at which the event that triggered the
Notification occurred. |
void |
setTimestamp(String timestampString)
Overwrites the timestamp that depicts the time at which the event that triggered the
Notification occurred. |
void |
setTitle(String title)
Overwrites the title of the
Notification |
void |
setUserId(String userId)
Overwrites the id of the user to whom the
Notification is addressed. |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode, toString
public static final String NOTIFICATION_KEY_UUID
public static final String NOTIFICATION_KEY_APPLICATION
public static final String NOTIFICATION_KEY_MESSAGE
public static final String NOTIFICATION_KEY_TIMESTAMP
public static final String NOTIFICATION_KEY_TITLE
public static final String NOTIFICATION_KEY_USER_ID
public PersistentNotification(String application, String title, String message, Long timestamp)
application
- The name of the application that triggered the generation of this Notification
title
- The title of this Notification
message
- The message associated with this Notification
timestamp
- A long
representing the number of milliseconds between January 1,
1970, 00:00:00 GMT and the point at which the event triggering this Notification
was generated.public PersistentNotification(String application, String title, String message, String timestamp)
application
- The name of the application that triggered the generation of this Notification
title
- The title of this Notification
message
- The message associated with this Notification
timestamp
- A String
representing the number of milliseconds between January 1,
1970, 00:00:00 GMT and the point at which the event triggering this Notification
was generated.public PersistentNotification(String application, String title, String message, Long timestamp, String userId)
application
- The name of the application that triggered the generation of this Notification
title
- The title of this Notification
message
- The message associated with this Notification
timestamp
- A long
representing the number of milliseconds between January 1,
1970, 00:00:00 GMT and the point at which the event triggering this Notification
was generated.userId
- The id of the user to which this Notification
should be sent.public PersistentNotification(String application, String title, String message, String timestamp, String userId)
application
- The name of the application that triggered the generation of this Notification
title
- The title of this Notification
message
- The message associated with this Notification
timestamp
- A String
representing the number of milliseconds between January 1,
1970, 00:00:00 GMT and the point at which the event triggering this Notification
was generated.userId
- The id of the user to which this Notification
should be sent.public String getId()
Notification
Notification
public void setId(String id)
Notification
id
- The new unique ID of the Notification
public String getApplication()
Notification
Notification
public void setApplication(String application)
Notification
application
- The new name of the application that triggered the generation of the Notification
public String getTitle()
Notification
Notification
public void setTitle(String title)
Notification
title
- The new title of the Notification
public String getMessage()
Notification
Notification
public void setMessage(String message)
Notification
message
- The new message associated with the Notification
public String getTimestampString()
String
depicting the time at which the event that triggered this Notification
occurred.String
representing the number of milliseconds between January 1, 1970,
00:00:00 GMT and the point at which the event that triggered this Notification
occurred.public Long getTimestampLong()
long
depicting the time at which the event that triggered this Notification
occurred.long
representing the number of milliseconds between January 1, 1970,
00:00:00 GMT and the point at which the event that triggered this Notification
occurred.public void setTimestamp(String timestampString)
Notification
occurred.timestampString
- A String
representing the number of milliseconds between January
1, 1970, 00:00:00 GMT and the point at which the event that triggered this Notification
occurred.public void setTimestamp(Long timestamp)
Notification
occurred.timestamp
- A long
representing the number of milliseconds between January 1,
1970, 00:00:00 GMT and the point at which the event that triggered this Notification
occurred.public String getUserId()
Notification
is addressed.Notification
is addressed.public void setUserId(String userId)
Notification
is addressed.userId
- The new userId to whom the Notification
should be addressed.This work is licensed under a Creative Commons Attribution 4.0 International License.