public class NotificationEntry
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
The NotificationCategory
class contains all the entries for the same category title.
| Modifier and Type | Field and Description |
|---|---|
static int |
PRIORITY_UNSPECIFIED
The
priority field of a NotificationEntry will contain this value when
the priority is unspecified by the source. |
| Constructor and Description |
|---|
NotificationEntry() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Implements deep-copy clone.
|
java.util.List<NotificationAttribute> |
getAttributes()
Open-ended collection of notification metadata.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getAttributesMap()
Convenience method for obtaining the attributes in a more usable collection.
|
java.util.List<NotificationAction> |
getAvailableActions()
Open-ended collection of behaviors the user (recipient) can invoke upon
the notification.
|
java.lang.String |
getBody()
Optional body text for this notification.
|
java.util.Date |
getDueDate()
Optional date/time indicating by when the action described in this
notification must be completed.
|
java.lang.String |
getId() |
java.lang.String |
getImage()
Optional URL of an image file associated with this notification.
|
java.lang.String |
getLinkText()
Optional text of the anchor tag linking to
url. |
int |
getPriority()
Optional numeric representation of the relative importance of the
notification.
|
java.lang.String |
getSource()
Provides the human-readable name for the source of this notification.
|
java.util.Map<NotificationState,java.util.Date> |
getStates()
Open-ended Map of states that currently apply to this notification.
|
java.lang.String |
getTitle()
Required one-liner version of this notification.
|
java.lang.String |
getUrl()
Optional web address where the user can deal with or learn more about the
details of this notification.
|
void |
setAttributes(java.util.List<NotificationAttribute> attributes) |
void |
setAvailableActions(java.util.List<NotificationAction> availableActions) |
void |
setBody(java.lang.String body) |
void |
setDueDate(java.util.Date dueDate) |
void |
setId(java.lang.String id)
Sets the unique identifier for this notification.
|
void |
setImage(java.lang.String imageUrl) |
void |
setLinkText(java.lang.String linkText) |
void |
setPriority(int priority) |
void |
setSource(java.lang.String source) |
void |
setStates(java.util.Map<NotificationState,java.util.Date> states) |
void |
setTitle(java.lang.String title) |
void |
setUrl(java.lang.String url) |
java.lang.String |
toString() |
public static final int PRIORITY_UNSPECIFIED
priority field of a NotificationEntry will contain this value when
the priority is unspecified by the source.public java.lang.String getSource()
public void setSource(java.lang.String source)
public java.lang.String getId()
public void setId(java.lang.String id)
UUID.randomUUID() could be a good way to generate them.public java.lang.String getTitle()
public void setTitle(java.lang.String title)
public java.lang.String getUrl()
public void setUrl(java.lang.String url)
public java.lang.String getLinkText()
url.public void setLinkText(java.lang.String linkText)
public int getPriority()
public void setPriority(int priority)
public java.util.Date getDueDate()
public void setDueDate(java.util.Date dueDate)
public java.lang.String getImage()
public void setImage(java.lang.String imageUrl)
public java.lang.String getBody()
public void setBody(java.lang.String body)
public java.util.List<NotificationAttribute> getAttributes()
public void setAttributes(java.util.List<NotificationAttribute> attributes)
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAttributesMap()
public java.util.List<NotificationAction> getAvailableActions()
public void setAvailableActions(java.util.List<NotificationAction> availableActions)
public java.util.Map<NotificationState,java.util.Date> getStates()
null.public void setStates(java.util.Map<NotificationState,java.util.Date> states)
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - Not really, but it's on the method
signature we're overriding.public java.lang.String toString()
toString in class java.lang.Object