docs: private synchronized void initResourceTypes() throws CmsConfigurationException {
  
          if (CmsLog.INIT.isInfoEnabled()) {
              CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_STARTING_LOADER_CONFIG_0));
          }
  
          CmsResourceManagerConfiguration newConfiguration = new CmsResourceManagerConfiguration();
  
          if (CmsLog.INIT.isInfoEnabled()) {
              CmsLog.INIT.info(
                  Messages.get().getBundle().key(
                      Messages.INIT_ADD_RESTYPE_FROM_FILE_2,
                      new Integer(m_resourceTypesFromXml.size()),
                      CmsVfsConfiguration.DEFAULT_XML_FILE_NAME));
          }
  
          // build a new resource type list from the resource types of the XML configuration
          Iterator<I_CmsResourceType> i;
          i = m_resourceTypesFromXml.iterator();
          while (i.hasNext()) {
              I_CmsResourceType resourceType = i.next();
              initResourceType(resourceType, newConfiguration);
          }
  
          // add all resource types declared in the modules
          CmsModuleManager moduleManager = OpenCms.getModuleManager();
          if (moduleManager != null) {
              Iterator<String> modules = moduleManager.getModuleNames().iterator();
              while (modules.hasNext()) {
                  CmsModule module = moduleManager.getModule(modules.next());
                  if ((module != null) && (module.getResourceTypes().size() > 0)) {
                      // module contains resource types
                      if (CmsLog.INIT.isInfoEnabled()) {
                          CmsLog.INIT.info(
                              Messages.get().getBundle().key(
                                  Messages.INIT_ADD_NUM_RESTYPES_FROM_MOD_2,
                                  new Integer(module.getResourceTypes().size()),
                                  module.getName()));
                      }
  
                      Iterator<I_CmsResourceType> j = module.getResourceTypes().iterator();
                      while (j.hasNext()) {
                          I_CmsResourceType resourceType = j.next();
                          I_CmsResourceType conflictingType = null;
                          if (resourceType.getTypeId() == CmsResourceTypeUnknownFile.RESOURCE_TYPE_ID) {
                              // default unknown file resource type
                              if (m_restypeUnknownFile != null) {
                                  // error: already set
                                  conflictingType = m_restypeUnknownFile;
                              } else {
                                  m_restypeUnknownFile = resourceType;
                                  continue;
                              }
                          } else if (resourceType.getTypeId() == CmsResourceTypeUnknownFolder.RESOURCE_TYPE_ID) {
                              // default unknown folder resource type
                              if (m_restypeUnknownFolder != null) {
                                  // error: already set
                                  conflictingType = m_restypeUnknownFolder;
                              } else {
                                  m_restypeUnknownFile = resourceType;
                                  continue;
                              }
                          } else {
                              // normal resource types
                              conflictingType = newConfiguration.getResourceTypeById(resourceType.getTypeId());
                          }
                          if (conflictingType != null) {
                              throw new CmsConfigurationException(
                                  Messages.get().container(
                                      Messages.ERR_CONFLICTING_MODULE_RESOURCE_TYPES_5,
                                      new Object[] {
                                          resourceType.getTypeName(),
                                          new Integer(resourceType.getTypeId()),
                                          module.getName(),
                                          conflictingType.getTypeName(),
                                          new Integer(conflictingType.getTypeId())}));
                          }
                          initResourceType(resourceType, newConfiguration);
                      }
                  }
              }
          }
  
          // freeze the current configuration
          newConfiguration.freeze(m_restypeUnknownFile, m_restypeUnknownFile);
          m_configuration = newConfiguration;
          m_frozen = true;
  
          if (CmsLog.INIT.isInfoEnabled()) {
              CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_RESOURCE_TYPE_INITIALIZED_0));
          }
      }