public interface AppDataService
This is an optional SPI that host applications may implement if they wish to provide the ability to read and store
custom application data using the OpenSocial APIs. If the AppDataService
is implemented, an implementation of [@link PersonService}
must also be provided. If an implementation of AppDataService
is not supplied, the OpenSocial appData API will not be supported,
but other OpenSocial and Gadget functionality will work normally.
Application data is a per-Person
, per-AppId
persistent store of field / value pairs. The fields and values are stored as String
s.
Implementations may choose to restrict the set of field names that may be stored. There is no default set of field names that must be
supported.
Modifier and Type | Method and Description |
---|---|
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.
|
Map<PersonId,Map<String,String>> getPeopleData(Set<PersonId> people, AppId appId, Set<String> fields, OpenSocialRequestContext requestContext) throws AppDataServiceException
people
- The people whose data is being requestedappId
- The app id for the gadget making this requestfields
- The requested fieldsrequestContext
- The request contextAppDataServiceException
- if there is a problem while performing this operationMap<PersonId,Map<String,String>> getPeopleData(Set<PersonId> people, AppId appId, OpenSocialRequestContext requestContext) throws AppDataServiceException
people
- The people whose data is being requestedappId
- The app id for the gadget making this requestrequestContext
- The request contextAppDataServiceException
void deletePersonData(PersonId personId, AppId appId, Set<String> fields, OpenSocialRequestContext requestContext) throws AppDataServiceException
personId
- The person whose data is being deletedappId
- The app id for the gadget making this requestfields
- The requested fieldsrequestContext
- The request contextAppDataServiceException
- if there is a problem while performing this operationvoid deletePersonData(PersonId personId, AppId appId, OpenSocialRequestContext requestContext) throws AppDataServiceException
personId
- The person whose data is being deletedappId
- The app id for the gadget making this requestrequestContext
- The request contextAppDataServiceException
- if there is a problem while performing this operationvoid updatePersonData(PersonId personId, AppId appId, Map<String,String> values, OpenSocialRequestContext requestContext) throws AppDataServiceException
personId
- The person whose data is being updatedappId
- The app id for the gadget making this requestvalues
- The new values for the fields to take onrequestContext
- The request contextAppDataServiceException
- if there is a problem while performing this operationCopyright © 2018 Atlassian. All rights reserved.