Class Notification


  • public class Notification
    extends IdentifiableResource
    A notification on SRC for an authenticated User.

    This class is immutable and thread-safe.
    • Method Detail

      • getCreationTime

        public Instant getCreationTime()
        Gets the time that the notification was created.
        Returns:
        an Instant with the time of notification creation
      • getStatus

        public NotificationStatus getStatus()
        Gets the current status of the notification.
        Returns:
        a NotificationStatus
      • getNotificationText

        public String getNotificationText()
        Gets the text of the notification.
        Returns:
        a String with the text
      • getItemLink

        public Link getItemLink()
        Gets a link with the type of notification and URL of the relevant page.

        Link.getRelation() will be one of:
        • "post" - Forum post created, a user liked a forum post, or a user commented on a run
        • "run" - New run for verification, a run status changed, or a user beat WR
        • "game" - Game request approved or denied
        • "guide" - Guide posted or updated
        • "thread" - Created new forum thread
        • An empty Optional - News post created (possibly other scenarios)
        Returns:
        a Link for the relevant page