protected PortletWindowData getOrCreateDefaultPortletWindowData( HttpServletRequest request, IPortletEntityId portletEntityId, IPortletWindowId portletWindowId, IPortletWindowId delegationParentId) { // Sync on session map to make sure duplicate PortletWindowData is never created final PortletWindowCache<PortletWindowData> portletWindowDataMap = getPortletWindowDataMap(request); // Check if there portlet window data cached in the session PortletWindowData portletWindowData = portletWindowDataMap.getWindow(portletWindowId); if (portletWindowData != null) { logger.trace( "Found PortletWindowData {} in session cache", portletWindowData.getPortletWindowId()); return portletWindowData; } // Create new window data for and initialize portletWindowData = new PortletWindowData(portletWindowId, portletEntityId, delegationParentId); this.initializePortletWindowData(request, portletWindowData); // Store in the session cache portletWindowData = portletWindowDataMap.storeIfAbsentWindow(portletWindowData); logger.trace( "Created PortletWindowData {} and stored session cache, wrapping as IPortletWindow and returning", portletWindowData.getPortletWindowId()); return portletWindowData; }
protected PortletWindowData getOrCreateDefaultPortletWindowData( HttpServletRequest request, IPortletEntityId portletEntityId, IPortletWindowId portletWindowId, IPortletWindowId delegationParentId) { // Sync on session map to make sure duplicate PortletWindowData is never created final PortletWindowCache<PortletWindowData> portletWindowDataMap = getPortletWindowDataMap(request); // Check if there portlet window data cached in the session PortletWindowData portletWindowData = portletWindowDataMap.getWindow(portletWindowId); if (portletWindowData != null) { logger.trace( "Found PortletWindowData {} in session cache", portletWindowData.getPortletWindowId()); return portletWindowData; } // Create new window data for and initialize portletWindowData = new PortletWindowData(portletWindowId, portletEntityId, delegationParentId); this.initializePortletWindowData(request, portletWindowData); // Store in the session cache portletWindowData = portletWindowDataMap.storeIfAbsentWindow(portletWindowData); logger.trace( "Created PortletWindowData {} and stored session cache, wrapping as IPortletWindow and returning", portletWindowData.getPortletWindowId()); return portletWindowData; }