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);
}
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;
}
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);
}
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);
}
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);
}
Aggregations