|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ActivityService
Interface for handling Activity
requests. The appId parameter in the methods below is a unique identifier for
a particular gadget (e.g. Chart Gadget). This parameter should be used to enforce that only activities created by a
particular gadget should be available to that gadget.
This is an optional SPI that host applications may implement if they wish to provide the ability to read and post
activity data using the OpenSocial APIs. If the ActivityService
is implemented, an implementation of [@link PersonService}
must also be provided. If an implementation of ActivityService
is not supplied, the OpenSocial activity API will not be supported,
but other OpenSocial and Gadget functionality will work normally.
Method Summary | |
---|---|
Activity |
createActivity(PersonId personId,
AppId appId,
Activity activity,
OpenSocialRequestContext requestContext)
Creates the passed in activity for the passed in user and group. |
void |
deleteActivities(PersonId personId,
AppId appId,
Set<String> activityIds,
OpenSocialRequestContext token)
Deletes the activity for the passed in person that corresponds to the activityIds. |
List<Activity> |
getActivities(PersonId personId,
AppId appId,
Set<String> activityIds,
OpenSocialRequestContext requestContext)
Returns a list of activities for the passed in person that corresponds to a list of activityIds. |
List<Activity> |
getActivities(Set<PersonId> peopleIds,
AppId appId,
OpenSocialRequestContext requestContext)
Returns a list of activities that correspond to the passed in users |
Activity |
getActivity(PersonId personId,
AppId appId,
String activityId,
OpenSocialRequestContext requestContext)
Returns an activity for the passed in person that corresponds to an activityId |
Method Detail |
---|
List<Activity> getActivities(Set<PersonId> peopleIds, AppId appId, OpenSocialRequestContext requestContext) throws ActivityServiceException
peopleIds
- The people whose data is being requestedappId
- The app id for the gadget making this requestrequestContext
- The request context
ActivityServiceException
- if there is a problem while performing this operationList<Activity> getActivities(PersonId personId, AppId appId, Set<String> activityIds, OpenSocialRequestContext requestContext) throws ActivityServiceException
personId
- The person to fetch activities forappId
- The app id for the gadget making this requestactivityIds
- The set of activity ids to fetch.requestContext
- The request context
ActivityServiceException
- if there is a problem while performing this operation@Nullable Activity getActivity(PersonId personId, AppId appId, String activityId, OpenSocialRequestContext requestContext) throws ActivityServiceException
personId
- The person to fetch an activity for.appId
- The app id for the gadget making this request.activityId
- The activity id to fetch.requestContext
- The request context
activityId
doesn't exist
ActivityServiceException
- if there is a problem while performing this operationvoid deleteActivities(PersonId personId, AppId appId, Set<String> activityIds, OpenSocialRequestContext token) throws ActivityServiceException
personId
- The person whose activity is being deleted.appId
- The app id for the gadget making this request.activityIds
- A list of activity ids to delete.token
- A valid SecurityToken.
ActivityServiceException
- if there is a problem while performing this operationActivity createActivity(PersonId personId, AppId appId, Activity activity, OpenSocialRequestContext requestContext) throws ActivityServiceException
createActivity
is called,
getActivities
will be able to return the Activity.
personId
- The id of the person to create an activity for.appId
- The app id for the gadget making this request.activity
- The activity to create.requestContext
- The request context
ActivityServiceException
- 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 |