com.atlassian.gadgets.refimpl
Class PluginSettingsAppDataService

java.lang.Object
  extended by com.atlassian.gadgets.refimpl.PluginSettingsAppDataService
All Implemented Interfaces:
AppDataService

public class PluginSettingsAppDataService
extends Object
implements AppDataService

An AppDataService implementation backed by SAL's PluginSettings


Constructor Summary
PluginSettingsAppDataService(com.atlassian.sal.api.pluginsettings.PluginSettingsFactory pluginSettingsFactory)
           
 
Method Summary
 void deletePersonData(PersonId personId, AppId appId, OpenSocialRequestContext requestContext)
          Delete all application data for the specified person and all fields
 void deletePersonData(PersonId personId, AppId appId, Set<String> fields, OpenSocialRequestContext requestContext)
          Delete all application data for the specified person and fields
 Map<PersonId,Map<String,String>> getPeopleData(Set<PersonId> people, AppId appId, OpenSocialRequestContext requestContext)
          Fetch the application data for the specified people and all fields
 Map<PersonId,Map<String,String>> getPeopleData(Set<PersonId> people, AppId appId, Set<String> fields, OpenSocialRequestContext requestContext)
          Fetch the application data for the specified people
 void updatePersonData(PersonId personId, AppId appId, Map<String,String> values, OpenSocialRequestContext requestContext)
          Update (add or modify) application data for the specified person with the specified field / value pairs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginSettingsAppDataService

public PluginSettingsAppDataService(com.atlassian.sal.api.pluginsettings.PluginSettingsFactory pluginSettingsFactory)
Method Detail

getPeopleData

public Map<PersonId,Map<String,String>> getPeopleData(Set<PersonId> people,
                                                      AppId appId,
                                                      Set<String> fields,
                                                      OpenSocialRequestContext requestContext)
                                               throws AppDataServiceException
Description copied from interface: AppDataService
Fetch the application data for the specified people

Specified by:
getPeopleData in interface AppDataService
Parameters:
people - The people whose data is being requested
appId - The app id for the gadget making this request
fields - The requested fields
requestContext - The request context
Returns:
the data, as a map from person to field / value pairs
Throws:
AppDataServiceException - if there is a problem while performing this operation

getPeopleData

public Map<PersonId,Map<String,String>> getPeopleData(Set<PersonId> people,
                                                      AppId appId,
                                                      OpenSocialRequestContext requestContext)
                                               throws AppDataServiceException
Description copied from interface: AppDataService
Fetch the application data for the specified people and all fields

Specified by:
getPeopleData in interface AppDataService
Parameters:
people - The people whose data is being requested
appId - The app id for the gadget making this request
requestContext - The request context
Returns:
the data, as a map from person to field / value pairs. All field / value pairs for the person are returned
Throws:
AppDataServiceException

deletePersonData

public void deletePersonData(PersonId personId,
                             AppId appId,
                             Set<String> fields,
                             OpenSocialRequestContext requestContext)
                      throws AppDataServiceException
Description copied from interface: AppDataService
Delete all application data for the specified person and fields

Specified by:
deletePersonData in interface AppDataService
Parameters:
personId - The person whose data is being deleted
appId - The app id for the gadget making this request
fields - The requested fields
requestContext - The request context
Throws:
AppDataServiceException - if there is a problem while performing this operation

deletePersonData

public void deletePersonData(PersonId personId,
                             AppId appId,
                             OpenSocialRequestContext requestContext)
                      throws AppDataServiceException
Description copied from interface: AppDataService
Delete all application data for the specified person and all fields

Specified by:
deletePersonData in interface AppDataService
Parameters:
personId - The person whose data is being deleted
appId - The app id for the gadget making this request
requestContext - The request context
Throws:
AppDataServiceException - if there is a problem while performing this operation

updatePersonData

public void updatePersonData(PersonId personId,
                             AppId appId,
                             Map<String,String> values,
                             OpenSocialRequestContext requestContext)
                      throws AppDataServiceException
Description copied from interface: AppDataService
Update (add or modify) application data for the specified person with the specified field / value pairs.

Specified by:
updatePersonData in interface AppDataService
Parameters:
personId - The person whose data is being updated
appId - The app id for the gadget making this request
values - The new values for the fields to take on
requestContext - The request context
Throws:
AppDataServiceException - if there is a problem while performing this operation


Copyright © 2011 Atlassian. All Rights Reserved.