Interface ActivityManager
-
public interface ActivityManagerThis interface handles social activities Implement this interface to according to the persistence storage of social data
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreateActivity(String userId, String groupId, String appId, Set<String> fields, Activity activity)Creates an Activity object for the given person using the given detailsvoiddeleteActivities(String userId, String groupId, String appId, Set<String> activityIds)Deletes the activities for the given activityIdsvoiddeleteActivity(String userId, String activityId, String appId)Removes the activity of the given userIdActivity[]getActivities(String[] userIds, String groupId, String appId, Set<String> fields, FilterOptions options)Returns an array of Activity objects to the passed parametersActivity[]getActivities(String userId, String groupId, String appId, Set<String> fields, FilterOptions options, String[] activityIds)Returns an array of Activity objects to the passed activityIdsActivitygetActivity(String userId, String groupId, String appId, Set<String> fields, String activityId)Returns the Activity object for the given uservoidsaveActivity(String userId, Activity userActivity)Persists the activity for the given userIdvoidupdateActivity(String userId, Activity userActivity)Updates the activity of the given userId
-
-
-
Method Detail
-
saveActivity
void saveActivity(String userId, Activity userActivity) throws SocialDataException
Persists the activity for the given userId- Parameters:
userId- The userId of the person whose activity to be storeduserActivity- 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
-
updateActivity
void updateActivity(String userId, Activity userActivity) throws SocialDataException
Updates the activity of the given userId- Parameters:
userId- The userId of the person whose activity to be modifieduserActivity- The activity to be modified- Throws:
SocialDataException
-
getActivities
Activity[] getActivities(String[] userIds, String groupId, String appId, Set<String> fields, FilterOptions options) throws SocialDataException
Returns an array of Activity objects to the passed parameters- Parameters:
userIds- The set of userIds for which activities to be fetchedgroupId- The groupIdappId- The appId of the activities to be fetchedfields- The fields to return. Empty set implies alloptions- The sorting/filtering/pagination options- Throws:
SocialDataException
-
getActivities
Activity[] getActivities(String userId, String groupId, String appId, Set<String> fields, FilterOptions options, String[] activityIds) throws SocialDataException
Returns an array of Activity objects to the passed activityIds- Parameters:
userId- The userId of the person whose activity to be fetchedgroupId- The groupIdappId- The appId of the activities to be fetchedfields- The fields to return. Empty set implies alloptions- The sorting/filtering/pagination optionsactivityIds- The ids of the activities to be fetched- Throws:
SocialDataException
-
getActivity
Activity getActivity(String userId, String groupId, String appId, Set<String> fields, String activityId) throws SocialDataException
Returns the Activity object for the given user- Parameters:
userId- The userId of the person whose activity to be fetchedgroupId- The groupIdappId- The appId of the activityfields- The fields to return. Empty set implies allactivityId- The activityId of the activity to be fetched- Returns:
- A Activity object for the given parameters
- Throws:
SocialDataException
-
deleteActivities
void deleteActivities(String userId, String groupId, String appId, Set<String> activityIds) throws SocialDataException
Deletes the activities for the given activityIds- Parameters:
userId- The userId of the person whose activities to be deletedgroupId- The groupIdappId- The appIdactivityIds- The activityIds to be deleted- Throws:
SocialDataException
-
createActivity
void createActivity(String userId, String groupId, String appId, Set<String> fields, Activity activity) throws SocialDataException
Creates an Activity object for the given person using the given details- Parameters:
userId- The userId of the person to create the activity forgroupId- The groupIdappId- The appId of the activityfields- Fields of the activity to be createdactivity- The activity to create- Throws:
SocialDataException
-
-