Search in sources :

Example 6 with AggregationInterval

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

the class JpaTabRenderAggregationDaoTest method createAggregations.

@Override
protected Map<TabRenderAggregationKey, TabRenderAggregationImpl> createAggregations(AggregationIntervalInfo intervalInfo, AggregatedGroupMapping aggregatedGroup) {
    final DateDimension dateDimension = intervalInfo.getDateDimension();
    final TimeDimension timeDimension = intervalInfo.getTimeDimension();
    final AggregationInterval aggregationInterval = intervalInfo.getAggregationInterval();
    final AggregatedTabMapping mappedTab = this.aggregatedTabLookupDao.getMappedTabForLayoutId("u1l1n1");
    final TabRenderAggregationKeyImpl key = new TabRenderAggregationKeyImpl(dateDimension, timeDimension, aggregationInterval, aggregatedGroup, mappedTab);
    final TabRenderAggregationImpl aggr = renderAggregationDao.createAggregation(key);
    return Collections.<TabRenderAggregationKey, TabRenderAggregationImpl>singletonMap(key, aggr);
}
Also used : TimeDimension(org.apereo.portal.events.aggr.TimeDimension) DateDimension(org.apereo.portal.events.aggr.DateDimension) AggregationInterval(org.apereo.portal.events.aggr.AggregationInterval) AggregatedTabMapping(org.apereo.portal.events.aggr.tabs.AggregatedTabMapping)

Example 7 with AggregationInterval

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

the class LoginTotalsStatisticsController method createAggregationsQueryKeyset.

@Override
protected Set<LoginAggregationKey> createAggregationsQueryKeyset(Set<LoginAggregationDiscriminator> discriminators, LoginReportForm form) {
    AggregatedGroupMapping groupToUse = discriminators.iterator().next().getAggregatedGroup();
    final AggregationInterval interval = form.getInterval();
    final HashSet<LoginAggregationKey> keys = new HashSet<LoginAggregationKey>();
    keys.add(new LoginAggregationKeyImpl(interval, groupToUse));
    return keys;
}
Also used : LoginAggregationKey(org.apereo.portal.events.aggr.login.LoginAggregationKey) AggregatedGroupMapping(org.apereo.portal.events.aggr.groups.AggregatedGroupMapping) LoginAggregationKeyImpl(org.apereo.portal.events.aggr.login.LoginAggregationKeyImpl) AggregationInterval(org.apereo.portal.events.aggr.AggregationInterval) HashSet(java.util.HashSet)

Example 8 with AggregationInterval

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

the class JpaLoginAggregationDao method createAggregationInstance.

@Override
protected LoginAggregationImpl createAggregationInstance(LoginAggregationKey key) {
    final TimeDimension timeDimension = key.getTimeDimension();
    final DateDimension dateDimension = key.getDateDimension();
    final AggregationInterval interval = key.getInterval();
    final AggregatedGroupMapping aggregatedGroup = key.getAggregatedGroup();
    return new LoginAggregationImpl(timeDimension, dateDimension, interval, aggregatedGroup);
}
Also used : AggregatedGroupMapping(org.apereo.portal.events.aggr.groups.AggregatedGroupMapping) TimeDimension(org.apereo.portal.events.aggr.TimeDimension) DateDimension(org.apereo.portal.events.aggr.DateDimension) AggregationInterval(org.apereo.portal.events.aggr.AggregationInterval)

Example 9 with AggregationInterval

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

the class JpaPortletExecutionAggregationDao method createAggregationInstance.

@Override
protected PortletExecutionAggregationImpl createAggregationInstance(PortletExecutionAggregationKey key) {
    final TimeDimension timeDimension = key.getTimeDimension();
    final DateDimension dateDimension = key.getDateDimension();
    final AggregationInterval interval = key.getInterval();
    final AggregatedGroupMapping aggregatedGroup = key.getAggregatedGroup();
    final AggregatedPortletMapping portletMapping = key.getPortletMapping();
    final ExecutionType executionType = key.getExecutionType();
    return new PortletExecutionAggregationImpl(timeDimension, dateDimension, interval, aggregatedGroup, portletMapping, executionType);
}
Also used : AggregatedGroupMapping(org.apereo.portal.events.aggr.groups.AggregatedGroupMapping) ExecutionType(org.apereo.portal.events.aggr.portletexec.PortletExecutionAggregationKey.ExecutionType) AggregatedPortletMapping(org.apereo.portal.events.aggr.portlets.AggregatedPortletMapping) TimeDimension(org.apereo.portal.events.aggr.TimeDimension) DateDimension(org.apereo.portal.events.aggr.DateDimension) AggregationInterval(org.apereo.portal.events.aggr.AggregationInterval)

