public class ActivityStreamServiceImpl extends DefaultComponent implements ActivityStreamService
ActivityStreamService.| Modifier and Type | Field and Description |
|---|---|
static String |
ACTIVITIES_PROVIDER |
static String |
ACTIVITY_LINK_BUILDERS_EP |
static String |
ACTIVITY_MESSAGE_LABELS_EP
Deprecated.
since 5.6. Use
ACTIVITY_VERBS_EP. |
static String |
ACTIVITY_STREAM_FILTER_EP |
static String |
ACTIVITY_STREAMS_EP |
static String |
ACTIVITY_UPGRADERS_EP |
static String |
ACTIVITY_VERBS_EP |
ALL_ACTIVITIES| Constructor and Description |
|---|
ActivityStreamServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(ComponentContext context)
Activates the component.
|
Activity |
addActivity(Activity activity)
Add and store a new
Activity. |
ActivityReply |
addActivityReply(Serializable activityId,
ActivityReply activityReply)
|
void |
deactivate(ComponentContext context)
Deactivates the component.
|
ActivitiesList |
getActivities(Collection<Serializable> activityIds) |
Activity |
getActivity(Serializable activityId) |
ActivityLinkBuilder |
getActivityLinkBuilder(String name)
Returns the
ActivityLinkBuilder with the given name. |
ActivityStream |
getActivityStream(String name)
|
EntityManager |
getEntityManager() |
PersistenceProvider |
getOrCreatePersistenceProvider() |
ActivitiesList |
query(String filterId,
Map<String,Serializable> parameters)
Returns the list of activities filtered by the given parameters using the
ActivityStreamFilter referenced by filterId. |
ActivitiesList |
query(String filterId,
Map<String,Serializable> parameters,
long offset,
long limit)
Returns the list of activities filtered by the given parameters using the
ActivityStreamFilter referenced by filterId. |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
removeActivities(Collection<Activity> activities)
Remove the given
activities. |
ActivityReply |
removeActivityReply(Serializable activityId,
String activityReplyId)
|
ActivityMessage |
toActivityMessage(Activity activity,
Locale locale)
|
ActivityMessage |
toActivityMessage(Activity activity,
Locale locale,
String activityLinkBuilderName)
|
ActivityReplyMessage |
toActivityReplyMessage(ActivityReply activityReply,
Locale locale)
|
ActivityReplyMessage |
toActivityReplyMessage(ActivityReply activityReply,
Locale locale,
String activityLinkBuilderName)
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
upgradeActivities() |
applicationStarted, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, unregisterExtensionpublic static final String ACTIVITIES_PROVIDER
public static final String ACTIVITY_STREAM_FILTER_EP
@Deprecated public static final String ACTIVITY_MESSAGE_LABELS_EP
ACTIVITY_VERBS_EP.public static final String ACTIVITY_STREAMS_EP
public static final String ACTIVITY_VERBS_EP
public static final String ACTIVITY_LINK_BUILDERS_EP
public static final String ACTIVITY_UPGRADERS_EP
public void upgradeActivities()
public ActivitiesList query(String filterId, Map<String,Serializable> parameters)
ActivityStreamServiceActivityStreamFilter referenced by filterId.query in interface ActivityStreamServicefilterId - the id of the ActivityStreamFilter to use.parameters - this query parameters.public ActivitiesList query(String filterId, Map<String,Serializable> parameters, long offset, long limit)
ActivityStreamServiceActivityStreamFilter referenced by filterId.query in interface ActivityStreamServicefilterId - the id of the ActivityStreamFilter to use.parameters - this query parameters.offset - the offset (starting at 0) into the list of activities.limit - the maximum number of activities to retrieve, or 0 for all
of them.public Activity addActivity(Activity activity)
ActivityStreamServiceActivity.addActivity in interface ActivityStreamServicepublic void removeActivities(Collection<Activity> activities)
ActivityStreamServiceactivities.removeActivities in interface ActivityStreamServicepublic ActivityMessage toActivityMessage(Activity activity, Locale locale)
ActivityStreamServicetoActivityMessage in interface ActivityStreamServicepublic ActivityMessage toActivityMessage(Activity activity, Locale locale, String activityLinkBuilderName)
ActivityStreamServicetoActivityMessage in interface ActivityStreamServicepublic ActivityLinkBuilder getActivityLinkBuilder(String name)
ActivityStreamServiceActivityLinkBuilder with the given name.
If name is null, or if the ActivityLinkBuilder
does not exist, fallback on the default one if any.
getActivityLinkBuilder in interface ActivityStreamServicepublic ActivityReplyMessage toActivityReplyMessage(ActivityReply activityReply, Locale locale)
ActivityStreamServicetoActivityReplyMessage in interface ActivityStreamServicepublic ActivityReplyMessage toActivityReplyMessage(ActivityReply activityReply, Locale locale, String activityLinkBuilderName)
ActivityStreamServicetoActivityReplyMessage in interface ActivityStreamServicepublic ActivityStream getActivityStream(String name)
ActivityStreamServicegetActivityStream in interface ActivityStreamServicepublic ActivityReply addActivityReply(Serializable activityId, ActivityReply activityReply)
ActivityStreamServiceaddActivityReply in interface ActivityStreamServiceactivityReplypublic Activity getActivity(Serializable activityId)
getActivity in interface ActivityStreamServicepublic ActivitiesList getActivities(Collection<Serializable> activityIds)
getActivities in interface ActivityStreamServicepublic ActivityReply removeActivityReply(Serializable activityId, String activityReplyId)
ActivityStreamServiceremoveActivityReply in interface ActivityStreamServiceActivityReply if any, null otherwisepublic EntityManager getEntityManager()
public PersistenceProvider getOrCreatePersistenceProvider()
public void activate(ComponentContext context) throws Exception
ComponentThis method is called by the runtime when a component is activated.
activate in interface Componentactivate in class DefaultComponentcontext - the runtime contextException - if an error occurs during activationpublic void deactivate(ComponentContext context) throws Exception
ComponentThis method is called by the runtime when a component is deactivated.
deactivate in interface Componentdeactivate in class DefaultComponentcontext - the runtime contextException - if an error occurs during activationpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
registerContribution in class DefaultComponentExceptionpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
unregisterContribution in class DefaultComponentExceptionCopyright © 2013 Nuxeo SA. All Rights Reserved.