code: public void addResourceType(I_CmsResourceType resourceType) throws CmsConfigurationException {
  
          // check if new resource types can still be added
          if (m_frozen) {
              throw new CmsConfigurationException(Messages.get().container(Messages.ERR_NO_CONFIG_AFTER_STARTUP_0));
          }
  
          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;
                  return;
              }
          } 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_restypeUnknownFolder = resourceType;
                  return;
              }
          } else {
              // normal resource types
              int conflictIndex = m_resourceTypesFromXml.indexOf(resourceType);
              if (conflictIndex >= 0) {
                  conflictingType = m_resourceTypesFromXml.get(conflictIndex);
              }
          }
          if (conflictingType != null) {
              // configuration problem: the resource type (or at least the id or the name) is already configured
              throw new CmsConfigurationException(
                  Messages.get().container(
                      Messages.ERR_CONFLICTING_RESOURCE_TYPES_4,
                      new Object[] {
                          resourceType.getTypeName(),
                          new Integer(resourceType.getTypeId()),
                          conflictingType.getTypeName(),
                          new Integer(conflictingType.getTypeId())}));
          }
  
          m_resourceTypesFromXml.add(resourceType);
      }
docs: Adds a new resource type from the XML configuration to the internal list of loaded resource types.<p>
  
  Resource types can also be added from a module.<p>
  
  @param resourceType the resource type to add
  @throws CmsConfigurationException in case the resource manager configuration is already initialized