Interface Activity
-
public interface ActivityRepresentation of an activity.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classActivity.FieldThe fields that represent the activity object in json form.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetAppId()Get a string specifying the application that this activity is associated with.StringgetBody()Get a string specifying an optional expanded version of an activity.StringgetBodyId()Get a string specifying the body template message ID in the gadget spec.StringgetExternalId()Get an optional string ID generated by the posting application.StringgetId()Get a string ID that is permanently associated with this activity.List<MediaItem>getMediaItems()Get any photos, videos, or images that should be associated with the activity.LonggetPostedTime()Get the time at which this activity took place in milliseconds since the epoch.FloatgetPriority()Get the priority, a number between 0 and 1 representing the relative priority of this activity in relation to other activities from the same source.StringgetStreamFaviconUrl()Get a string specifying the URL for the stream's favicon.StringgetStreamSourceUrl()Get a string specifying the stream's source URL.StringgetStreamTitle()Get a string specifing the title of the stream.StringgetStreamUrl()Get a string specifying the stream's URL.Map<String,String>getTemplateParams()Get a map of custom key/value pairs associated with this activity.StringgetTitle()Get a string specifying the primary text of an activity.StringgetTitleId()Get a string specifying the title template message ID in the gadget spec.DategetUpdated()Get the last updated date of the Activity, additional to the Opensocial specification for the REST-API.StringgetUrl()Get a string specifying the URL that represents this activity.StringgetUserId()Get a string ID of the user who this activity is for.voidsetAppId(String appId)Set a string specifying the application that this activity is associated with.voidsetBody(String body)Set a string specifying an optional expanded version of an activity.voidsetBodyId(String bodyId)Set a string specifying the body template message ID in the gadget spec.voidsetExternalId(String externalId)Set an optional string ID generated by the posting application.voidsetId(String id)Set a string ID that is permanently associated with this activity.voidsetMediaItems(List<MediaItem> mediaItems)Set any photos, videos, or images that should be associated with the activity.voidsetPostedTime(Long postedTime)Set the time at which this activity took place in milliseconds since the epoch Container support for this field is OPTIONAL.voidsetPriority(Float priority)Set the priority, a number between 0 and 1 representing the relative priority of this activity in relation to other activities from the same source.voidsetStreamFaviconUrl(String streamFaviconUrl)Set a string specifying the URL for the stream's favicon.voidsetStreamSourceUrl(String streamSourceUrl)Set a string specifying the stream's source URL.voidsetStreamTitle(String streamTitle)Set a string specifing the title of the stream.voidsetStreamUrl(String streamUrl)Set a string specifying the stream's URL.voidsetTemplateParams(Map<String,String> templateParams)Set a map of custom key/value pairs associated with this activity.voidsetTitle(String title)Set a string specifying the primary text of an activity.voidsetTitleId(String titleId)Set a string specifying the title template message ID in the gadget spec.voidsetUpdated(Date updated).voidsetUrl(String url)Set a string specifying the URL that represents this activity.voidsetUserId(String userId)Get a string ID of the user who this activity is for.
-
-
-
Method Detail
-
getAppId
String getAppId()
Get a string specifying the application that this activity is associated with. Container support for this field is REQUIRED.- Returns:
- A string specifying the application that this activity is associated with
-
setAppId
void setAppId(String appId)
Set a string specifying the application that this activity is associated with. Container support for this field is REQUIRED.- Parameters:
appId- A string specifying the application that this activity is associated with
-
getBody
String getBody()
Get a string specifying an optional expanded version of an activity. Container support for this field is OPTIONAL.- Returns:
- a string specifying an optional expanded version of an activity.
-
setBody
void setBody(String body)
Set a string specifying an optional expanded version of an activity. Container support for this field is OPTIONAL. Bodies may only have the following HTML tags:<b> <i>, <a>, <span>. The container may ignore this formatting when rendering the activity.- Parameters:
body- a string specifying an optional expanded version of an activity.
-
getBodyId
String getBodyId()
Get a string specifying the body template message ID in the gadget spec. Container support for this field is OPTIONAL. Bodies may only have the following HTML tags: <b> <i>, <a>, <span>. The container may ignore this formatting when rendering the activity.- Returns:
- a string specifying the body template message ID in the gadget spec.
-
setBodyId
void setBodyId(String bodyId)
Set a string specifying the body template message ID in the gadget spec. Container support for this field is OPTIONAL.- Parameters:
bodyId- a string specifying the body template message ID in the gadget spec.
-
getExternalId
String getExternalId()
Get an optional string ID generated by the posting application. Container support for this field is OPTIONAL.- Returns:
- An optional string ID generated by the posting application.
-
setExternalId
void setExternalId(String externalId)
Set an optional string ID generated by the posting application. Container support for this field is OPTIONAL.- Parameters:
externalId- An optional string ID generated by the posting application.
-
getId
String getId()
Get a string ID that is permanently associated with this activity. Container support for this field is OPTIONAL.- Returns:
- a string ID that is permanently associated with this activity.
-
setId
void setId(String id)
Set a string ID that is permanently associated with this activity. Container support for this field is OPTIONAL.- Parameters:
id- a string ID that is permanently associated with this activity.
-
getUpdated
Date getUpdated()
Get the last updated date of the Activity, additional to the Opensocial specification for the REST-API. Container support for this field is OPTIONAL.- Returns:
- the last updated date
-
setUpdated
void setUpdated(Date updated)
. Set the last updated date of the Activity, additional to the Opensocial specification for the REST-API. Container support for this field is OPTIONAL.- Parameters:
updated- the last updated date
-
getMediaItems
List<MediaItem> getMediaItems()
Get any photos, videos, or images that should be associated with the activity. Container support for this field is OPTIONAL.- Returns:
- A List of
MediaItemcontaining any photos, videos, or images that should be associated with the activity.
-
setMediaItems
void setMediaItems(List<MediaItem> mediaItems)
Set any photos, videos, or images that should be associated with the activity. Container support for this field is OPTIONAL. Higher priority ones are higher in the list.- Parameters:
mediaItems- a list ofMediaItemto be associated with the activity
-
getPostedTime
Long getPostedTime()
Get the time at which this activity took place in milliseconds since the epoch. Container support for this field is OPTIONAL. Higher priority ones are higher in the list.- Returns:
- The time at which this activity took place in milliseconds since the epoch
-
setPostedTime
void setPostedTime(Long postedTime)
Set the time at which this activity took place in milliseconds since the epoch Container support for this field is OPTIONAL. This value can not be set by the end user.- Parameters:
postedTime- the time at which this activity took place in milliseconds since the epoch
-
getPriority
Float getPriority()
Get the priority, a number between 0 and 1 representing the relative priority of this activity in relation to other activities from the same source. Container support for this field is OPTIONAL.- Returns:
- a number between 0 and 1 representing the relative priority of this activity in relation to other activities from the same source
-
setPriority
void setPriority(Float priority)
Set the priority, a number between 0 and 1 representing the relative priority of this activity in relation to other activities from the same source. Container support for this field is OPTIONAL.- Parameters:
priority- a number between 0 and 1 representing the relative priority of this activity in relation to other activities from the same source.
-
getStreamFaviconUrl
String getStreamFaviconUrl()
Get a string specifying the URL for the stream's favicon. Container support for this field is OPTIONAL.- Returns:
- a string specifying the URL for the stream's favicon.
-
setStreamFaviconUrl
void setStreamFaviconUrl(String streamFaviconUrl)
Set a string specifying the URL for the stream's favicon. Container support for this field is OPTIONAL.- Parameters:
streamFaviconUrl- a string specifying the URL for the stream's favicon.
-
getStreamSourceUrl
String getStreamSourceUrl()
Get a string specifying the stream's source URL. Container support for this field is OPTIONAL.- Returns:
- a string specifying the stream's source URL.
-
setStreamSourceUrl
void setStreamSourceUrl(String streamSourceUrl)
Set a string specifying the stream's source URL. Container support for this field is OPTIONAL.- Parameters:
streamSourceUrl- a string specifying the stream's source URL.
-
getStreamTitle
String getStreamTitle()
Get a string specifing the title of the stream. Container support for this field is OPTIONAL.- Returns:
- a string specifing the title of the stream.
-
setStreamTitle
void setStreamTitle(String streamTitle)
Set a string specifing the title of the stream. Container support for this field is OPTIONAL.- Parameters:
streamTitle- a string specifing the title of the stream.
-
getStreamUrl
String getStreamUrl()
Get a string specifying the stream's URL. Container support for this field is OPTIONAL.- Returns:
- a string specifying the stream's URL.
-
setStreamUrl
void setStreamUrl(String streamUrl)
Set a string specifying the stream's URL. Container support for this field is OPTIONAL.- Parameters:
streamUrl- a string specifying the stream's URL.
-
getTemplateParams
Map<String,String> getTemplateParams()
Get a map of custom key/value pairs associated with this activity. Container support for this field is OPTIONAL.- Returns:
- a map of custom key/value pairs associated with this activity.
-
setTemplateParams
void setTemplateParams(Map<String,String> templateParams)
Set a map of custom key/value pairs associated with this activity. The data has typeMap. The object may be either a String or anPerson. When passing in a person with key PersonKey, can use the following replacement variables in the template:- PersonKey.DisplayName - Display name for the person
- PersonKey.ProfileUrl. URL of the person's profile
- PersonKey.Id - The ID of the person
- PersonKey - Container may replace with DisplayName, but may also optionally link to the user.
- Parameters:
templateParams- a map of custom key/value pairs associated with this activity.
-
getTitle
String getTitle()
Get a string specifying the primary text of an activity. Container support for this field is REQUIRED. Titles may only have the following HTML tags: <b> <i>, <a>, <span>. The container may ignore this formatting when rendering the activity.- Returns:
- a string specifying the primary text of an activity.
-
setTitle
void setTitle(String title)
Set a string specifying the primary text of an activity. Container support for this field is REQUIRED. Titles may only have the following HTML tags: <b> <i>, <a>, <span>. The container may ignore this formatting when rendering the activity.- Parameters:
title- a string specifying the primary text of an activity.
-
getTitleId
String getTitleId()
Get a string specifying the title template message ID in the gadget spec. Container support for this field is REQUIRED. The title is the primary text of an activity. Titles may only have the following HTML tags: <<b> <i>, <a>, <span>. The container may ignore this formatting when rendering the activity.- Returns:
- a string specifying the title template message ID in the gadget spec.
-
setTitleId
void setTitleId(String titleId)
Set a string specifying the title template message ID in the gadget spec. Container support for this field is REQUIRED. The title is the primary text of an activity. Titles may only have the following HTML tags: <<b> <i>, <a>, <span>. The container may ignore this formatting when rendering the activity.- Parameters:
titleId- a string specifying the title template message ID in the gadget spec.
-
getUrl
String getUrl()
Get a string specifying the URL that represents this activity. Container support for this field is OPTIONAL.- Returns:
- a string specifying the URL that represents this activity.
-
setUrl
void setUrl(String url)
Set a string specifying the URL that represents this activity. Container support for this field is OPTIONAL.- Parameters:
url- a string specifying the URL that represents this activity.
-
getUserId
String getUserId()
Get a string ID of the user who this activity is for. Container support for this field is OPTIONAL.- Returns:
- a string ID of the user who this activity is for.
-
setUserId
void setUserId(String userId)
Get a string ID of the user who this activity is for. Container support for this field is OPTIONAL.- Parameters:
userId- a string ID of the user who this activity is for.
-
-