code: protected Map<String, String> getFolderTypes() throws CmsException {
  
          Map<String, String> result = new HashMap<String, String>();
          CmsObject cms = OpenCms.initCmsObject(getCms());
          if (m_data.isModuleConfig()) {
              Set<String> siteRoots = OpenCms.getSiteManager().getSiteRoots();
              for (String siteRoot : siteRoots) {
                  cms.getRequestContext().setSiteRoot(siteRoot);
                  for (CmsResourceTypeConfig config : getResourceTypes()) {
                      if (!config.isDetailPagesDisabled()) {
                          String typeName = config.getTypeName();
                          if (!config.isPageRelative()) { // elements stored with container pages can not be used as detail contents
                              String folderPath = config.getFolderPath(cms, null);
                              result.put(CmsStringUtil.joinPaths(folderPath, "/"), typeName);
                          }
                      }
                  }
              }
          } else {
              for (CmsResourceTypeConfig config : getResourceTypes()) {
                  if (!config.isDetailPagesDisabled()) {
                      String typeName = config.getTypeName();
                      if (!config.isPageRelative()) { // elements stored with container pages can not be used as detail contents
                          String folderPath = config.getFolderPath(getCms(), null);
                          result.put(CmsStringUtil.joinPaths(folderPath, "/"), typeName);
                      }
                  }
              }
          }
          return result;
      }
docs: Collects the folder types in a map.<p>
  
  @return the map of folder types
  
  @throws CmsException if something goes wrong