Interface Activity
public interface Activity
Representation of an activity.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe fields that represent the activity object in json form. -
Method Summary
Modifier and TypeMethodDescriptiongetAppId()Get a string specifying the application that this activity is associated with.getBody()Get a string specifying an optional expanded version of an activity.Get a string specifying the body template message ID in the gadget spec.Get an optional string ID generated by the posting application.getId()Get a string ID that is permanently associated with this activity.Get any photos, videos, or images that should be associated with the activity.Get the time at which this activity took place in milliseconds since the epoch.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.Get a string specifying the URL for the stream's favicon.Get a string specifying the stream's source URL.Get a string specifing the title of the stream.Get a string specifying the stream's URL.Get a map of custom key/value pairs associated with this activity.getTitle()Get a string specifying the primary text of an activity.Get a string specifying the title template message ID in the gadget spec.Get the last updated date of the Activity, additional to the Opensocial specification for the REST-API.getUrl()Get a string specifying the URL that represents this activity.Get a string ID of the user who this activity is for.voidSet a string specifying the application that this activity is associated with.voidSet a string specifying an optional expanded version of an activity.voidSet 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.voidSet 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.voidSet 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) .voidSet a string specifying the URL that represents this activity.voidGet a string ID of the user who this activity is for.
-
Method Details
-
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
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
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
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
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
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
. 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
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
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
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
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
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
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
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
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
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
Set a map of custom key/value pairs associated with this activity. The data has typeMap<String,. The object may be either a String or anObject> Person. 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
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: invalid input: '<'<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
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: invalid input: '<'<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
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
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.
-