Search in sources :

Example 11 with TimeDimension

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);
}
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 12 with TimeDimension

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;
}
Also used : TimeDimension(org.apereo.portal.events.aggr.TimeDimension)

Example 13 with TimeDimension

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

the class JpaLoginAggregationDaoTest method createAggregationKey.

@Override
protected LoginAggregationKey createAggregationKey(AggregationIntervalInfo intervalInfo, AggregatedGroupMapping aggregatedGroup) {
    final DateDimension dateDimension = intervalInfo.getDateDimension();
    final TimeDimension timeDimension = intervalInfo.getTimeDimension();
    final AggregationInterval aggregationInterval = intervalInfo.getAggregationInterval();
    return new LoginAggregationKeyImpl(dateDimension, timeDimension, aggregationInterval, aggregatedGroup);
}
Also used : TimeDimension(org.apereo.portal.events.aggr.TimeDimension) DateDimension(org.apereo.portal.events.aggr.DateDimension) AggregationInterval(org.apereo.portal.events.aggr.AggregationInterval)

Example 14 with TimeDimension

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

the class JpaTabRenderAggregationDaoTest method createAggregationKey.

@Override
protected TabRenderAggregationKey createAggregationKey(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");
    return new TabRenderAggregationKeyImpl(dateDimension, timeDimension, aggregationInterval, aggregatedGroup, mappedTab);
}
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 15 with TimeDimension

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

the class JpaSearchRequestAggregationDao method createAggregationInstance.

@Override
protected SearchRequestAggregationImpl createAggregationInstance(SearchRequestAggregationKey key) {
    final TimeDimension timeDimension = key.getTimeDimension();
    final DateDimension dateDimension = key.getDateDimension();
    final AggregationInterval interval = key.getInterval();
    final AggregatedGroupMapping aggregatedGroup = key.getAggregatedGroup();
    final String searchTerm = key.getSearchTerm();
    return new SearchRequestAggregationImpl(timeDimension, dateDimension, interval, aggregatedGroup, searchTerm);
}
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)

Aggregations

TimeDimension (org.apereo.portal.events.aggr.TimeDimension)21 AggregationInterval (org.apereo.portal.events.aggr.AggregationInterval)20 DateDimension (org.apereo.portal.events.aggr.DateDimension)20 AggregatedGroupMapping (org.apereo.portal.events.aggr.groups.AggregatedGroupMapping)6 AggregatedPortletMapping (org.apereo.portal.events.aggr.portlets.AggregatedPortletMapping)6 AggregatedTabMapping (org.apereo.portal.events.aggr.tabs.AggregatedTabMapping)4 ExecutionType (org.apereo.portal.events.aggr.portletexec.PortletExecutionAggregationKey.ExecutionType)1