Example 10 with AggregationInterval

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

the class PortletExecutionAggregator method createAggregationKey.

@Override
protected PortletExecutionAggregationKey createAggregationKey(PortletExecutionEvent e, EventAggregationContext eventAggregationContext, AggregationIntervalInfo intervalInfo, AggregatedGroupMapping aggregatedGroup) {
    final TimeDimension timeDimension = intervalInfo.getTimeDimension();
    final DateDimension dateDimension = intervalInfo.getDateDimension();
    final AggregationInterval aggregationInterval = intervalInfo.getAggregationInterval();
    Map<String, AggregatedPortletMapping> mappedPortlets = eventAggregationContext.getAttribute(MAPPED_PORTLETS_CACHE_KEY);
    if (mappedPortlets == null) {
        mappedPortlets = new HashMap<String, AggregatedPortletMapping>();
        eventAggregationContext.setAttribute(MAPPED_PORTLETS_CACHE_KEY, mappedPortlets);
    }
    final String fname = e.getFname();
    AggregatedPortletMapping mappedPortlet = mappedPortlets.get(fname);
    if (mappedPortlet == null) {
        mappedPortlet = this.aggregatedPortletLookupDao.getMappedPortletForFname(fname);
        mappedPortlets.put(fname, mappedPortlet);
    }
    return new PortletExecutionAggregationKeyImpl(dateDimension, timeDimension, aggregationInterval, aggregatedGroup, mappedPortlet, executionType);
}
Also used : AggregatedPortletMapping(org.apereo.portal.events.aggr.portlets.AggregatedPortletMapping) TimeDimension(org.apereo.portal.events.aggr.TimeDimension) DateDimension(org.apereo.portal.events.aggr.DateDimension) AggregationInterval(org.apereo.portal.events.aggr.AggregationInterval)

Aggregations

AggregationInterval (org.apereo.portal.events.aggr.AggregationInterval)30 DateDimension (org.apereo.portal.events.aggr.DateDimension)20 TimeDimension (org.apereo.portal.events.aggr.TimeDimension)20 AggregatedGroupMapping (org.apereo.portal.events.aggr.groups.AggregatedGroupMapping)10 HashSet (java.util.HashSet)6 AggregatedPortletMapping (org.apereo.portal.events.aggr.portlets.AggregatedPortletMapping)6 AggregatedTabMapping (org.apereo.portal.events.aggr.tabs.AggregatedTabMapping)4 DateMidnight (org.joda.time.DateMidnight)4 AcademicTermDetail (org.apereo.portal.events.aggr.AcademicTermDetail)2 AggregatedGroupConfig (org.apereo.portal.events.aggr.AggregatedGroupConfig)2 AggregatedIntervalConfig (org.apereo.portal.events.aggr.AggregatedIntervalConfig)2 QuarterDetail (org.apereo.portal.events.aggr.QuarterDetail)2 ConcurrentUserAggregationKey (org.apereo.portal.events.aggr.concuser.ConcurrentUserAggregationKey)2 ConcurrentUserAggregationKeyImpl (org.apereo.portal.events.aggr.concuser.ConcurrentUserAggregationKeyImpl)2 LoginAggregationKey (org.apereo.portal.events.aggr.login.LoginAggregationKey)2 LoginAggregationKeyImpl (org.apereo.portal.events.aggr.login.LoginAggregationKeyImpl)2 DateTime (org.joda.time.DateTime)2 PeekingIterator (com.google.common.collect.PeekingIterator)1 ColumnDescription (com.google.visualization.datasource.datatable.ColumnDescription)1 DataTable (com.google.visualization.datasource.datatable.DataTable)1