Search in sources :

Example 1 with TabRenderAggregationDiscriminator

use of org.apereo.portal.events.aggr.tabrender.TabRenderAggregationDiscriminator 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)

Example 2 with TabRenderAggregationDiscriminator

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

the class TabRenderStatisticsController method createAggregationsQueryKeyset.

@Override
protected Set<TabRenderAggregationKey> createAggregationsQueryKeyset(Set<TabRenderAggregationDiscriminator> columnDiscriminators, TabRenderReportForm form) {
    // Create keys (that exclude the temporal date/time information) from the interval
    // and the data in the column discriminators.
    final AggregationInterval interval = form.getInterval();
    final HashSet<TabRenderAggregationKey> keys = new HashSet<TabRenderAggregationKey>();
    for (TabRenderAggregationDiscriminator discriminator : columnDiscriminators) {
        keys.add(new TabRenderAggregationKeyImpl(interval, discriminator.getAggregatedGroup(), discriminator.getTabMapping()));
    }
    return keys;
}
Also used : TabRenderAggregationDiscriminator(org.apereo.portal.events.aggr.tabrender.TabRenderAggregationDiscriminator) AggregationInterval(org.apereo.portal.events.aggr.AggregationInterval) TabRenderAggregationKeyImpl(org.apereo.portal.events.aggr.tabrender.TabRenderAggregationKeyImpl) HashSet(java.util.HashSet) TabRenderAggregationKey(org.apereo.portal.events.aggr.tabrender.TabRenderAggregationKey)

Aggregations

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