Search in sources :

Example 6 with AggregatedTabMapping

use of org.apereo.portal.events.aggr.tabs.AggregatedTabMapping 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 7 with AggregatedTabMapping

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

the class PortletRenderEventConverter method getLrsObject.

@Override
protected LrsObject getLrsObject(PortalEvent event) {
    final String targetedLayoutNodeId = ((PortalRenderEvent) event).getTargetedLayoutNodeId();
    final AggregatedTabMapping aggregatedTabMapping = aggregatedTabLookupDao.getMappedTabForLayoutId(targetedLayoutNodeId);
    final Builder<String, LocalizedString> definitionBuilder = ImmutableMap.builder();
    definitionBuilder.put("name", new LocalizedString(Locale.US, aggregatedTabMapping.getDisplayString()));
    return new LrsObject(buildUrn("tab", aggregatedTabMapping.getFragmentName()), getDefaultObjectType(), definitionBuilder.build());
}
Also used : PortalRenderEvent(org.apereo.portal.events.PortalRenderEvent) LrsObject(org.apereo.portal.events.tincan.om.LrsObject) LocalizedString(org.apereo.portal.events.tincan.om.LocalizedString) LocalizedString(org.apereo.portal.events.tincan.om.LocalizedString) AggregatedTabMapping(org.apereo.portal.events.aggr.tabs.AggregatedTabMapping)

Aggregations

AggregatedTabMapping (org.apereo.portal.events.aggr.tabs.AggregatedTabMapping)7 AggregationInterval (org.apereo.portal.events.aggr.AggregationInterval)4 DateDimension (org.apereo.portal.events.aggr.DateDimension)4 TimeDimension (org.apereo.portal.events.aggr.TimeDimension)4 AggregatedGroupMapping (org.apereo.portal.events.aggr.groups.AggregatedGroupMapping)2 JsonParseException (com.fasterxml.jackson.core.JsonParseException)1 JsonMappingException (com.fasterxml.jackson.databind.JsonMappingException)1 IOException (java.io.IOException)1 HashMap (java.util.HashMap)1 SortedSet (java.util.SortedSet)1 TreeMap (java.util.TreeMap)1 TreeSet (java.util.TreeSet)1 PortalRenderEvent (org.apereo.portal.events.PortalRenderEvent)1 TabRenderAggregation (org.apereo.portal.events.aggr.tabrender.TabRenderAggregation)1 TabRenderAggregationDiscriminator (org.apereo.portal.events.aggr.tabrender.TabRenderAggregationDiscriminator)1 TabRenderAggregationDiscriminatorImpl (org.apereo.portal.events.aggr.tabrender.TabRenderAggregationDiscriminatorImpl)1 LocalizedString (org.apereo.portal.events.tincan.om.LocalizedString)1 LrsObject (org.apereo.portal.events.tincan.om.LrsObject)1 IPortalRequestInfo (org.apereo.portal.url.IPortalRequestInfo)1