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, unregisterExtension
public 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)
ActivityStreamService
ActivityStreamFilter
referenced by filterId
.query
in interface ActivityStreamService
filterId
- the id of the ActivityStreamFilter
to use.parameters
- this query parameters.public ActivitiesList query(String filterId, Map<String,Serializable> parameters, long offset, long limit)
ActivityStreamService
ActivityStreamFilter
referenced by filterId
.query
in interface ActivityStreamService
filterId
- 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)
ActivityStreamService
Activity
.addActivity
in interface ActivityStreamService
public void removeActivities(Collection<Activity> activities)
ActivityStreamService
activities
.removeActivities
in interface ActivityStreamService
public ActivityMessage toActivityMessage(Activity activity, Locale locale)
ActivityStreamService
toActivityMessage
in interface ActivityStreamService
public ActivityMessage toActivityMessage(Activity activity, Locale locale, String activityLinkBuilderName)
ActivityStreamService
toActivityMessage
in interface ActivityStreamService
public ActivityLinkBuilder getActivityLinkBuilder(String name)
ActivityStreamService
ActivityLinkBuilder
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 ActivityStreamService
public ActivityReplyMessage toActivityReplyMessage(ActivityReply activityReply, Locale locale)
ActivityStreamService
toActivityReplyMessage
in interface ActivityStreamService
public ActivityReplyMessage toActivityReplyMessage(ActivityReply activityReply, Locale locale, String activityLinkBuilderName)
ActivityStreamService
toActivityReplyMessage
in interface ActivityStreamService
public ActivityStream getActivityStream(String name)
ActivityStreamService
getActivityStream
in interface ActivityStreamService
public ActivityReply addActivityReply(Serializable activityId, ActivityReply activityReply)
ActivityStreamService
addActivityReply
in interface ActivityStreamService
activityReply
public Activity getActivity(Serializable activityId)
getActivity
in interface ActivityStreamService
public ActivitiesList getActivities(Collection<Serializable> activityIds)
getActivities
in interface ActivityStreamService
public ActivityReply removeActivityReply(Serializable activityId, String activityReplyId)
ActivityStreamService
removeActivityReply
in interface ActivityStreamService
ActivityReply
if any, null
otherwisepublic EntityManager getEntityManager()
public PersistenceProvider getOrCreatePersistenceProvider()
public void activate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void deactivate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
registerContribution
in class DefaultComponent
Exception
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
unregisterContribution
in class DefaultComponent
Exception
Copyright © 2013 Nuxeo SA. All Rights Reserved.