Search in sources :

Example 1 with TabRenderAggregationDiscriminatorImpl

use of org.apereo.portal.events.aggr.tabrender.TabRenderAggregationDiscriminatorImpl in project uPortal by Jasig.

the class TabRenderStatisticsController method createColumnDiscriminatorMap.

protected Map<TabRenderAggregationDiscriminator, SortedSet<TabRenderAggregation>> createColumnDiscriminatorMap(TabRenderReportForm form) {
    //Collections used to track the queried groups and the results
    final Map<TabRenderAggregationDiscriminator, SortedSet<TabRenderAggregation>> groupedAggregations = new TreeMap<TabRenderAggregationDiscriminator, SortedSet<TabRenderAggregation>>(TabRenderAggregationDiscriminatorImpl.Comparator.INSTANCE);
    //Get concrete group mapping objects that are being queried for
    List<Long> groups = form.getGroups();
    List<Long> tabs = form.getTabs();
    for (final Long queryGroupId : groups) {
        AggregatedGroupMapping groupMapping = this.aggregatedGroupDao.getGroupMapping(queryGroupId);
        for (final Long tabId : tabs) {
            AggregatedTabMapping tabMapping = this.aggregatedTabLookupDao.getTabMapping(tabId);
            final TabRenderAggregationDiscriminator mapping = new TabRenderAggregationDiscriminatorImpl(groupMapping, tabMapping);
            //Create the set the aggregations for this report column will be stored in, sorted chronologically
            final SortedSet<TabRenderAggregation> aggregations = new TreeSet<TabRenderAggregation>(BaseAggregationDateTimeComparator.INSTANCE);
            //Map the group to the set
            groupedAggregations.put(mapping, aggregations);
        }
    }
    return groupedAggregations;
}
Also used : TabRenderAggregationDiscriminatorImpl(org.apereo.portal.events.aggr.tabrender.TabRenderAggregationDiscriminatorImpl) AggregatedGroupMapping(org.apereo.portal.events.aggr.groups.AggregatedGroupMapping) TabRenderAggregationDiscriminator(org.apereo.portal.events.aggr.tabrender.TabRenderAggregationDiscriminator) TabRenderAggregation(org.apereo.portal.events.aggr.tabrender.TabRenderAggregation) TreeSet(java.util.TreeSet) TreeMap(java.util.TreeMap) SortedSet(java.util.SortedSet) AggregatedTabMapping(org.apereo.portal.events.aggr.tabs.AggregatedTabMapping)

Aggregations

SortedSet (java.util.SortedSet)1 TreeMap (java.util.TreeMap)1 TreeSet (java.util.TreeSet)1 AggregatedGroupMapping (org.apereo.portal.events.aggr.groups.AggregatedGroupMapping)1 TabRenderAggregation (org.apereo.portal.events.aggr.tabrender.TabRenderAggregation)1 TabRenderAggregationDiscriminator (org.apereo.portal.events.aggr.tabrender.TabRenderAggregationDiscriminator)1 TabRenderAggregationDiscriminatorImpl (org.apereo.portal.events.aggr.tabrender.TabRenderAggregationDiscriminatorImpl)1 AggregatedTabMapping (org.apereo.portal.events.aggr.tabs.AggregatedTabMapping)1