Class Notification

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,String>
org.codice.ddf.notifications.Notification
All Implemented Interfaces:
Serializable, Cloneable, Map<String,String>

public class Notification extends HashMap<String,String>
A java.util.Map implementation that is used in concert with the OSGi Event Admin for publishing notification Events
See Also:
  • Field Details

  • 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 this Notification
      sessionId - The new unique session ID of the Notification
      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 Date representing the point at which the event triggering this Notification was 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 this Notification
      sessionId - The new unique session ID of the Notification
      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.
    • 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 this Notification
      sessionId - The new unique session ID of the Notification
      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.
    • 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 this Notification
      sessionId - The new unique session ID of the Notification
      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 Date representing the point at which the event triggering this Notification was generated.\
      userId - The id of the user to which this Notification should be sent.
  • Method Details

    • getId

      public String getId()
      Returns the ID of the Notification
      Returns:
      The ID of the Notification
    • setId

      public void setId(String id)
      Overwrites the ID of the Notification
      Parameters:
      id - The new unique ID of the Notification
    • getSessionId

      public String getSessionId()
      Returns the Session ID of the Notification
      Returns:
      The Session ID of the Notification
    • setSessionId

      public void setSessionId(String sessionId)
      Overwrites the Session ID of the Notification
      Parameters:
      sessionId - The new unique session ID of the Notification
    • getApplication

      public String getApplication()
      Returns the name of the application that triggered the generation of the Notification
      Returns:
      The name of the application that triggered the generation of the Notification
    • setApplication

      public void setApplication(String application)
      Overwrites the name of the application that triggered the generation of the Notification
      Parameters:
      application - The new name of the application that triggered the generation of the Notification
    • getTitle

      public String getTitle()
      Returns the name of the title of the Notification
      Returns:
      The title of the Notification
    • setTitle

      public void setTitle(String title)
      Overwrites the title of the Notification
      Parameters:
      title - The new title of the Notification
    • getMessage

      public String getMessage()
      Returns the name of the message associated with the Notification
      Returns:
      The message associated with the Notification
    • setMessage

      public void setMessage(String message)
      Overwrites the message associated with the Notification
      Parameters:
      message - The new message associated with the Notification
    • getTimestampString

      public String getTimestampString()
      Returns a String depicting the time at which the event that triggered this Notification occurred.
      Returns:
      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.
    • getTimestampLong

      public Long getTimestampLong()
      Returns a long depicting the time at which the event that triggered this Notification occurred.
      Returns:
      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.
    • getTimestamp

      public Date getTimestamp()
      Returns a Date depicting the time at which the event that triggered this Notification occurred.
      Returns:
      A Date the point at which the event that triggered this Notification occurred.
    • setTimestamp

      public void setTimestamp(Long timestamp)
      Overwrites the timestamp that depicts the time at which the event that triggered the Notification occurred.
      Parameters:
      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.
    • setTimestamp

      public void setTimestamp(Date timestamp)
      Overwrites the timestamp that depicts the time at which the event that triggered the Notification occurred.
      Parameters:
      timestamp - A Date representing the point at which the event that triggered this Notification occurred.
    • getUserId

      public String getUserId()
      Returns the id of the user to whom this Notification is addressed.
      Returns:
      The id of the user to whom this Notification is addressed.
    • setUserId

      public void setUserId(String userId)
      Overwrites the id of the user to whom the Notification is addressed.
      Parameters:
      userId - The new userId to whom the Notification should be addressed.