code: @Override
      public IPortletWindow getPortletWindow(
              HttpServletRequest request, IPortletWindowId portletWindowId) {
          Validate.notNull(request, "request can not be null");
          Validate.notNull(portletWindowId, "portletWindowId can not be null");
  
          final PortletWindowCache<IPortletWindow> portletWindowMap = getPortletWindowMap(request);
  
          IPortletWindow portletWindow = portletWindowMap.getWindow(portletWindowId);
          if (portletWindow != null) {
              logger.trace(
                      "Found IPortletWindow {} in request cache", portletWindow.getPortletWindowId());
              return portletWindow;
          }
  
          final PortletWindowIdImpl localPortletWindowId =
                  this.convertPortletWindowId(request, portletWindowId);
  
          // Find the window data from the correct window data map
          final PortletWindowData portletWindowData;
          if (STATELESS_PORTLET_WINDOW_ID.equals(localPortletWindowId.getWindowInstanceId())) {
              final PortletWindowCache<PortletWindowData> statelessPortletWindowDataMap =
                      this.getStatelessPortletWindowDataMap(request);
              if (statelessPortletWindowDataMap != null) {
                  portletWindowData = statelessPortletWindowDataMap.getWindow(portletWindowId);
              } else {
                  portletWindowData = null;
              }
          } else {
              portletWindowData = this.getPortletWindowData(request, portletWindowId);
          }
  
          if (portletWindowData == null) {
              logger.trace("No IPortletWindow {} exists, returning null", portletWindowId);
              return null;
          }
  
          portletWindow = this.wrapPortletWindowData(request, portletWindowData);
  
          // Cache the wrapped window in the request
          return portletWindowMap.storeIfAbsentWindow(portletWindow);
      }
docs: /* (non-Javadoc)
  @see org.apereo.portal.portlet.registry.IPortletWindowRegistry#getPortletWindow(javax.servlet.http.HttpServletRequest, org.apereo.portal.portlet.om.IPortletWindowId)