public class ActivityStreamServiceImpl extends DefaultComponent implements ActivityStreamService
ActivityStreamService
.Modifier and Type | Field and Description |
---|---|
static String |
ACTIVITIES_PROVIDER |
static String |
ACTIVITY_MESSAGE_LABELS_EP |
static String |
ACTIVITY_STREAM_FILTER_EP |
static String |
ACTIVITY_STREAMS_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 . |
void |
deactivate(ComponentContext context)
Deactivates the component.
|
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<Serializable> activityIds)
Remove the Activities referenced by the given
activityIds . |
ActivityMessage |
toActivityMessage(Activity activity,
Locale locale)
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
applicationStarted, getAdapter, registerExtension, unregisterExtension
public static final String ACTIVITIES_PROVIDER
public static final String ACTIVITY_STREAM_FILTER_EP
public static final String ACTIVITY_MESSAGE_LABELS_EP
public static final String ACTIVITY_STREAMS_EP
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<Serializable> activityIds)
ActivityStreamService
activityIds
.removeActivities
in interface ActivityStreamService
public ActivityMessage toActivityMessage(Activity activity, Locale locale)
ActivityStreamService
toActivityMessage
in interface ActivityStreamService
public ActivityStream getActivityStream(String name)
ActivityStreamService
getActivityStream
in interface ActivityStreamService
public 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 © 2011 Nuxeo SA. All Rights Reserved.