code: @Override
      public PortletWindowIdImpl getPortletWindowId(
              HttpServletRequest request, String portletWindowId) {
          Validate.notNull(portletWindowId, "portletWindowId can not be null");
  
          final String entityIdStr = PortletWindowIdStringUtils.parsePortletEntityId(portletWindowId);
          final String instanceId;
          if (!PortletEntityIdStringUtils.hasCorrectNumberOfParts(entityIdStr)
                  || !PortletWindowIdStringUtils.hasCorrectNumberOfParts(portletWindowId)) {
              throw new IllegalArgumentException(
                      "Provided portlet window ID '" + portletWindowId + "' is not valid");
          }
  
          if (PortletWindowIdStringUtils.hasPortletWindowInstanceId(portletWindowId)) {
              instanceId = PortletWindowIdStringUtils.parsePortletWindowInstanceId(portletWindowId);
          } else {
              instanceId = null;
          }
  
          final IPortletEntity portletEntity =
                  this.portletEntityRegistry.getPortletEntity(request, entityIdStr);
          if (portletEntity == null) {
              throw new IllegalArgumentException(
                      "No parent IPortletEntity found for id '"
                              + entityIdStr
                              + "' from portlet window id: "
                              + portletWindowId);
          }
  
          return createPortletWindowId(instanceId, portletEntity.getPortletEntityId());
      }
docs: /* (non-Javadoc)
  @see org.apereo.portal.portlet.registry.IPortletWindowRegistry#getPortletWindowId(java.lang.String)