|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap
org.json.simple.JSONObject
org.exoplatform.social.client.core.model.ModelImpl
org.exoplatform.social.client.core.model.RestActivityImpl
public class RestActivityImpl
Implementation of RestActivity.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
| Nested classes/interfaces inherited from interface org.exoplatform.social.client.api.model.RestActivity |
|---|
RestActivity.Field |
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary |
|---|
| Fields inherited from class org.exoplatform.social.client.core.model.ModelImpl |
|---|
propertyChanges |
| Fields inherited from interface org.exoplatform.social.client.api.model.RestActivity |
|---|
DEFAULT_ACTIVITY_TYPE, DOC_ACTIVITY_TYPE, LINK_ACTIVITY_TYPE |
| Constructor Summary | |
|---|---|
RestActivityImpl()
Constructor without any params. |
|
| 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 title)
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 class org.exoplatform.social.client.core.model.ModelImpl |
|---|
addPropertyChangeListener, addToListField, findPropertyChangeListeners, getField, getFieldAsList, getFieldAsMap, getFieldAsString, getFieldNames, hasField, isFieldMultikeyed, isFieldMultivalued, removePropertyChangeListener, setField |
| Methods inherited from class org.json.simple.JSONObject |
|---|
escape, toJSONString, toJSONString, toString, toString, writeJSONString, writeJSONString |
| Methods inherited from class java.util.HashMap |
|---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| 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 |
| Constructor Detail |
|---|
public RestActivityImpl()
| Method Detail |
|---|
public String getId()
getId in interface RestActivitypublic void setId(String id)
setId in interface RestActivityid - a string ID that is permanently associated with this activity.public String getTitle()
getTitle in interface RestActivitypublic void setBody(String title)
setBody in interface RestActivitypublic String getBody()
getBody in interface RestActivitypublic void setTitle(String title)
setTitle in interface RestActivitytitle - a string specifying the primary text of an activity.public String getTitleId()
getTitleId in interface RestActivitypublic void setTitleId(String titleId)
setTitleId in interface RestActivitytitleId - a string specifying the title template message ID in the gadget spec.public String getAppId()
getAppId in interface RestActivitypublic void setAppId(String appId)
setAppId in interface RestActivityappId - A string specifying the application that this activity is associated withpublic String getType()
getType in interface RestActivitypublic void setType(String type)
setType in interface RestActivitypublic Long getPostedTime()
getPostedTime in interface RestActivitypublic void setPostedTime(Long postedTime)
setPostedTime in interface RestActivitypostedTime - the time at which this activity took place in milliseconds since the epochpublic Double getPriority()
getPriority in interface RestActivitypublic void setPriority(Double priority)
setPriority in interface RestActivitypriority - 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()
getTemplateParams in interface RestActivitypublic 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:
setTemplateParams in interface RestActivitytemplateParams - a map of custom key/value pairs associated with this activity.public String getIdentityId()
getIdentityId in interface RestActivitypublic void setIdentityId(String identityId)
setIdentityId in interface RestActivityidentityId - a string ID of the identity who created this activity.public boolean isLiked()
isLiked in interface RestActivity
public RestIdentity getPosterIdentity()
throws SocialClientLibException
getPosterIdentity in interface RestActivitySocialClientLibExceptionpublic List<RestComment> getAvailableComments()
getAvailableComments in interface RestActivityRestActivity.getTotalComments()public void setAvailableComments(List<RestComment> restCommentList)
setAvailableComments in interface RestActivityrestCommentList - available comment listpublic int getTotalNumberOfComments()
getTotalNumberOfComments in interface RestActivity
public List<RestComment> getTotalComments()
throws SocialClientLibException
getTotalComments in interface RestActivitySocialClientLibException
public RestActivityStream getActivityStream()
throws SocialClientLibException
getActivityStream in interface RestActivitySocialClientLibExceptionpublic String getTemplateParameter(String name)
getTemplateParameter in interface RestActivityname - name of template parameter whose value is to be returned
public void addTemplateParameter(String name,
String value)
addTemplateParameter in interface RestActivityname - name of new template parameter to addvalue - value of template parameter to associate with passed namepublic int getTotalNumberOfLikes()
RestActivity
getTotalNumberOfLikes in interface RestActivity
public List<RestIdentity> getTotalLikes()
throws SocialClientLibException
RestActivity
getTotalLikes in interface RestActivitySocialClientLibExceptionpublic List<RestIdentity> getAvailableLikes()
RestActivity
getAvailableLikes in interface RestActivityRestActivity.getTotalLikes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||