JBoss.orgCommunity Documentation
Method | Param | Return | Description |
---|---|---|---|
saveActivity(Identity owner, ExoSocialActivity activity) throws ActivityStorageException |
owner - the owner of activity stream, activity - the activity which needs to be saved | ExoSocialActivity | Save an activity to the stream of an owner. Note that the Activity.userId will be set to the owner's identity if it has not been already set. |
getActivity(String activityId) throws ActivityStorageException |
activityId - the id of activity | ExoSocialActivity | Get an activity by its id. |
deleteActivity(String activityId) throws ActivityStorageException |
activityId - the id of activity | void | Delete an activity by its id. |
deleteActivity(ExoSocialActivity activity) throws ActivityStorageException |
activity | void | Delete a stored activity (id != null). (Since 1.1.1). |
deleteComment(String activityId, String commentId) throws ActivityStorageException |
activityId - the id of activity, commentId - the id of comment | void | Delete a comment by its id. |
getActivities(Identity identity) throws ActivityStorageException |
identity | List<ExoSocialActivity> | Get the latest activities by an identity with the default limit of 20 latest activities. |
getActivities(Identity identity, long start, long limit) throws ActivityStorageException |
identity , start , limit | List<ExoSocialActivity> | Get the latest activities by an identity, specifying start that is an offset index and limit. |
getActivitiesOfConnections(Identity ownerIdentity) throws ActivityStorageException | ownerIdentity | List<ExoSocialActivity> | Get activities of connections from an identity. The activities are returned as a list that is sorted descending by activity posted time. (Since 1.1.1). |
getActivitiesOfConnections(Identity ownerIdentity, int offset, int limit) throws ActivityStorageException; | ownerIdentity, offset, limit | List<ExoSocialActivity> | Get the activities of connections from an identity by specifying offset and limit. The activities are returned as a list that is sorted starting from the most recent activity.(Since 1.2.0-GA). |
getActivitiesOfUserSpaces(Identity ownerIdentity) | ownerIdentity | List<ExoSocialActivity> | Get the activities from all spaces of a user. By default, the activity list is composed of all spaces' activities. Each activity list of the space contains maximum 20 activities and are sorted by time. (Since 1.1.1). |
getActivityFeed(Identity identity) throws ActivityStorageException | identity | List<ExoSocialActivity> | Get the activity feed of an identity. This feed is the combination of all the activities of his own activities, his connections' activities and spaces' activities which are returned as a list that is sorted starting from the most recent activity.(Since 1.1.2). |
saveActivity(ExoSocialActivity activity) throws ActivityStorageException | activity - the activity to save | ExoSocialActivity | Save an activity into the stream for the activity's userId. The userId must be set and this field is used to indicate the owner stream. |
saveComment(ExoSocialActivity activity, ExoSocialActivity comment) throws ActivityStorageException | activity, comment | void | Save a new comment or updates an existing comment that is an instance of activity with mandatory fields: userId, title. |
saveLike(ExoSocialActivity activity, Identity identity) throws ActivityStorageException | activity, identity | void | Save an identity who likes an activity. |
removeLike(ExoSocialActivity activity, Identity identity) throws ActivityStorageException | activity , identity - a user who dislikes an activity | void | Remove an identity who likes an activity, if this activity is liked, it will be removed. |
getComments(ExoSocialActivity activity) throws ActivityStorageException | activity | List<ExoSocialActivity> | Get the comment list of an activity. |
recordActivity(Identity owner, String type, String title) throws ActivityStorageException | owner, type, title | ExoSocialActivity | Record an activity. (Since 1.2.0-GA). |
recordActivity(Identity owner, ExoSocialActivity activity) throws Exception | owner, activity | ExoSocialActivity | Save an activity. You should use ActivityManager#saveActivity(org.exoplatform.social.core.identity.model.Identity, org.exoplatform.social.core.activity.model.ExoSocialActivity) instead. It will be removed in Social 1.3.x. |
recordActivity(Identity owner, String type, String title, String body) throws ActivityStorageException | owner - the owner of the target stream for this activity, type - the type of an activity which will be used to render a custom UI, title - the title, body - the body | ExoSocialActivity | Record an activity. |
addProcessor(ActivityProcessor processor) | processor | void | Add a new processor. |
addProcessorPlugin(BaseActivityProcessorPlugin plugin) | plugin | void | Add a new processor plugin. |
getActivitiesCount(Identity owner) throws ActivityStorageException | owner | int | Get the number of activities from a stream owner. |
processActivitiy(ExoSocialActivity activity) | activity | void | Pass an activity through the chain of processors. |