|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PersonService
Interface for handling Person requests.
The PersonService has three functions: first, it resolves String-based person id's, ensuring that a user corresponding to
the requested id exists in the system. Second, it aggregates social data associated with a user (which may be stored in disparate places in the host application)
into a single Person container. Third, it aggregates Group members in getPeople(java.util.Set, collecting all members of a named group
for each of a set of Persons together into one collection. All of this data is expected to be stored persistently by the host application. For example, a typical
PersonService implementation might resolve Person requests against its database of users, filling in the Person fields
from stored profile information for that user.
This is an optional SPI that host applications may implement if they wish to provide the ability to query person and group
data using the OpenSocial APIs. Host applications that wish to provide AppDataService or ActivityService implementations
must also implement PersonService as well, as those services depend on this service.
The PersonService is not intended to provide a mechanism for updating social data.
| Method Summary | |
|---|---|
Set<com.atlassian.gadgets.opensocial.model.Person> |
getPeople(Set<String> personIds,
com.atlassian.gadgets.opensocial.model.Group group,
com.atlassian.gadgets.opensocial.OpenSocialRequestContext requestContext)
Returns a List corresponding to the group members of the passed in person IDs |
com.atlassian.gadgets.opensocial.model.Person |
getPerson(String personId,
com.atlassian.gadgets.opensocial.OpenSocialRequestContext requestContext)
Returns a Person corresponding to the personId |
| Method Detail |
|---|
@Nullable
com.atlassian.gadgets.opensocial.model.Person getPerson(String personId,
com.atlassian.gadgets.opensocial.OpenSocialRequestContext requestContext)
throws PersonServiceException
Person corresponding to the personId
personId - The requested person idrequestContext - context for this request
Person corresponding to the requested personId, or null if the requested personId could not be resolved
PersonServiceException - if there is a problem while performing this operation
Set<com.atlassian.gadgets.opensocial.model.Person> getPeople(Set<String> personIds,
com.atlassian.gadgets.opensocial.model.Group group,
com.atlassian.gadgets.opensocial.OpenSocialRequestContext requestContext)
throws PersonServiceException
List corresponding to the group members of the passed in person IDs
personIds - A set of usersgroup - The group to select from each of the passed in personIdsrequestContext - context for this request
PersonServiceException - if there is a problem while performing this operation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||