docs: public IPortalUrlBuilder getPortalUrlBuilder(
              HttpServletRequest request, String fname, String layoutId, String type) {
          try {
              final UrlType urlType;
              if (StringUtils.isEmpty(type)) {
                  urlType = UrlType.RENDER;
              } else {
                  urlType = UrlType.valueOfIngoreCase(type);
              }
  
              if (StringUtils.isNotEmpty(fname)) {
                  final IPortalUrlBuilder portalUrlBuilderByPortletFName =
                          this.portalUrlProvider.getPortalUrlBuilderByPortletFName(
                                  request, fname, urlType);
                  return portalUrlBuilderByPortletFName;
              }
  
              if (StringUtils.isNotEmpty(layoutId)) {
                  final IPortalUrlBuilder portalUrlBuilderByLayoutNode =
                          this.portalUrlProvider.getPortalUrlBuilderByLayoutNode(
                                  request, layoutId, urlType);
                  return portalUrlBuilderByLayoutNode;
              }
  
              return this.portalUrlProvider.getDefaultUrl(request);
          } catch (Exception e) {
              this.logger.error(
                      "Failed to create IPortalUrlBuilder for fname='"
                              + fname
                              + "', layoutId='"
                              + layoutId
                              + "', type='"
                              + type
                              + "'. # will be returned instead.",
                      e);
              return new FailSafePortalUrlBuilder();
          }
      }