use of org.apereo.portal.events.aggr.TimeDimension in project uPortal by Jasig.
the class JpaTimeDimensionDao method createTimeDimension.
@Override
@AggrEventsTransactional
public TimeDimension createTimeDimension(LocalTime time) {
final TimeDimension timeDimension = new TimeDimensionImpl(time);
this.getEntityManager().persist(timeDimension);
return timeDimension;
}
use of org.apereo.portal.events.aggr.TimeDimension 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.TimeDimension in project uPortal by Jasig.
the class TabRenderAggregator method createAggregationKey.
@Override
protected TabRenderAggregationKey createAggregationKey(PortalRenderEvent e, EventAggregationContext eventAggregationContext, AggregationIntervalInfo intervalInfo, AggregatedGroupMapping aggregatedGroup) {
final TimeDimension timeDimension = intervalInfo.getTimeDimension();
final DateDimension dateDimension = intervalInfo.getDateDimension();
final AggregationInterval aggregationInterval = intervalInfo.getAggregationInterval();
Map<String, AggregatedTabMapping> mappedTabs = eventAggregationContext.getAttribute(MAPPED_TABS_CACHE_KEY);
if (mappedTabs == null) {
mappedTabs = new HashMap<String, AggregatedTabMapping>();
eventAggregationContext.setAttribute(MAPPED_TABS_CACHE_KEY, mappedTabs);
}
final String targetedLayoutNodeId = e.getTargetedLayoutNodeId();
AggregatedTabMapping mappedTab = mappedTabs.get(targetedLayoutNodeId);
if (mappedTab == null) {
mappedTab = this.aggregatedTabLookupDao.getMappedTabForLayoutId(targetedLayoutNodeId);
mappedTabs.put(targetedLayoutNodeId, mappedTab);
}
return new TabRenderAggregationKeyImpl(dateDimension, timeDimension, aggregationInterval, aggregatedGroup, mappedTab);
}
use of org.apereo.portal.events.aggr.TimeDimension in project uPortal by Jasig.
the class JpaTabRenderAggregationDao method createAggregationInstance.
@Override
protected TabRenderAggregationImpl createAggregationInstance(TabRenderAggregationKey key) {
final TimeDimension timeDimension = key.getTimeDimension();
final DateDimension dateDimension = key.getDateDimension();
final AggregationInterval interval = key.getInterval();
final AggregatedGroupMapping aggregatedGroup = key.getAggregatedGroup();
final AggregatedTabMapping tabMapping = key.getTabMapping();
return new TabRenderAggregationImpl(timeDimension, dateDimension, interval, aggregatedGroup, tabMapping);
}
use of org.apereo.portal.events.aggr.TimeDimension 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