docs: public String buildPortletUrl(
              HttpServletRequest httpServletRequest, IPortletDefinition portlet) {
          final IPortletWindow portletWindow =
                  this.portletWindowRegistry.getOrCreateDefaultPortletWindowByFname(
                          httpServletRequest, portlet.getFName());
  
          // portletWindow is null if user does not have access to portlet.
          if (portletWindow == null) {
              return null;
          }
          // If user does not have browse permission, exclude the portlet.
          if (!this.authorizationService.canPrincipalBrowse(
                  this.authorizationService.newPrincipal(
                          httpServletRequest.getRemoteUser(), EntityEnum.PERSON.getClazz()),
                  portlet)) {
              return null;
          }
  
          final IPortletWindowId portletWindowId = portletWindow.getPortletWindowId();
          final IPortalUrlBuilder portalUrlBuilder =
                  this.portalUrlProvider.getPortalUrlBuilderByPortletFName(
                          httpServletRequest, portlet.getFName(), UrlType.RENDER);
          final IPortletUrlBuilder portletUrlBuilder =
                  portalUrlBuilder.getPortletUrlBuilder(portletWindowId);
          portletUrlBuilder.setWindowState(PortletUtils.getWindowState("maximized"));
          return portalUrlBuilder.getUrlString();
      }