docs: private CmsContentDefinition readContentDefinitionForNew(
          String newLink,
          CmsResource referenceResource,
          CmsUUID modelFileId,
          Locale locale,
          String mode,
          String postCreateHandler,
          CmsEditHandlerData editHandlerData,
          Map<String, String> settingPresets)
      throws CmsException {
  
          String sitePath = getCmsObject().getSitePath(referenceResource);
          String resourceType;
          if (newLink.startsWith(CmsJspTagEdit.NEW_LINK_IDENTIFIER)) {
              resourceType = CmsJspTagEdit.getTypeFromNewLink(newLink);
          } else {
              resourceType = OpenCms.getResourceManager().getResourceType(referenceResource.getTypeId()).getTypeName();
          }
          String modelFile = null;
          if (modelFileId == null) {
              List<CmsResource> modelResources = CmsResourceTypeXmlContent.getModelFiles(
                  getCmsObject(),
                  CmsResource.getFolderPath(sitePath),
                  resourceType);
              if (!modelResources.isEmpty()) {
                  List<CmsModelResourceInfo> modelInfos = CmsContainerpageService.generateModelResourceList(
                      getCmsObject(),
                      resourceType,
                      modelResources,
                      locale);
                  return new CmsContentDefinition(
                      modelInfos,
                      newLink,
                      referenceResource.getStructureId(),
                      locale.toString());
              }
          } else if (!modelFileId.isNullUUID()) {
              modelFile = getCmsObject().getSitePath(
                  getCmsObject().readResource(modelFileId, CmsResourceFilter.IGNORE_EXPIRATION));
          }
          String newFileName = createResourceToEdit(
              newLink,
              locale,
              sitePath,
              modelFile,
              mode,
              postCreateHandler,
              editHandlerData);
          CmsResource resource = getCmsObject().readResource(newFileName, CmsResourceFilter.IGNORE_EXPIRATION);
          CmsFile file = getCmsObject().readFile(resource);
          CmsXmlContent content = getContentDocument(file, false);
          CmsContentDefinition contentDefinition = readContentDefinition(
              file,
              content,
              null,
              null,
              locale,
              false,
              null,
              null,
              settingPresets);
          contentDefinition.setDeleteOnCancel(true);
          return contentDefinition;
      }