public class Notification extends Model
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
Notification() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMediaItem(MediaItem item)
Adds the passed media item to the list of media items (i.e. images) to
post with the notification.
|
void |
addRecipient(String id)
Adds the specified user to the list of users that will receive the
notification.
|
void |
setContent(String content)
Sets the notification's content as a template parameter; the passed string
can contain tokens such as ${recipient} which are substituted for
appropriate values when the content is rendered.
|
addTemplateParameter, addToListField, getField, getFieldAsList, getFieldAsMap, getFieldAsString, getFieldNames, getTemplateParameter, hasField, isFieldMultikeyed, isFieldMultivalued, setFieldescape, toJSONString, toJSONString, toString, toString, writeJSONString, writeJSONStringclear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, valuesequals, hashCodepublic void setContent(String content)
content - content to set; can contain template "tokens" of the form
${token}, the values of which are substituted when the
content block is renderedpublic void addRecipient(String id)
id - OpenSocial ID of user to receive notificationpublic void addMediaItem(MediaItem item)
item - media item, i.e. image, to post with the notificationCopyright © 2012. All Rights Reserved.