Interface ActivityStreamManager
-
public interface ActivityStreamManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
createActivityEntry(String userId, String groupId, String appId, Set<String> fields, ActivityEntry activity)
Creates the passed in activity for the passed in user and group.void
deleteActivity(String userId, String activityId, String appId)
Removes the activity of the given userIdvoid
deleteActivityEntries(String userId, String groupId, String appId, Set<String> activityIds)
Deletes the activity for the passed in user and group that corresponds to the activityId.ActivityEntry[]
getActivityEntries(String[] userIds, String groupId, String appId, Set<String> fields, FilterOptions options)
Returns a list of activities that correspond to the passed in users and group.ActivityEntry[]
getActivityEntries(String userId, String groupId, String appId, Set<String> fields, FilterOptions options, String[] activityIds)
Returns a set of activities for the passed in user and group that corresponds to a list of activityIds.ActivityEntry
getActivityEntry(String userId, String groupId, String appId, Set<String> fields, String activityId)
Returns an activity for the passed in user and group that corresponds to a single activityId.void
saveActivity(String userId, ActivityEntry activity)
Persists the activity for the given userIdvoid
updateActivityEntry(String userId, ActivityEntry activity)
Updates the specified Activity.
-
-
-
Method Detail
-
saveActivity
void saveActivity(String userId, ActivityEntry activity) throws SocialDataException
Persists the activity for the given userId- Parameters:
userId
- The userId of the person whose activity to be storedactivity
- The Activity object of the user to be stored- Throws:
SocialDataException
-
deleteActivity
void deleteActivity(String userId, String activityId, String appId) throws SocialDataException
Removes the activity of the given userId- Parameters:
userId
- The userId of the person whose activity to be removedactivityId
- The id of the activity to be removedappId
- The appId of the activity- Throws:
SocialDataException
-
getActivityEntries
ActivityEntry[] getActivityEntries(String[] userIds, String groupId, String appId, Set<String> fields, FilterOptions options) throws SocialDataException
Returns a list of activities that correspond to the passed in users and group.- Parameters:
userIds
- The set of ids of the people to fetch activities for.groupId
- Indicates whether to fetch activities for a group.appId
- The app id.fields
- The fields to return. Empty set implies alloptions
- The sorting/filtering/pagination options- Returns:
- a response item with the list of activities.
- Throws:
SocialDataException
- if any.
-
getActivityEntries
ActivityEntry[] getActivityEntries(String userId, String groupId, String appId, Set<String> fields, FilterOptions options, String[] activityIds) throws SocialDataException
Returns a set of activities for the passed in user and group that corresponds to a list of activityIds.- Parameters:
userId
- The set of ids of the people to fetch activities for.groupId
- Indicates whether to fetch activities for a group.appId
- The app id.fields
- The fields to return. Empty set implies alloptions
- The sorting/filtering/pagination optionsactivityIds
- The set of activity ids to fetch.- Returns:
- a response item with the list of activities.
- Throws:
SocialDataException
- if any.
-
getActivityEntry
ActivityEntry getActivityEntry(String userId, String groupId, String appId, Set<String> fields, String activityId) throws SocialDataException
Returns an activity for the passed in user and group that corresponds to a single activityId.- Parameters:
userId
- The set of ids of the people to fetch activities for.groupId
- Indicates whether to fetch activities for a group.appId
- The app id.fields
- The fields to return. Empty set implies allactivityId
- The activity id to fetch.- Returns:
- a response item with the list of activities.
- Throws:
SocialDataException
- if any.
-
deleteActivityEntries
void deleteActivityEntries(String userId, String groupId, String appId, Set<String> activityIds) throws SocialDataException
Deletes the activity for the passed in user and group that corresponds to the activityId.- Parameters:
userId
- The user.groupId
- The group.appId
- The app id.activityIds
- A list of activity ids to delete.- Throws:
SocialDataException
- if any.
-
updateActivityEntry
void updateActivityEntry(String userId, ActivityEntry activity) throws SocialDataException
Updates the specified Activity.- Parameters:
userId
- The id of the person to update the activity foractivity
- The updated activity- Throws:
SocialDataException
- if any
-
createActivityEntry
void createActivityEntry(String userId, String groupId, String appId, Set<String> fields, ActivityEntry activity) throws SocialDataException
Creates the passed in activity for the passed in user and group. Once createActivity is called, getActivities will be able to return the Activity.- Parameters:
userId
- The id of the person to create the activity for.groupId
- The group.appId
- The app id.fields
- The fields to return.activity
- The activity to create.- Throws:
SocialDataException
- if any.
-
-