Class ActivityStreamServiceComponent
java.lang.Object
org.ametys.plugins.workspaces.activities.activitystream.ActivityStreamServiceComponent
- All Implemented Interfaces:
Component,Contextualizable,Serviceable
public class ActivityStreamServiceComponent
extends Object
implements Serviceable, Component, Contextualizable
Component to return a map for action to get the activities for activity stream
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextualize(Context context) getActivityStream(int limit, boolean allActivities, boolean markAsRead) Get the activity stream of the current user.voidservice(ServiceManager manager)
-
Field Details
-
ROLE
The avalon role
-
-
Constructor Details
-
ActivityStreamServiceComponent
public ActivityStreamServiceComponent()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
getActivityStream
public Map<String,Object> getActivityStream(int limit, boolean allActivities, boolean markAsRead) throws UserPreferencesException Get the activity stream of the current user. In project context, only the activities of the current project are returned, unless allActivities is true.- Parameters:
limit- The max number of resultsallActivities- Set to true to force to get activities from all projects of the current user, even if we are in a project contextmarkAsRead- If true mark the activities as read- Returns:
- The activity stream
- Throws:
UserPreferencesException- If an error occurs while marking activities as read
-