org.sakaiproject.sitestats.impl.event
Class EventUtil

java.lang.Object
  extended by org.sakaiproject.sitestats.impl.event.EventUtil

public class EventUtil
extends Object


Constructor Summary
EventUtil()
           
 
Method Summary
static List<ToolInfo> addMissingAdditionalToolIds(List<ToolInfo> eventRegistrySubset, List<ToolInfo> fullEventRegistry)
          Add missing events not in list (eg, list from Preferences) but present on the full Event Registry.
static List<ToolInfo> addToEventRegistry(List<ToolInfo> additions, boolean replaceEventsForTool, List<ToolInfo> eventRegistry)
          Add custom additions to Event Registry.
static List<ToolInfo> getIntersectionWithAvailableToolsInSakaiInstallation(org.sakaiproject.tool.api.ToolManager M_tm, List<ToolInfo> eventRegistrySubset)
          Intersect an event registry with tools available in (whole) Sakai installation.
static List<ToolInfo> getIntersectionWithAvailableToolsInSite(org.sakaiproject.site.api.SiteService M_ss, List<ToolInfo> eventRegistrySubset, String siteId)
          Intersect an event registry subset with tools available in site.
static List<ToolInfo> getUnionWithAllDefaultToolEvents(List<ToolInfo> eventRegistrySubset, List<ToolInfo> fullEventRegistry)
          Union between a given event registry with the full Event Registry.
static List<ToolInfo> removeFromEventRegistry(List<ToolInfo> removals, List<ToolInfo> eventRegistry)
          Remove specified custom additions from Event Registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventUtil

public EventUtil()
Method Detail

addMissingAdditionalToolIds

public static List<ToolInfo> addMissingAdditionalToolIds(List<ToolInfo> eventRegistrySubset,
                                                         List<ToolInfo> fullEventRegistry)
Add missing events not in list (eg, list from Preferences) but present on the full Event Registry.

Parameters:
list - n Event Registry subset
Returns:
The Event Registry with additional tool ids.

getIntersectionWithAvailableToolsInSite

public static List<ToolInfo> getIntersectionWithAvailableToolsInSite(org.sakaiproject.site.api.SiteService M_ss,
                                                                     List<ToolInfo> eventRegistrySubset,
                                                                     String siteId)
Intersect an event registry subset with tools available in site.

Parameters:
eventRegistrySubset - An Event Registry subset to intersect with.
siteId - The id of the site.
Returns:
The Event Registry containing events for tools present in site.

getIntersectionWithAvailableToolsInSakaiInstallation

public static List<ToolInfo> getIntersectionWithAvailableToolsInSakaiInstallation(org.sakaiproject.tool.api.ToolManager M_tm,
                                                                                  List<ToolInfo> eventRegistrySubset)
Intersect an event registry with tools available in (whole) Sakai installation.

Parameters:
eventRegistrySubset - The Event Registry to intersect with.
siteId - The id of the site.
Returns:
The Event Registry containing events for tools present in (whole) Sakai installation.

getUnionWithAllDefaultToolEvents

public static List<ToolInfo> getUnionWithAllDefaultToolEvents(List<ToolInfo> eventRegistrySubset,
                                                              List<ToolInfo> fullEventRegistry)
Union between a given event registry with the full Event Registry.

Parameters:
eventRegistrySubset - The Event Registry to union with.
fullEventRegistry - The full Event Registry.
siteId - The id of the site.
Returns:
The Event Registry containing events for tools present in (whole) Sakai installation.

addToEventRegistry

public static List<ToolInfo> addToEventRegistry(List<ToolInfo> additions,
                                                boolean replaceEventsForTool,
                                                List<ToolInfo> eventRegistry)
Add custom additions to Event Registry.

Parameters:
additions - Custom Event Registry additions.
replaceEventsForTool - If tool exists in full Event Registry, replace its events with the ones in additions.
eventRegistry - The full Event Registry.

removeFromEventRegistry

public static List<ToolInfo> removeFromEventRegistry(List<ToolInfo> removals,
                                                     List<ToolInfo> eventRegistry)
Remove specified custom additions from Event Registry.

Parameters:
additions - Custom Event Registry removals.
eventRegistry - The full Event Registry.


Copyright © 2006-2012 Universidade Fernando Pessoa. All Rights Reserved.