public class RestActivity extends Model
| Modifier and Type | Class and Description |
|---|---|
static class |
RestActivity.Field
The fields that represent the activity object in json form.
|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_ACTIVITY_TYPE |
static String |
DOC_ACTIVITY_TYPE |
static String |
LINK_ACTIVITY_TYPE |
static String |
SPACE_DEFAULT_ACTIVITY_TYPE |
static String |
SPACE_DOC_ACTIVITY_TYPE |
static String |
SPACE_LINK_ACTIVITY_TYPE |
propertyChanges| Constructor and Description |
|---|
RestActivity()
Constructor without any params.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTemplateParameter(String name,
String value)
Adds a new template parameter with the specified name and value.
|
RestActivityStream |
getActivityStream()
Gets activity stream.
|
String |
getAppId()
Gets a string specifying the application that this activity is associated
with.
|
List<RestComment> |
getAvailableComments()
Gets the available list of comments for this activity.
|
List<RestIdentity> |
getAvailableLikes()
Gets the available list of likes for this activity.
|
String |
getBody()
gets the body fields of Activity, this field is optional and use to storage
the extended attribute of activity.
|
String |
getId()
Gets a string ID that is permanently associated with this activity.
|
String |
getIdentityId()
Gets a string uuid of the identity who created this activity.
|
Long |
getLastUpdated()
Gets the time at which this activity took place in milliseconds since the
epoch.
|
Long |
getPostedTime()
Gets the time at which this activity took place in milliseconds since the
epoch.
|
RestIdentity |
getPosterIdentity()
Gets the poster identity who created this activity.
|
Double |
getPriority()
Gets the priority, a number between 0 and 1 representing the relative
priority of this activity in relation to other activities from the same
source.
|
String |
getTemplateParameter(String name)
Returns the template parameter with the specified name.
|
Map<String,String> |
getTemplateParams()
Gets a map of custom key/value pairs associated with this activity.
|
String |
getTitle()
Gets a string specifying the primary text of an activity.
|
String |
getTitleId()
Gets a string specifying the title template message ID in the gadget spec.
|
List<RestComment> |
getTotalComments()
Gets the total number of comments.
|
List<RestIdentity> |
getTotalLikes()
Gets the total number of likes.
|
int |
getTotalNumberOfComments()
Gets the number of total comments.
|
int |
getTotalNumberOfLikes()
Gets the number of total likes.
|
String |
getType()
Gets a string specifying the type of activity.
|
boolean |
isLiked()
Checks if this activity is liked by current user.
|
void |
setAppId(String appId)
Sets a string specifying the application that this activity is associated
with.
|
void |
setAvailableComments(List<RestComment> restCommentList)
Sets the available list of comments for this activity.
|
void |
setBody(String body)
Sets the body fields of Activity, this field is optional and use to storage
the extended attribute of activity.
|
void |
setId(String id)
Sets a string ID that is permanently associated with this activity.
|
void |
setIdentityId(String identityId)
Sets a string uuid of the identity who created this activity.
|
void |
setLastUpdated(Long lastUpdated)
Sets the last updated time at which this activity took place in
milliseconds since the epoch Container support for this field is OPTIONAL.
|
void |
setPostedTime(Long postedTime)
Sets the time at which this activity took place in milliseconds since the
epoch Container support for this field is OPTIONAL.
|
void |
setPriority(Double priority)
Sets the priority, a number between 0 and 1 representing the relative
priority of this activity in relation to other activities from the same
source.
|
void |
setTemplateParams(Map<String,String> templateParams)
Set a map of custom key/value pairs associated with this activity.
|
void |
setTitle(String title)
Sets a string specifying the primary text of an activity.
|
void |
setTitleId(String titleId)
Sets a string specifying the title template message ID in the gadget spec.
|
void |
setType(String type)
Sets a string specifying the type of activity.
|
addPropertyChangeListener, addToListField, findPropertyChangeListeners, getField, getFieldAsList, getFieldAsMap, getFieldAsString, getFieldNames, hasField, isFieldMultikeyed, isFieldMultivalued, removePropertyChangeListener, setFieldescape, toJSONString, toJSONString, toString, toString, writeJSONString, writeJSONStringclear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, valuesequals, hashCodefinalize, getClass, notify, notifyAll, wait, wait, waitpublic static final String DOC_ACTIVITY_TYPE
public static final String SPACE_DOC_ACTIVITY_TYPE
public static final String DEFAULT_ACTIVITY_TYPE
public static final String SPACE_DEFAULT_ACTIVITY_TYPE
public static final String LINK_ACTIVITY_TYPE
public static final String SPACE_LINK_ACTIVITY_TYPE
public String getId()
public void setId(String id)
id - a string ID that is permanently associated with this activity.public String getTitle()
public void setTitle(String title)
title - a string specifying the primary text of an activity.public String getTitleId()
public void setBody(String body)
body - public String getBody()
public void setTitleId(String titleId)
titleId - a string specifying the title template message ID in the
gadget spec.public String getAppId()
public void setAppId(String appId)
appId - A string specifying the application that this activity is
associated withpublic String getType()
public void setType(String type)
appId - A string specifying the application that this activity is
associated withpublic Long getPostedTime()
public Long getLastUpdated()
public void setPostedTime(Long postedTime)
postedTime - the time at which this activity took place in
milliseconds since the epochpublic void setLastUpdated(Long lastUpdated)
lastUpdated - the time at which this activity took place in
milliseconds since the epochpublic Double getPriority()
public void setPriority(Double priority)
priority - a number between 0 and 1 representing the relative priority
of this activity in relation to other activities from the same
source.public Map<String,String> getTemplateParams()
public void setTemplateParams(Map<String,String> templateParams)
Map. The object may be either a String or
a Person. When passing in a person with key PersonKey, can use the
following replacement variables in the template:
templateParams - a map of custom key/value pairs associated with this
activity.public String getIdentityId()
public void setIdentityId(String identityId)
identityId - a string ID of the identity who created this activity.public boolean isLiked()
public RestIdentity getPosterIdentity() throws SocialClientLibException
SocialClientLibExceptionpublic List<RestComment> getAvailableComments()
getTotalComments()public List<RestIdentity> getAvailableLikes()
getTotalLikes()public void setAvailableComments(List<RestComment> restCommentList)
restCommentList - available comment listpublic int getTotalNumberOfComments()
public List<RestComment> getTotalComments() throws SocialClientLibException
SocialClientLibExceptionpublic int getTotalNumberOfLikes()
public List<RestIdentity> getTotalLikes() throws SocialClientLibException
SocialClientLibExceptionpublic RestActivityStream getActivityStream() throws SocialClientLibException
SocialClientLibExceptionpublic String getTemplateParameter(String name)
name - name of template parameter whose value is to be returnedCopyright © 2011–2015 eXo Platform SAS. All rights reserved.