Search in sources :

Example 1 with PortletLayoutAggregationDiscriminator

use of org.apereo.portal.events.aggr.portletlayout.PortletLayoutAggregationDiscriminator in project uPortal by Jasig.

the class BasePortletLayoutStatisticsController method createColumnDiscriminatorMap.

protected Map<PortletLayoutAggregationDiscriminator, SortedSet<PortletLayoutAggregation>> createColumnDiscriminatorMap(F form) {
    //Collections used to track the queried groups and the results
    final Map<PortletLayoutAggregationDiscriminator, SortedSet<PortletLayoutAggregation>> groupedAggregations = new TreeMap<PortletLayoutAggregationDiscriminator, SortedSet<PortletLayoutAggregation>>(PortletLayoutAggregationDiscriminatorImpl.Comparator.INSTANCE);
    //Get concrete group mapping objects that are being queried for
    List<Long> groups = form.getGroups();
    Set<String> portletFNames = form.getPortlets();
    for (final Long queryGroupId : groups) {
        AggregatedGroupMapping groupMapping = this.aggregatedGroupLookupDao.getGroupMapping(queryGroupId);
        for (final String portletFName : portletFNames) {
            AggregatedPortletMapping tabMapping = this.aggregatedPortletLookupDao.getMappedPortletForFname(portletFName);
            final PortletLayoutAggregationDiscriminator mapping = new PortletLayoutAggregationDiscriminatorImpl(groupMapping, tabMapping);
            //Create the set the aggregations for this report column will be stored in, sorted chronologically
            final SortedSet<PortletLayoutAggregation> aggregations = new TreeSet<PortletLayoutAggregation>(BaseAggregationDateTimeComparator.INSTANCE);
            //Map the group to the set
            groupedAggregations.put(mapping, aggregations);
        }
    }
    return groupedAggregations;
}
Also used : PortletLayoutAggregationDiscriminator(org.apereo.portal.events.aggr.portletlayout.PortletLayoutAggregationDiscriminator) PortletLayoutAggregation(org.apereo.portal.events.aggr.portletlayout.PortletLayoutAggregation) AggregatedPortletMapping(org.apereo.portal.events.aggr.portlets.AggregatedPortletMapping) TreeMap(java.util.TreeMap) SortedSet(java.util.SortedSet) AggregatedGroupMapping(org.apereo.portal.events.aggr.groups.AggregatedGroupMapping) TreeSet(java.util.TreeSet) PortletLayoutAggregationDiscriminatorImpl(org.apereo.portal.events.aggr.portletlayout.PortletLayoutAggregationDiscriminatorImpl)

Example 2 with PortletLayoutAggregationDiscriminator

use of org.apereo.portal.events.aggr.portletlayout.PortletLayoutAggregationDiscriminator in project uPortal by Jasig.

the class BasePortletLayoutStatisticsController method createAggregationsQueryKeyset.

@Override
protected Set<PortletLayoutAggregationKey> createAggregationsQueryKeyset(Set<PortletLayoutAggregationDiscriminator> columnDiscriminators, F 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<PortletLayoutAggregationKey> keys = new HashSet<PortletLayoutAggregationKey>();
    for (PortletLayoutAggregationDiscriminator discriminator : columnDiscriminators) {
        keys.add(new PortletLayoutAggregationKeyImpl(interval, discriminator.getAggregatedGroup(), discriminator.getPortletMapping()));
    }
    return keys;
}
Also used : PortletLayoutAggregationDiscriminator(org.apereo.portal.events.aggr.portletlayout.PortletLayoutAggregationDiscriminator) PortletLayoutAggregationKeyImpl(org.apereo.portal.events.aggr.portletlayout.PortletLayoutAggregationKeyImpl) AggregationInterval(org.apereo.portal.events.aggr.AggregationInterval) HashSet(java.util.HashSet) PortletLayoutAggregationKey(org.apereo.portal.events.aggr.portletlayout.PortletLayoutAggregationKey)

Aggregations

PortletLayoutAggregationDiscriminator (org.apereo.portal.events.aggr.portletlayout.PortletLayoutAggregationDiscriminator)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 PortletLayoutAggregation (org.apereo.portal.events.aggr.portletlayout.PortletLayoutAggregation)1 PortletLayoutAggregationDiscriminatorImpl (org.apereo.portal.events.aggr.portletlayout.PortletLayoutAggregationDiscriminatorImpl)1 PortletLayoutAggregationKey (org.apereo.portal.events.aggr.portletlayout.PortletLayoutAggregationKey)1 PortletLayoutAggregationKeyImpl (org.apereo.portal.events.aggr.portletlayout.PortletLayoutAggregationKeyImpl)1 AggregatedPortletMapping (org.apereo.portal.events.aggr.portlets.AggregatedPortletMapping)1