docs: @RequestMapping(value = "/v4-3/dlm/portletRegistry.json", method = RequestMethod.GET)
      public ModelAndView getPortletRegistry(
              WebRequest webRequest,
              HttpServletRequest request,
              @RequestParam(value = "categoryId", required = false) String categoryId,
              @RequestParam(value = "category", required = false) String categoryName,
              @RequestParam(value = "favorite", required = false) String favorite) {
  
          boolean includeUncategorizedPortlets = true; // default
  
          /*
           * Pick a category for the basis of the response
           */
          PortletCategory rootCategory =
                  portletCategoryRegistry.getTopLevelPortletCategory(); // default
          if (StringUtils.isNotBlank(categoryId)) {
              // Callers can specify a category by Id...
              rootCategory = portletCategoryRegistry.getPortletCategory(categoryId);
              includeUncategorizedPortlets = false;
          } else if (StringUtils.isNotBlank(categoryName)) {
              // or by name...
              rootCategory = portletCategoryRegistry.getPortletCategoryByName(categoryName);
              includeUncategorizedPortlets = false;
          }
  
          if (rootCategory == null) {
              // A specific category was requested, but there was a problem obtaining it
              throw new IllegalArgumentException("Requested category not found");
          }
  
          final IPerson user = personManager.getPerson(request);
  
          /*
           * Gather the user's favorites
           */
          final Set<IPortletDefinition> favoritePortlets = calculateFavoritePortlets(request);
  
          Map<String, SortedSet<PortletCategoryBean>> rslt =
                  getRegistry43(
                          webRequest,
                          user,
                          rootCategory,
                          includeUncategorizedPortlets,
                          favoritePortlets);
  
          /*
           * The 'favorite=true' option means return only portlets that this user has favorited.
           */
          if (Boolean.valueOf(favorite)) {
              logger.debug(
                      "Filtering out non-favorite portlets because 'favorite=true' was included in the query string");
              rslt = filterRegistryFavoritesOnly(rslt);
          }
  
          return new ModelAndView("jsonView", "registry", rslt);
      }