|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RestActivity
eXo Social Activity model based on OpenSocial Activity Spec 0.8.1: http://www.opensocial.org/Technical-Resources/opensocial-spec-v081/opensocial-reference#opensocial.Activity and org.exoplatform.social.core.activity.model.ExoSocialActivity class on eXo Social project.
| Nested Class Summary | |
|---|---|
static class |
RestActivity.Field
The fields that represent the activity object in json form. |
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary | |
|---|---|
static String |
DEFAULT_ACTIVITY_TYPE
|
static String |
DOC_ACTIVITY_TYPE
|
static String |
LINK_ACTIVITY_TYPE
|
| Method Summary | |
|---|---|
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 |
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 |
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. |
| Methods inherited from interface org.exoplatform.social.client.api.model.Model |
|---|
addPropertyChangeListener, addToListField, findPropertyChangeListeners, getField, getFieldAsList, getFieldAsMap, getFieldAsString, getFieldNames, hasField, isFieldMultikeyed, isFieldMultivalued, removePropertyChangeListener, setField |
| Methods inherited from interface java.util.Map |
|---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from interface org.json.simple.JSONAware |
|---|
toJSONString |
| Methods inherited from interface org.json.simple.JSONStreamAware |
|---|
writeJSONString |
| Field Detail |
|---|
static final String DOC_ACTIVITY_TYPE
static final String DEFAULT_ACTIVITY_TYPE
static final String LINK_ACTIVITY_TYPE
| Method Detail |
|---|
String getId()
void setId(String id)
id - a string ID that is permanently associated with this activity.String getTitle()
void setTitle(String title)
title - a string specifying the primary text of an activity.String getTitleId()
void setBody(String body)
body - String getBody()
void setTitleId(String titleId)
titleId - a string specifying the title template message ID in the gadget spec.String getAppId()
void setAppId(String appId)
appId - A string specifying the application that this activity is associated withString getType()
void setType(String type)
appId - A string specifying the application that this activity is associated withLong getPostedTime()
void setPostedTime(Long postedTime)
postedTime - the time at which this activity took place in milliseconds since the epochDouble getPriority()
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.Map<String,String> getTemplateParams()
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.String getIdentityId()
void setIdentityId(String identityId)
identityId - a string ID of the identity who created this activity.boolean isLiked()
RestIdentity getPosterIdentity()
throws SocialClientLibException
SocialClientLibExceptionList<RestComment> getAvailableComments()
getTotalComments()List<RestIdentity> getAvailableLikes()
getTotalLikes()void setAvailableComments(List<RestComment> restCommentList)
restCommentList - available comment listint getTotalNumberOfComments()
List<RestComment> getTotalComments()
throws SocialClientLibException
SocialClientLibExceptionint getTotalNumberOfLikes()
List<RestIdentity> getTotalLikes()
throws SocialClientLibException
SocialClientLibException
RestActivityStream getActivityStream()
throws SocialClientLibException
SocialClientLibExceptionString getTemplateParameter(String name)
name - name of template parameter whose value is to be returned
void addTemplateParameter(String name,
String value)
name - name of new template parameter to addvalue - value of template parameter to associate with passed name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||