public class JsonDbOpensocialService extends Object implements ActivityService, PersonService, AppDataService, MessageService, AlbumService, MediaItemService, ActivityStreamService, GroupService
MessageService.NotImplementedMessageServiceAlbumService.NotImplementedAlbumServiceMediaItemService.NotImplementedMediaItemServiceALL_FILTER, HAS_APP_FILTER, IS_WITH_FRIENDS_FILTER, TOP_FRIENDS_FILTER, TOP_FRIENDS_SORT| Constructor and Description |
|---|
JsonDbOpensocialService(String jsonLocation,
BeanConverter converter,
String contextroot)
Initializes the JsonDbOpensocialService using Guice
|
| Modifier and Type | Method and Description |
|---|---|
Future<Void> |
createActivity(UserId userId,
GroupId groupId,
String appId,
Set<String> fields,
Activity activity,
SecurityToken token)
Creates the passed in activity for the passed in user and group.
|
Future<ActivityEntry> |
createActivityEntry(UserId userId,
GroupId groupId,
String appId,
Set<String> fields,
ActivityEntry activityEntry,
SecurityToken token)
Creates the passed in activity for the passed in user and group.
|
Future<Void> |
createAlbum(UserId userId,
String appId,
Album album,
SecurityToken token)
Creates an album for the given user.
|
Future<Void> |
createMediaItem(UserId userId,
String appId,
String albumId,
MediaItem mediaItem,
SecurityToken token)
Create a MediaItem in the given album for the given user.
|
Future<Void> |
createMessage(UserId userId,
String appId,
String msgCollId,
Message message,
SecurityToken token)
Posts a message to the user's specified message collection, to be sent to the set of recipients specified in
the message.
|
Future<MessageCollection> |
createMessageCollection(UserId userId,
MessageCollection msgCollection,
SecurityToken token)
Creates a new message collection for the given arguments
|
Future<Void> |
deleteActivities(UserId userId,
GroupId groupId,
String appId,
Set<String> activityIds,
SecurityToken token)
Deletes the activity for the passed in user and group that corresponds to the activityId.
|
Future<Void> |
deleteActivityEntries(UserId userId,
GroupId groupId,
String appId,
Set<String> activityIds,
SecurityToken token)
Deletes the activity for the passed in user and group that corresponds to the activityId.
|
Future<Void> |
deleteAlbum(UserId userId,
String appId,
String albumId,
SecurityToken token)
Deletes a single album for the given user with the given album ID.
|
Future<Void> |
deleteMediaItem(UserId userId,
String appId,
String albumId,
String mediaItemId,
SecurityToken token)
Deletes a MediaItem by ID.
|
Future<Void> |
deleteMessageCollection(UserId userId,
String msgCollId,
SecurityToken token)
Deletes a message collection for the given arguments
|
Future<Void> |
deleteMessages(UserId userId,
String msgCollId,
List<String> ids,
SecurityToken token)
Deletes a set of messages for a given user/message collection
|
Future<Void> |
deletePersonData(UserId userId,
GroupId groupId,
String appId,
Set<String> fields,
SecurityToken token)
Deletes data for the specified user and group.
|
<T> T |
filterFields(JSONObject object,
Set<String> fields,
Class<T> clz) |
Future<RestfulCollection<Activity>> |
getActivities(Set<UserId> userIds,
GroupId groupId,
String appId,
Set<String> fields,
CollectionOptions options,
SecurityToken token)
Returns a list of activities that correspond to the passed in users and group.
|
Future<RestfulCollection<Activity>> |
getActivities(UserId userId,
GroupId groupId,
String appId,
Set<String> fields,
CollectionOptions options,
Set<String> activityIds,
SecurityToken token)
Returns a set of activities for the passed in user and group that corresponds to a list of
activityIds.
|
Future<Activity> |
getActivity(UserId userId,
GroupId groupId,
String appId,
Set<String> fields,
String activityId,
SecurityToken token)
Returns an activity for the passed in user and group that corresponds to a single
activityId.
|
Future<RestfulCollection<ActivityEntry>> |
getActivityEntries(Set<UserId> userIds,
GroupId groupId,
String appId,
Set<String> fields,
CollectionOptions options,
SecurityToken token)
Returns a list of activities that correspond to the passed in users and group.
|
Future<RestfulCollection<ActivityEntry>> |
getActivityEntries(UserId userId,
GroupId groupId,
String appId,
Set<String> fields,
CollectionOptions options,
Set<String> activityIds,
SecurityToken token)
Returns a set of activities for the passed in user and group that corresponds to a list of
activityIds.
|
Future<ActivityEntry> |
getActivityEntry(UserId userId,
GroupId groupId,
String appId,
Set<String> fields,
String activityId,
SecurityToken token)
Returns an activity for the passed in user and group that corresponds to a single
activityId.
|
Future<Album> |
getAlbum(UserId userId,
String appId,
Set<String> fields,
String albumId,
SecurityToken token)
Retrieves a single album for the given user with the given album ID.
|
Future<RestfulCollection<Album>> |
getAlbums(Set<UserId> userIds,
GroupId groupId,
String appId,
Set<String> fields,
CollectionOptions options,
SecurityToken token)
Retrieves albums for the given user and group.
|
Future<RestfulCollection<Album>> |
getAlbums(UserId userId,
String appId,
Set<String> fields,
CollectionOptions options,
Set<String> albumIds,
SecurityToken token)
Retrieves albums for the given user with the given album IDs.
|
JSONObject |
getDb()
Allows access to the underlying json db.
|
Future<RestfulCollection<Group>> |
getGroups(UserId userId,
CollectionOptions options,
Set<String> fields,
SecurityToken token) |
Set<String> |
getIdSet(Set<UserId> users,
GroupId group,
SecurityToken token)
Get the set of user id's for a set of users and a group
|
Future<MediaItem> |
getMediaItem(UserId userId,
String appId,
String albumId,
String mediaItemId,
Set<String> fields,
SecurityToken token)
Retrieves a MediaItem by ID.
|
Future<RestfulCollection<MediaItem>> |
getMediaItems(Set<UserId> userIds,
GroupId groupId,
String appId,
Set<String> fields,
CollectionOptions options,
SecurityToken token)
Retrieves MediaItems by users and groups.
|
Future<RestfulCollection<MediaItem>> |
getMediaItems(UserId userId,
String appId,
String albumId,
Set<String> fields,
CollectionOptions options,
SecurityToken token)
Retrieves MediaItems by Album.
|
Future<RestfulCollection<MediaItem>> |
getMediaItems(UserId userId,
String appId,
String albumId,
Set<String> mediaItemIds,
Set<String> fields,
CollectionOptions options,
SecurityToken token)
Retrieves MediaItems by IDs.
|
Future<RestfulCollection<MessageCollection>> |
getMessageCollections(UserId userId,
Set<String> fields,
CollectionOptions options,
SecurityToken token)
Returns a list of message collections corresponding to the given user
|
Future<RestfulCollection<Message>> |
getMessages(UserId userId,
String msgCollId,
Set<String> fields,
List<String> msgIds,
CollectionOptions options,
SecurityToken token)
Returns a list of messages that correspond to the passed in data
|
String |
getPassword(String username)
Public methods for use with Authentication Classes
|
Future<RestfulCollection<Person>> |
getPeople(Set<UserId> userIds,
GroupId groupId,
CollectionOptions options,
Set<String> fields,
SecurityToken token)
Returns a list of people that correspond to the passed in person ids.
|
Future<Person> |
getPerson(UserId id,
Set<String> fields,
SecurityToken token)
Returns a person that corresponds to the passed in person id.
|
Future<DataCollection> |
getPersonData(Set<UserId> userIds,
GroupId groupId,
String appId,
Set<String> fields,
SecurityToken token)
Retrives app data for the specified user list and group.
|
Future<Void> |
modifyMessage(UserId userId,
String msgCollId,
String messageId,
Message message,
SecurityToken token)
Modifies/Updates a specific message with new data
|
Future<Void> |
modifyMessageCollection(UserId userId,
MessageCollection msgCollection,
SecurityToken token)
Modifies/Updates a message collection for the given arguments
|
void |
setAuthority(Authority authority) |
void |
setDb(JSONObject db)
override the json database
|
Future<ActivityEntry> |
updateActivityEntry(UserId userId,
GroupId groupId,
String appId,
Set<String> fields,
ActivityEntry activityEntry,
String activityId,
SecurityToken token)
Updates the specified Activity.
|
Future<Void> |
updateAlbum(UserId userId,
String appId,
Album album,
String albumId,
SecurityToken token)
Updates an album for the given user.
|
Future<Void> |
updateMediaItem(UserId userId,
String appId,
String albumId,
String mediaItemId,
MediaItem mediaItem,
SecurityToken token)
Updates a MediaItem for the given user.
|
Future<Person> |
updatePerson(UserId id,
Person person,
SecurityToken token)
Updates person that corresponds to the passed in person id and updates him
|
Future<Void> |
updatePersonData(UserId userId,
GroupId groupId,
String appId,
Set<String> fields,
Map<String,Object> values,
SecurityToken token)
Updates app data for the specified user and group with the new values.
|
protected boolean |
viewerCanUpdatePerson(String viewer,
String person)
Check if a viewer is allowed to update the given person record.
|
@Inject public JsonDbOpensocialService(String jsonLocation, BeanConverter converter, String contextroot) throws Exception
jsonLocation - location of the json data provided by the shindig.canonical.json.db parameterconverter - an injected BeanConverterException - if anypublic JSONObject getDb()
public void setDb(JSONObject db)
db - a JSONObject.@Inject(optional=true) public void setAuthority(Authority authority)
public Future<RestfulCollection<Activity>> getActivities(Set<UserId> userIds, GroupId groupId, String appId, Set<String> fields, CollectionOptions options, SecurityToken token) throws ProtocolException
getActivities in interface ActivityServiceuserIds - 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 optionstoken - A valid SecurityTokenProtocolExceptionpublic Future<RestfulCollection<Activity>> getActivities(UserId userId, GroupId groupId, String appId, Set<String> fields, CollectionOptions options, Set<String> activityIds, SecurityToken token) throws ProtocolException
getActivities in interface ActivityServiceuserId - 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.token - A valid SecurityTokenProtocolExceptionpublic Future<Activity> getActivity(UserId userId, GroupId groupId, String appId, Set<String> fields, String activityId, SecurityToken token) throws ProtocolException
getActivity in interface ActivityServiceuserId - 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.token - A valid SecurityTokenProtocolExceptionpublic Future<Void> deleteActivities(UserId userId, GroupId groupId, String appId, Set<String> activityIds, SecurityToken token) throws ProtocolException
deleteActivities in interface ActivityServiceuserId - The user.groupId - The group.appId - The app id.activityIds - A list of activity ids to delete.token - A valid SecurityToken.ProtocolExceptionpublic Future<Void> createActivity(UserId userId, GroupId groupId, String appId, Set<String> fields, Activity activity, SecurityToken token) throws ProtocolException
createActivity in interface ActivityServiceuserId - 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.token - A valid SecurityTokenProtocolExceptionpublic Future<RestfulCollection<Person>> getPeople(Set<UserId> userIds, GroupId groupId, CollectionOptions options, Set<String> fields, SecurityToken token) throws ProtocolException
getPeople in interface PersonServiceuserIds - A set of usersgroupId - The groupoptions - How to filter, sort and paginate the collection being fetchedfields - The profile details to fetch. Empty set implies alltoken - The gadget token @return a list of people.ProtocolExceptionpublic Future<Person> getPerson(UserId id, Set<String> fields, SecurityToken token) throws ProtocolException
getPerson in interface PersonServiceid - The id of the person to fetch.fields - The fields to fetch.token - The gadget tokenProtocolExceptionpublic Future<Person> updatePerson(UserId id, Person person, SecurityToken token) throws ProtocolException
updatePerson in interface PersonServiceid - The id of the person to fetch.token - The gadget tokenProtocolExceptionprotected boolean viewerCanUpdatePerson(String viewer, String person)
public Future<DataCollection> getPersonData(Set<UserId> userIds, GroupId groupId, String appId, Set<String> fields, SecurityToken token) throws ProtocolException
getPersonData in interface AppDataServiceuserIds - A set of UserIds.groupId - The groupappId - The appfields - The fields to filter the data by. Empty set implies alltoken - The security tokenProtocolExceptionpublic Future<Void> deletePersonData(UserId userId, GroupId groupId, String appId, Set<String> fields, SecurityToken token) throws ProtocolException
deletePersonData in interface AppDataServiceuserId - The usergroupId - The groupappId - The appfields - The fields to delete. Empty set implies alltoken - The security tokenProtocolExceptionpublic Future<Void> updatePersonData(UserId userId, GroupId groupId, String appId, Set<String> fields, Map<String,Object> values, SecurityToken token) throws ProtocolException
updatePersonData in interface AppDataServiceuserId - The usergroupId - The groupappId - The appfields - The fields to filter the data by. Empty set implies allvalues - The values to settoken - The security tokenProtocolExceptionpublic Future<RestfulCollection<Group>> getGroups(UserId userId, CollectionOptions options, Set<String> fields, SecurityToken token) throws ProtocolException
getGroups in interface GroupServiceuserId - a userId objectoptions - search/sort/filtering optionsfields - Field search/sorttoken - a valid security tokenProtocolExceptionpublic Future<Void> createMessage(UserId userId, String appId, String msgCollId, Message message, SecurityToken token) throws ProtocolException
createMessage in interface MessageServiceuserId - The user posting the message.appId - The app idmsgCollId - The message collection Id to post to, default @outboxmessage - The message to posttoken - A valid security token @return a response item containing any errors/ProtocolException - when invalid parameters are givenpublic Future<RestfulCollection<MessageCollection>> getMessageCollections(UserId userId, Set<String> fields, CollectionOptions options, SecurityToken token) throws ProtocolException
getMessageCollections in interface MessageServiceuserId - The User to fetch forfields - The fields to fetch for the message collectionsoptions - Pagination, etaltoken - Given security token for this requestProtocolException - when invalid parameters are givenpublic Future<Void> deleteMessages(UserId userId, String msgCollId, List<String> ids, SecurityToken token) throws ProtocolException
deleteMessages in interface MessageServiceuserId - The User to delete formsgCollId - The Message Collection ID to delete from, default @allids - List of IDs to deletetoken - Given Security Token for this requestProtocolExceptionpublic Future<RestfulCollection<Message>> getMessages(UserId userId, String msgCollId, Set<String> fields, List<String> msgIds, CollectionOptions options, SecurityToken token) throws ProtocolException
getMessages in interface MessageServiceuserId - The User to fetch formsgCollId - The message Collection ID to fetch from, default @allfields - The fields to fetch for the messagesmsgIds - An explicit set of message ids to fetchoptions - Options to control the fetchtoken - Given security token for this requestProtocolException - when invalid parameters are givenpublic Future<MessageCollection> createMessageCollection(UserId userId, MessageCollection msgCollection, SecurityToken token) throws ProtocolException
createMessageCollection in interface MessageServiceuserId - The userId to create the message collection formsgCollection - A message collection that is to be createdtoken - A security token for this requestProtocolException - when invalid parameters are given or not implementedpublic Future<Void> modifyMessage(UserId userId, String msgCollId, String messageId, Message message, SecurityToken token) throws ProtocolException
modifyMessage in interface MessageServiceuserId - The User to modify formsgCollId - The Message Collection ID to modify from, default @allmessageId - The messageId to modifymessage - The message details to modifytoken - Given Security Token for this requestProtocolException - for invalid parameters or missing messages or userspublic Future<Void> modifyMessageCollection(UserId userId, MessageCollection msgCollection, SecurityToken token) throws ProtocolException
modifyMessageCollection in interface MessageServiceuserId - The userId to modify the message collection formsgCollection - Data for the message collection to be modifiedtoken - A security token for this requestProtocolException - when invalid parameters are given or not implementedpublic Future<Void> deleteMessageCollection(UserId userId, String msgCollId, SecurityToken token) throws ProtocolException
deleteMessageCollection in interface MessageServiceuserId - The userId to create the message collection formsgCollId - Data for the message collection to be modifiedtoken - A security token for this requestProtocolException - when invalid parameters are given, the message collection does not exist or not implementedpublic String getPassword(String username)
public Set<String> getIdSet(Set<UserId> users, GroupId group, SecurityToken token) throws JSONException
users - set of UserIdsgroup - the grouptoken - a tokenJSONException - if errors in Jsonpublic Future<Album> getAlbum(UserId userId, String appId, Set<String> fields, String albumId, SecurityToken token) throws ProtocolException
getAlbum in interface AlbumServiceuserId - Identifies the person to retrieve the album fromappId - Identifies the application to retrieve the album fromfields - Indicates the fields to return. Empty set implies allalbumId - Identifies the album to retrievetoken - A valid SecurityTokenProtocolExceptionpublic Future<RestfulCollection<Album>> getAlbums(UserId userId, String appId, Set<String> fields, CollectionOptions options, Set<String> albumIds, SecurityToken token) throws ProtocolException
getAlbums in interface AlbumServiceuserId - Identifies the person to retrieve albums forappId - Identifies the application to retrieve albums fromfields - The fields to return; empty set implies alloptions - The sorting/filtering/pagination optionsalbumIds - The set of album ids to fetchtoken - A valid SecurityTokenProtocolExceptionpublic Future<RestfulCollection<Album>> getAlbums(Set<UserId> userIds, GroupId groupId, String appId, Set<String> fields, CollectionOptions options, SecurityToken token) throws ProtocolException
getAlbums in interface AlbumServiceuserIds - Identifies the users to retrieve albums fromgroupId - Identifies the group to retrieve albums fromappId - Identifies the application to retrieve albums fromfields - The fields to return. Empty set implies alloptions - The sorting/filtering/pagination optionstoken - A valid SecurityTokenProtocolExceptionpublic Future<Void> deleteAlbum(UserId userId, String appId, String albumId, SecurityToken token) throws ProtocolException
deleteAlbum in interface AlbumServiceuserId - Identifies the user to delete the album fromappId - Identifies the application to delete the album fromalbumId - Identifies the album to deletetoken - A valid SecurityTokenProtocolExceptionpublic Future<Void> createAlbum(UserId userId, String appId, Album album, SecurityToken token) throws ProtocolException
createAlbum in interface AlbumServiceuserId - Identifies the user to create the album forappId - Identifies the application to create the album inalbum - The album to createtoken - A valid SecurityTokenProtocolExceptionpublic Future<Void> updateAlbum(UserId userId, String appId, Album album, String albumId, SecurityToken token) throws ProtocolException
updateAlbum in interface AlbumServiceuserId - Identifies the user to update the album forappId - Identifies the application to update the album inalbum - Defines the updated albumalbumId - Identifies the ID of the album to updatetoken - A valid SecurityTokenProtocolExceptionpublic Future<MediaItem> getMediaItem(UserId userId, String appId, String albumId, String mediaItemId, Set<String> fields, SecurityToken token) throws ProtocolException
getMediaItem in interface MediaItemServiceuserId - Identifies the owner of the MediaItem to retrieveappId - Identifies the application of the MeiaItem to retrievealbumId - Identifies the album containing the MediaItemmediaItemId - Identifies the MediaItem to retrievefields - Indicates fields to be returned; empty set implies alltoken - A valid SecurityTokenProtocolExceptionpublic Future<RestfulCollection<MediaItem>> getMediaItems(UserId userId, String appId, String albumId, Set<String> mediaItemIds, Set<String> fields, CollectionOptions options, SecurityToken token) throws ProtocolException
getMediaItems in interface MediaItemServiceuserId - Identifies the owner of the MediaItemsappId - Identifies the application of the MediaItemsalbumId - Identifies the album containing the MediaItemsmediaItemIds - Identifies the MediaItems to retrievefields - Specifies the fields to return; empty set implies alloptions - Sorting/filtering/pagination optionstoken - A valid SecurityTokenProtocolExceptionpublic Future<RestfulCollection<MediaItem>> getMediaItems(UserId userId, String appId, String albumId, Set<String> fields, CollectionOptions options, SecurityToken token) throws ProtocolException
getMediaItems in interface MediaItemServiceuserId - Identifies the owner of the MediaItemsappId - Identifies the application of the MediaItemsalbumId - Identifies the Album containing the MediaItemsfields - Specifies the fields to return; empty set implies alloptions - Sorting/filtering/pagination optionstoken - A valid SecurityTokenProtocolExceptionpublic Future<RestfulCollection<MediaItem>> getMediaItems(Set<UserId> userIds, GroupId groupId, String appId, Set<String> fields, CollectionOptions options, SecurityToken token) throws ProtocolException
getMediaItems in interface MediaItemServiceuserIds - Identifies the users that this request is relative togroupId - Identifies the users' groups to retrieve MediaItems fromappId - Identifies the application to retrieve MediaItems fromfields - The fields to return; empty set implies alloptions - Sorting/filtering/pagination optionstoken - A valid SecurityTokenProtocolExceptionpublic Future<Void> deleteMediaItem(UserId userId, String appId, String albumId, String mediaItemId, SecurityToken token) throws ProtocolException
deleteMediaItem in interface MediaItemServiceuserId - Identifies the owner of the MediaItem to deleteappId - Identifies the application hosting the MediaItemalbumId - Identifies the parent album of the MediaItemmediaItemId - Identifies the MediaItem to deletetoken - A valid SecurityTokenProtocolExceptionpublic Future<Void> createMediaItem(UserId userId, String appId, String albumId, MediaItem mediaItem, SecurityToken token) throws ProtocolException
createMediaItem in interface MediaItemServiceuserId - Identifies the owner of the MediaItem to createappId - Identifies the application hosting the MediaItemalbumId - Identifies the album to contain the MediaItemmediaItem - The MediaItem to createtoken - A valid SecurityTokenProtocolExceptionpublic Future<Void> updateMediaItem(UserId userId, String appId, String albumId, String mediaItemId, MediaItem mediaItem, SecurityToken token) throws ProtocolException
updateMediaItem in interface MediaItemServiceuserId - Identifies the owner of the MediaItem to updateappId - Identifies the application hosting the MediaItemalbumId - Identifies the album containing the MediaItemmediaItemId - Identifies the MediaItem to updatemediaItem - The updated MediaItem to persisttoken - A valid SecurityTokenProtocolExceptionpublic Future<ActivityEntry> updateActivityEntry(UserId userId, GroupId groupId, String appId, Set<String> fields, ActivityEntry activityEntry, String activityId, SecurityToken token) throws ProtocolException
updateActivityEntry in interface ActivityStreamServiceuserId - The id of the person to update the activity forgroupId - The groupappId - The app idfields - The fields to returnactivityEntry - The updated activityactivityId - The id of the existing activity to updatetoken - A valid SecurityTokenProtocolException - if anypublic Future<ActivityEntry> createActivityEntry(UserId userId, GroupId groupId, String appId, Set<String> fields, ActivityEntry activityEntry, SecurityToken token) throws ProtocolException
createActivityEntry in interface ActivityStreamServiceuserId - The id of the person to create the activity for.groupId - The group.appId - The app id.fields - The fields to return.activityEntry - The activity to create.token - A valid SecurityTokenProtocolException - if any.public Future<Void> deleteActivityEntries(UserId userId, GroupId groupId, String appId, Set<String> activityIds, SecurityToken token) throws ProtocolException
deleteActivityEntries in interface ActivityStreamServiceuserId - The user.groupId - The group.appId - The app id.activityIds - A list of activity ids to delete.token - A valid SecurityToken.ProtocolException - if any.public Future<ActivityEntry> getActivityEntry(UserId userId, GroupId groupId, String appId, Set<String> fields, String activityId, SecurityToken token) throws ProtocolException
getActivityEntry in interface ActivityStreamServiceuserId - 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.token - A valid SecurityTokenProtocolException - if any.public Future<RestfulCollection<ActivityEntry>> getActivityEntries(Set<UserId> userIds, GroupId groupId, String appId, Set<String> fields, CollectionOptions options, SecurityToken token) throws ProtocolException
getActivityEntries in interface ActivityStreamServiceuserIds - 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 optionstoken - A valid SecurityTokenProtocolException - if any.public Future<RestfulCollection<ActivityEntry>> getActivityEntries(UserId userId, GroupId groupId, String appId, Set<String> fields, CollectionOptions options, Set<String> activityIds, SecurityToken token) throws ProtocolException
getActivityEntries in interface ActivityStreamServiceuserId - 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.token - A valid SecurityTokenProtocolException - if any.public <T> T filterFields(JSONObject object, Set<String> fields, Class<T> clz) throws JSONException
JSONExceptionCopyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.