Interface ActivityManager


  • public interface ActivityManager
    This interface handles social activities

    Implement this interface to according to the persistence storage of social data

    • 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 stored
        userActivity - 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 removed
        activityId - The id of the activity to be removed
        appId - 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 modified
        userActivity - 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 fetched
        groupId - The groupId
        appId - The appId of the activities to be fetched
        fields - The fields to return. Empty set implies all
        options - 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 fetched
        groupId - The groupId
        appId - The appId of the activities to be fetched
        fields - The fields to return. Empty set implies all
        options - The sorting/filtering/pagination options
        activityIds - 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 fetched
        groupId - The groupId
        appId - The appId of the activity
        fields - The fields to return. Empty set implies all
        activityId - 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 deleted
        groupId - The groupId
        appId - The appId
        activityIds - 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 for
        groupId - The groupId
        appId - The appId of the activity
        fields - Fields of the activity to be created
        activity - The activity to create
        Throws:
        SocialDataException