Class ActivityStreamClientInteraction

java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.events.activitystream.ActivityStreamClientInteraction
All Implemented Interfaces:
LogEnabled, PluginAware, Component, Serviceable

Component gathering methods for the activity stream service
  • Field Details

    • ROLE

      public static final String ROLE
      The Avalon role
  • Constructor Details

  • Method Details

    • service

      public void service(ServiceManager serviceManager) throws ServiceException
      Specified by:
      service in interface Serviceable
      Throws:
      ServiceException
    • setPluginInfo

      public void setPluginInfo(String pluginName, String featureName, String id)
      Description copied from interface: PluginAware
      Sets the plugin info relative to the current component.
      Note : The feature name may be null if the targeted component in declared at plugin level.
      Specified by:
      setPluginInfo in interface PluginAware
      Parameters:
      pluginName - Unique identifier for the plugin hosting the extension
      featureName - Unique feature identifier (unique for a given pluginName)
      id - Unique identifier of this component
    • getProjectEvents

      public List<Map<String,Object>> getProjectEvents(String projectName, List<String> filterEventTypes, int limit)
      Get the events of the given project and of the given event types
      Parameters:
      projectName - the project's name
      filterEventTypes - the type of events to retain
      limit - The max number of events
      Returns:
      the retained events
    • getEvents

      public List<Map<String,Object>> getEvents(List<String> projectNames, List<String> filterEventTypes, int limit)
      Get the events of the given projects and of the given event types
      Parameters:
      projectNames - the names of the projects. Can not be null.
      filterEventTypes - the type of events to retain. Can be empty to get all events.
      limit - The max number of events
      Returns:
      the retained events
    • getDateOfLastEvent

      public ZonedDateTime getDateOfLastEvent(String projectName, List<String> excludeEventTypes)
      Get the date of last event regardless the current user's rights
      Parameters:
      projectName - The project's name
      excludeEventTypes - the types of event to ignore from this search
      Returns:
      the date of last event or null if no event found or an error occurred
    • getDateOfLastEventByEventType

      public ZonedDateTime getDateOfLastEventByEventType(String projectName, Collection<String> includeEventTypes)
      Get the date of last event regardless the current user's rights
      Parameters:
      projectName - The project's name
      includeEventTypes - the types of event to ignore from this search
      Returns:
      the date of last event or null if no event found or an error occurred
    • getAllowedEventTypes

      Get the allowed event types classified by categories
      Parameters:
      projectName - The project's name
      Returns:
      The allowed event types
    • getAllowedEventTypes

      public Set<String> getAllowedEventTypes(Set<Project> projects)
      Get the list of allowed event types for the given projects
      Parameters:
      projects - The projects
      Returns:
      The allowed event types
    • getEventsForCurrentUser

      Get the events for the current user with the allowed event types get into the user projects.
      Parameters:
      limit - The max number of results
      Returns:
      The events for the user projects
    • getEventsForCurrentUser

      public List<Map<String,Object>> getEventsForCurrentUser(Set<Project> projects, int limit)
      Get the events for the current user with the allowed event types get into the given projects.
      Parameters:
      projects - the projects
      limit - The max number of results
      Returns:
      The events for the user projects