|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.gadgets.refimpl.PluginSettingsActivityService
public class PluginSettingsActivityService
An ActivityService implementation that uses SAL's PluginSettings.
This class is safe to use concurrently from multiple threads. It is not, however, safe to use concurrently
across multiple clustered application instances, as there is no way to ensure that the PluginSettings
retrieval and update occurs atomically. Host applications that may be deployed in a clustered environment should be
sure to use their own ActivityService implementation.
| Field Summary | |
|---|---|
static String |
KEY_PREFIX
|
static String |
NEXT_ACTIVITY_ID_KEY
|
static String |
NO_USER_KEY
|
| Constructor Summary | |
|---|---|
PluginSettingsActivityService(com.atlassian.sal.api.pluginsettings.PluginSettingsFactory pluginSettingsFactory)
|
|
| 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 requestContext)
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> people,
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 |
static String |
getActivityId()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String KEY_PREFIX
public static final String NO_USER_KEY
public static final String NEXT_ACTIVITY_ID_KEY
| Constructor Detail |
|---|
public PluginSettingsActivityService(com.atlassian.sal.api.pluginsettings.PluginSettingsFactory pluginSettingsFactory)
| Method Detail |
|---|
public static String getActivityId()
public List<Activity> getActivities(Set<PersonId> people,
AppId appId,
OpenSocialRequestContext requestContext)
throws ActivityServiceException
ActivityService
getActivities in interface ActivityServicepeople - 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 operation
public List<Activity> getActivities(PersonId personId,
AppId appId,
Set<String> activityIds,
OpenSocialRequestContext requestContext)
throws ActivityServiceException
ActivityService
getActivities in interface ActivityServicepersonId - 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
public Activity getActivity(PersonId personId,
AppId appId,
String activityId,
OpenSocialRequestContext requestContext)
throws ActivityServiceException
ActivityService
getActivity in interface ActivityServicepersonId - 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 operation
public void deleteActivities(PersonId personId,
AppId appId,
Set<String> activityIds,
OpenSocialRequestContext requestContext)
throws ActivityServiceException
ActivityService
deleteActivities in interface ActivityServicepersonId - 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.requestContext - A valid SecurityToken.
ActivityServiceException - if there is a problem while performing this operation
public Activity createActivity(PersonId personId,
AppId appId,
Activity activity,
OpenSocialRequestContext requestContext)
throws ActivityServiceException
ActivityServicecreateActivity is called,
getActivities will be able to return the Activity.
createActivity in interface ActivityServicepersonId - 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 | |||||||||