docs: public static CmsContainerElementBean createElementForResourceType(
          CmsObject cms,
          I_CmsResourceType resourceType,
          String targetFolder,
          Map<String, String> individualSettings,
          boolean isCopyModels,
          Locale locale)
      throws CmsException {
  
          if (!(resourceType instanceof CmsResourceTypeXmlContent)) {
              throw new IllegalArgumentException();
          }
  
          byte[] content = new byte[0];
          String schema = ((CmsResourceTypeXmlContent)resourceType).getSchema();
          if (schema != null) {
              // must set URI of OpenCms user context to parent folder of created resource,
              // in order to allow reading of properties for default values
              CmsObject newCms = OpenCms.initCmsObject(cms);
              newCms.getRequestContext().setUri(targetFolder);
              // unmarshal the content definition for the new resource
              CmsXmlContentDefinition contentDefinition = CmsXmlContentDefinition.unmarshal(cms, schema);
              CmsXmlContent xmlContent = CmsXmlContentFactory.createDocument(
                  newCms,
                  locale,
                  OpenCms.getSystemInfo().getDefaultEncoding(),
                  contentDefinition);
              // adding all other available locales
              for (Locale otherLocale : OpenCms.getLocaleManager().getAvailableLocales()) {
                  if (!locale.equals(otherLocale)) {
                      xmlContent.addLocale(newCms, otherLocale);
                  }
              }
              content = xmlContent.marshal();
          }
          @SuppressWarnings("deprecation")
          CmsFile file = new CmsFile(
              CmsUUID.getNullUUID(),
              CmsUUID.getNullUUID(),
              targetFolder + "~",
              resourceType.getTypeId(),
              0,
              cms.getRequestContext().getCurrentProject().getUuid(),
              CmsResource.STATE_NEW,
              0,
              cms.getRequestContext().getCurrentUser().getId(),
              0,
              cms.getRequestContext().getCurrentUser().getId(),
              CmsResource.DATE_RELEASED_DEFAULT,
              CmsResource.DATE_EXPIRED_DEFAULT,
              1,
              content.length,
              0,
              0,
              content);
          CmsContainerElementBean elementBean = new CmsContainerElementBean(
              file,
              null,
              individualSettings,
              true,
              resourceType.getTypeName() + getSettingsHash(individualSettings, isCopyModels),
              isCopyModels);
          return elementBean;
      }