org.apache.shindig.social.opensocial.spi
Interface AppDataService

All Known Implementing Classes:
JsonDbOpensocialService

public interface AppDataService

Data Service SPI interface. This interface represents is used to retrieve information bound to a person, there are methods to update and delete data.


Method Summary
 Future<Void> deletePersonData(UserId userId, GroupId groupId, String appId, Set<String> fields, SecurityToken token)
          Deletes data for the specified user and group.
 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> updatePersonData(UserId userId, GroupId groupId, String appId, Set<String> fields, Map<String,String> values, SecurityToken token)
          Updates app data for the specified user and group with the new values.
 

Method Detail

getPersonData

Future<DataCollection> getPersonData(Set<UserId> userIds,
                                     GroupId groupId,
                                     String appId,
                                     Set<String> fields,
                                     SecurityToken token)
                                     throws ProtocolException
Retrives app data for the specified user list and group.

Parameters:
userIds - A set of UserIds.
groupId - The group
appId - The app
fields - The fields to filter the data by. Empty set implies all
token - The security token
Returns:
The data fetched
Throws:
ProtocolException

deletePersonData

Future<Void> deletePersonData(UserId userId,
                              GroupId groupId,
                              String appId,
                              Set<String> fields,
                              SecurityToken token)
                              throws ProtocolException
Deletes data for the specified user and group.

Parameters:
userId - The user
groupId - The group
appId - The app
fields - The fields to delete. Empty set implies all
token - The security token
Returns:
an error if one occurs
Throws:
ProtocolException

updatePersonData

Future<Void> updatePersonData(UserId userId,
                              GroupId groupId,
                              String appId,
                              Set<String> fields,
                              Map<String,String> values,
                              SecurityToken token)
                              throws ProtocolException
Updates app data for the specified user and group with the new values.

Parameters:
userId - The user
groupId - The group
appId - The app
fields - The fields to filter the data by. Empty set implies all
values - The values to set
token - The security token
Returns:
an error if one occurs
Throws:
ProtocolException


Copyright © 2007-2012. All Rights Reserved.