code: @SuppressWarnings("unchecked")
      public List<IUserLayoutNodeDescription> getFavoritePortletLayoutNodes(IUserLayout userLayout) {
  
          logger.trace("Extracting favorite portlets from layout [{}]", userLayout);
  
          List<IUserLayoutNodeDescription> favorites = new LinkedList<>();
  
          Enumeration<String> childrenOfRoot = userLayout.getChildIds(userLayout.getRootId());
  
          // loop over folders that might be the favorites folder
          while (childrenOfRoot.hasMoreElements()) {
              String nodeId = childrenOfRoot.nextElement();
  
              try {
  
                  IUserLayoutNodeDescription nodeDescription = userLayout.getNodeDescription(nodeId);
  
                  if (FOLDER.equals(nodeDescription.getType())
                          && nodeDescription instanceof IUserLayoutFolderDescription) {
  
                      IUserLayoutFolderDescription folderDescription =
                              (IUserLayoutFolderDescription) nodeDescription;
  
                      if (FAVORITES_TYPE.equalsIgnoreCase(folderDescription.getFolderType())) {
                          // TODO: assumes columns structure, but should traverse tree to collect all
                          // portlets regardless
                          Enumeration<String> columns = userLayout.getChildIds(nodeId);
  
                          // loop through columns to gather beloved portlets
                          while (columns.hasMoreElements()) {
                              String column = columns.nextElement();
                              Enumeration<String> portlets = userLayout.getChildIds(column);
                              while (portlets.hasMoreElements()) {
                                  String portlet = portlets.nextElement();
                                  IUserLayoutNodeDescription portletDescription =
                                          userLayout.getNodeDescription(portlet);
                                  favorites.add(portletDescription);
                              }
                          }
                      } else {
                          logger.trace("Ignoring non-favorites folder node [{}]", nodeDescription);
                      }
  
                  } else {
                      logger.trace("Ignoring non-folder node [{}]", nodeDescription);
                  }
  
              } catch (Exception e) {
                  logger.error(
                          "Ignoring on error a node while examining for favorites: node ID is [{}]",
                          nodeId,
                          e);
              }
          }
  
          logger.debug("Extracted favorite portlets [{}] from [{}]", favorites, userLayout);
  
          return favorites;
      }
docs: Get the portlets that are in the folder(s) of type "favorites".
  
  @param userLayout
  @return