Package com.treescrub.spedran.data
Class Notification
- java.lang.Object
-
- com.treescrub.spedran.data.Resource
-
- com.treescrub.spedran.data.IdentifiableResource
-
- com.treescrub.spedran.data.Notification
-
public class Notification extends IdentifiableResource
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstantgetCreationTime()Gets the time that the notification was created.LinkgetItemLink()Gets a link with the type of notification and URL of the relevant page.StringgetNotificationText()Gets the text of the notification.NotificationStatusgetStatus()Gets the current status of the notification.-
Methods inherited from class com.treescrub.spedran.data.IdentifiableResource
equals, getId, hashCode
-
-
-
-
Method Detail
-
getCreationTime
public Instant getCreationTime()
Gets the time that the notification was created.- Returns:
- an
Instantwith 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
Stringwith 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
Linkfor the relevant page
-
-